From 2a81ada32f0e584fc0c943e0d3a8c9f4fae411d6 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 11 Jan 2023 12:30:17 +0100 Subject: driver core: make struct bus_type.uevent() take a const * The uevent() callback in struct bus_type should not be modifying the device that is passed into it, so mark it as a const * and propagate the function signature changes out into all relevant subsystems that use this callback. Acked-by: Rafael J. Wysocki Acked-by: Hans de Goede Link: https://lore.kernel.org/r/20230111113018.459199-16-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman --- drivers/w1/w1.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/w1') diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index 4a2ddf730a3a..9d199fed9628 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c @@ -170,7 +170,7 @@ static struct w1_family w1_default_family = { .fops = &w1_default_fops, }; -static int w1_uevent(struct device *dev, struct kobj_uevent_env *env); +static int w1_uevent(const struct device *dev, struct kobj_uevent_env *env); static struct bus_type w1_bus_type = { .name = "w1", @@ -577,11 +577,11 @@ void w1_destroy_master_attributes(struct w1_master *master) sysfs_remove_group(&master->dev.kobj, &w1_master_defattr_group); } -static int w1_uevent(struct device *dev, struct kobj_uevent_env *env) +static int w1_uevent(const struct device *dev, struct kobj_uevent_env *env) { - struct w1_master *md = NULL; - struct w1_slave *sl = NULL; - char *event_owner, *name; + const struct w1_master *md = NULL; + const struct w1_slave *sl = NULL; + const char *event_owner, *name; int err = 0; if (dev->driver == &w1_master_driver) { -- cgit v1.2.3