lkml.org 
[lkml]   [2023]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 19/21] driver core: bus: constify bus_get_kset()
Date
The bus_get_kset() function should be taking a const * to bus_type, not
just a * so fix that up.

Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/base/bus.c | 2 +-
include/linux/device/bus.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index e6043a2d9feb..815638bf63db 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -987,7 +987,7 @@ void bus_notify(struct device *dev, enum bus_notifier_event value)
subsys_put(sp);
}

-struct kset *bus_get_kset(struct bus_type *bus)
+struct kset *bus_get_kset(const struct bus_type *bus)
{
struct subsys_private *sp = bus_to_subsys(bus);
struct kset *kset;
diff --git a/include/linux/device/bus.h b/include/linux/device/bus.h
index c0a034ff59b7..425d79d6cf69 100644
--- a/include/linux/device/bus.h
+++ b/include/linux/device/bus.h
@@ -281,6 +281,6 @@ enum bus_notifier_event {
BUS_NOTIFY_DRIVER_NOT_BOUND,
};

-extern struct kset *bus_get_kset(struct bus_type *bus);
+extern struct kset *bus_get_kset(const struct bus_type *bus);

#endif
--
2.39.1
\
 
 \ /
  Last update: 2023-03-27 00:14    [W:0.271 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site