Skip to content

Commit db2292b

Browse files
committed
PM: clk: make pm_clk_add_notifier() take a const pointer
The driver core wants to work with const struct bus_type, so there's no reason that pm_clk_add_notifier() should not also do the same thing, considering that it just passes the pointer off to the driver core which is expecting a const *. Cc: Rafael J. Wysocki <[email protected]> Link: https://lore.kernel.org/r/2023121922-triumph-exploit-f545@gregkh Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f36be9c commit db2292b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/base/power/clock_ops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ static int pm_clk_notify(struct notifier_block *nb,
793793
* the remaining members of @clknb should be populated prior to calling this
794794
* routine.
795795
*/
796-
void pm_clk_add_notifier(struct bus_type *bus,
796+
void pm_clk_add_notifier(const struct bus_type *bus,
797797
struct pm_clk_notifier_block *clknb)
798798
{
799799
if (!bus || !clknb)

include/linux/pm_clock.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ static inline int devm_pm_clk_create(struct device *dev)
9191
#endif
9292

9393
#ifdef CONFIG_HAVE_CLK
94-
extern void pm_clk_add_notifier(struct bus_type *bus,
94+
extern void pm_clk_add_notifier(const struct bus_type *bus,
9595
struct pm_clk_notifier_block *clknb);
9696
#else
97-
static inline void pm_clk_add_notifier(struct bus_type *bus,
97+
static inline void pm_clk_add_notifier(const struct bus_type *bus,
9898
struct pm_clk_notifier_block *clknb)
9999
{
100100
}

0 commit comments

Comments
 (0)