diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-02-08 12:13:29 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-02-09 10:43:43 +0100 |
commit | 4dd1f3f8f99ec51dbcfeffe95b8ab68161a332a4 (patch) | |
tree | 935840109b5c72d5339762115ffdd4eb5c2042d8 | |
parent | f91482be9b480dfce2616f5ba3fa548b8ed41efb (diff) | |
download | linux-4dd1f3f8f99ec51dbcfeffe95b8ab68161a332a4.tar.gz linux-4dd1f3f8f99ec51dbcfeffe95b8ab68161a332a4.tar.bz2 linux-4dd1f3f8f99ec51dbcfeffe95b8ab68161a332a4.zip |
driver core: bus: constify some internal functions
The functions add_probe_files() and remove_probe_files() should be
taking a const * to bus_type, not just a *, so fix that up. These
functions should really be removed entirely and an attribute group used
instead, but for now, make this change so that other const work can
continue.
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230208111330.439504-21-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/base/bus.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index c394727b8253..bcff24b11bb3 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -603,7 +603,7 @@ static void remove_bind_files(struct device_driver *drv) static BUS_ATTR_WO(drivers_probe); static BUS_ATTR_RW(drivers_autoprobe); -static int add_probe_files(struct bus_type *bus) +static int add_probe_files(const struct bus_type *bus) { int retval; @@ -618,7 +618,7 @@ out: return retval; } -static void remove_probe_files(struct bus_type *bus) +static void remove_probe_files(const struct bus_type *bus) { bus_remove_file(bus, &bus_attr_drivers_autoprobe); bus_remove_file(bus, &bus_attr_drivers_probe); |