Skip to content

Commit 3efeeaf

Browse files
Dr. David Alan Gilbertrafaeljw
authored andcommitted
PM: clk: Remove unused pm_clk_remove()
pm_clk_remove() is currently unused. It hasn't been used since at least 2011 when it was renamed from pm_runtime_clk_remove() by commit 3d5c303 ("PM: Rename clock management functions") Remove it. Note that the __pm_clk_remove() is still used and is left in. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://patch.msgid.link/20250307212347.68785-1-linux@treblig.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 7ebd850 commit 3efeeaf

File tree

2 files changed

+0
-44
lines changed

2 files changed

+0
-44
lines changed

drivers/base/power/clock_ops.c

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -343,46 +343,6 @@ static void __pm_clk_remove(struct pm_clock_entry *ce)
343343
kfree(ce);
344344
}
345345

346-
/**
347-
* pm_clk_remove - Stop using a device clock for power management.
348-
* @dev: Device whose clock should not be used for PM any more.
349-
* @con_id: Connection ID of the clock.
350-
*
351-
* Remove the clock represented by @con_id from the list of clocks used for
352-
* the power management of @dev.
353-
*/
354-
void pm_clk_remove(struct device *dev, const char *con_id)
355-
{
356-
struct pm_subsys_data *psd = dev_to_psd(dev);
357-
struct pm_clock_entry *ce;
358-
359-
if (!psd)
360-
return;
361-
362-
pm_clk_list_lock(psd);
363-
364-
list_for_each_entry(ce, &psd->clock_list, node) {
365-
if (!con_id && !ce->con_id)
366-
goto remove;
367-
else if (!con_id || !ce->con_id)
368-
continue;
369-
else if (!strcmp(con_id, ce->con_id))
370-
goto remove;
371-
}
372-
373-
pm_clk_list_unlock(psd);
374-
return;
375-
376-
remove:
377-
list_del(&ce->node);
378-
if (ce->enabled_when_prepared)
379-
psd->clock_op_might_sleep--;
380-
pm_clk_list_unlock(psd);
381-
382-
__pm_clk_remove(ce);
383-
}
384-
EXPORT_SYMBOL_GPL(pm_clk_remove);
385-
386346
/**
387347
* pm_clk_remove_clk - Stop using a device clock for power management.
388348
* @dev: Device whose clock should not be used for PM any more.

include/linux/pm_clock.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ 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);
4444
extern int of_pm_clk_add_clks(struct device *dev);
45-
extern void pm_clk_remove(struct device *dev, const char *con_id);
4645
extern void pm_clk_remove_clk(struct device *dev, struct clk *clk);
4746
extern int pm_clk_suspend(struct device *dev);
4847
extern int pm_clk_resume(struct device *dev);
@@ -75,9 +74,6 @@ static inline int of_pm_clk_add_clks(struct device *dev)
7574
{
7675
return -EINVAL;
7776
}
78-
static inline void pm_clk_remove(struct device *dev, const char *con_id)
79-
{
80-
}
8177
#define pm_clk_suspend NULL
8278
#define pm_clk_resume NULL
8379
static inline void pm_clk_remove_clk(struct device *dev, struct clk *clk)

0 commit comments

Comments
 (0)