Skip to content

Commit 7ebd850

Browse files
Dr. David Alan Gilbertrafaeljw
authored andcommitted
PM: clk: remove unused of_pm_clk_add_clk()
The last use of of_pm_clk_add_clk() was removed by 2019's commit fe00f89 ("irqchip/gic-pm: Update driver to use clk_bulk APIs") Remove it. Note that the plural version of_pm_clk_add_clks() is still being used and is left. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://patch.msgid.link/20250224010610.187503-1-linux@treblig.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent d082ecb commit 7ebd850

File tree

2 files changed

+0
-34
lines changed

2 files changed

+0
-34
lines changed

drivers/base/power/clock_ops.c

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -259,39 +259,6 @@ int pm_clk_add_clk(struct device *dev, struct clk *clk)
259259
}
260260
EXPORT_SYMBOL_GPL(pm_clk_add_clk);
261261

262-
263-
/**
264-
* of_pm_clk_add_clk - Start using a device clock for power management.
265-
* @dev: Device whose clock is going to be used for power management.
266-
* @name: Name of clock that is going to be used for power management.
267-
*
268-
* Add the clock described in the 'clocks' device-tree node that matches
269-
* with the 'name' provided, to the list of clocks used for the power
270-
* management of @dev. On success, returns 0. Returns a negative error
271-
* code if the clock is not found or cannot be added.
272-
*/
273-
int of_pm_clk_add_clk(struct device *dev, const char *name)
274-
{
275-
struct clk *clk;
276-
int ret;
277-
278-
if (!dev || !dev->of_node || !name)
279-
return -EINVAL;
280-
281-
clk = of_clk_get_by_name(dev->of_node, name);
282-
if (IS_ERR(clk))
283-
return PTR_ERR(clk);
284-
285-
ret = pm_clk_add_clk(dev, clk);
286-
if (ret) {
287-
clk_put(clk);
288-
return ret;
289-
}
290-
291-
return 0;
292-
}
293-
EXPORT_SYMBOL_GPL(of_pm_clk_add_clk);
294-
295262
/**
296263
* of_pm_clk_add_clks - Start using device clock(s) for power management.
297264
* @dev: Device whose clock(s) is going to be used for power management.

include/linux/pm_clock.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ extern int pm_clk_create(struct device *dev);
4141
extern void pm_clk_destroy(struct device *dev);
4242
extern int pm_clk_add(struct device *dev, const char *con_id);
4343
extern int pm_clk_add_clk(struct device *dev, struct clk *clk);
44-
extern int of_pm_clk_add_clk(struct device *dev, const char *name);
4544
extern int of_pm_clk_add_clks(struct device *dev);
4645
extern void pm_clk_remove(struct device *dev, const char *con_id);
4746
extern void pm_clk_remove_clk(struct device *dev, struct clk *clk);

0 commit comments

Comments
 (0)