| * This program is free software; you can redistribute it and/or modify |
| * it under the terms of the GNU General Public License version 2 as |
| * published by the Free Software Foundation. |
| #include <linux/device.h> |
| #include <linux/export.h> |
| static void devm_clk_release(struct device *dev, void *res) |
| clk_put(*(struct clk **)res); |
| struct clk *devm_clk_get(struct device *dev, const char *id) |
| ptr = devres_alloc(devm_clk_release, sizeof(*ptr), GFP_KERNEL); |
| EXPORT_SYMBOL(devm_clk_get); |
| static int devm_clk_match(struct device *dev, void *res, void *data) |
| void devm_clk_put(struct device *dev, struct clk *clk) |
| ret = devres_release(dev, devm_clk_release, devm_clk_match, clk); |
| EXPORT_SYMBOL(devm_clk_put); |