Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 3d5c30367cbc ("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>

authored by

Dr. David Alan Gilbert and committed by
Rafael J. Wysocki
3efeeaf8 7ebd8502

-44
-40
drivers/base/power/clock_ops.c
··· 344 344 } 345 345 346 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 - 386 - /** 387 347 * pm_clk_remove_clk - Stop using a device clock for power management. 388 348 * @dev: Device whose clock should not be used for PM any more. 389 349 * @clk: Clock pointer
-4
include/linux/pm_clock.h
··· 42 42 extern int pm_clk_add(struct device *dev, const char *con_id); 43 43 extern int pm_clk_add_clk(struct device *dev, struct clk *clk); 44 44 extern int of_pm_clk_add_clks(struct device *dev); 45 - extern void pm_clk_remove(struct device *dev, const char *con_id); 46 45 extern void pm_clk_remove_clk(struct device *dev, struct clk *clk); 47 46 extern int pm_clk_suspend(struct device *dev); 48 47 extern int pm_clk_resume(struct device *dev); ··· 73 74 static inline int of_pm_clk_add_clks(struct device *dev) 74 75 { 75 76 return -EINVAL; 76 - } 77 - static inline void pm_clk_remove(struct device *dev, const char *con_id) 78 - { 79 77 } 80 78 #define pm_clk_suspend NULL 81 79 #define pm_clk_resume NULL