driver core: make struct device_type.uevent() take a const *
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Jan 2023 11:30:07 +0000 (12:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jan 2023 12:45:36 +0000 (13:45 +0100)
The uevent() callback in struct device_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.

Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Andreas Noever <andreas.noever@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Bard Liao <yung-chuan.liao@linux.intel.com>
Cc: Chaitanya Kulkarni <kch@nvidia.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Ira Weiny <ira.weiny@intel.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Jilin Yuan <yuanjilin@cdjrlc.com>
Cc: Jiri Slaby <jirislaby@kernel.org>
Cc: Len Brown <lenb@kernel.org>
Cc: Mark Gross <markgross@kernel.org>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: Maximilian Luz <luzmaximilian@gmail.com>
Cc: Michael Jamet <michael.jamet@intel.com>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Sanyog Kale <sanyog.r.kale@intel.com>
Cc: Sean Young <sean@mess.org>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Won Chung <wonchung@google.com>
Cc: Yehezkel Bernat <YehezkelShB@gmail.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> # for Thunderbolt
Acked-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Wolfram Sang <wsa@kernel.org>
Acked-by: Vinod Koul <vkoul@kernel.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230111113018.459199-6-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25 files changed:
block/partitions/core.c
drivers/acpi/device_sysfs.c
drivers/acpi/internal.h
drivers/firewire/core-device.c
drivers/gpu/drm/display/drm_dp_aux_bus.c
drivers/i2c/i2c-core-base.c
drivers/i3c/device.c
drivers/i3c/master.c
drivers/input/input.c
drivers/media/rc/rc-main.c
drivers/platform/surface/aggregator/bus.c
drivers/soundwire/bus_type.c
drivers/thunderbolt/switch.c
drivers/thunderbolt/tb.h
drivers/thunderbolt/xdomain.c
drivers/tty/serdev/core.c
drivers/usb/core/message.c
drivers/usb/core/usb.c
drivers/usb/phy/phy.c
drivers/usb/roles/class.c
drivers/usb/typec/class.c
include/linux/acpi.h
include/linux/device.h
include/linux/i3c/device.h
include/linux/soundwire/sdw_type.h

index b8112f52d38800742a2e51eb4af61fa116da35d6..7b8ef6296abd031ff4828fff2cd1cb9e34c3633b 100644 (file)
@@ -254,9 +254,9 @@ static void part_release(struct device *dev)
        iput(dev_to_bdev(dev)->bd_inode);
 }
 
-static int part_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int part_uevent(const struct device *dev, struct kobj_uevent_env *env)
 {
-       struct block_device *part = dev_to_bdev(dev);
+       const struct block_device *part = dev_to_bdev(dev);
 
        add_uevent_var(env, "PARTN=%u", part->bd_partno);
        if (part->bd_meta_info && part->bd_meta_info->volname[0])
index 120873dad2cc56addea2edad6135a2d055a848f9..daff2c0c5c523ebdf759d63b92306f9846f03eed 100644 (file)
@@ -133,7 +133,7 @@ static void acpi_hide_nondev_subnodes(struct acpi_device_data *data)
  *         -EINVAL: output error
  *         -ENOMEM: output is truncated
  */
-static int create_pnp_modalias(struct acpi_device *acpi_dev, char *modalias,
+static int create_pnp_modalias(const struct acpi_device *acpi_dev, char *modalias,
                               int size)
 {
        int len;
@@ -191,7 +191,7 @@ static int create_pnp_modalias(struct acpi_device *acpi_dev, char *modalias,
  * only be called for devices having ACPI_DT_NAMESPACE_HID in their list of
  * ACPI/PNP IDs.
  */
-static int create_of_modalias(struct acpi_device *acpi_dev, char *modalias,
+static int create_of_modalias(const struct acpi_device *acpi_dev, char *modalias,
                              int size)
 {
        struct acpi_buffer buf = { ACPI_ALLOCATE_BUFFER };
@@ -239,7 +239,7 @@ static int create_of_modalias(struct acpi_device *acpi_dev, char *modalias,
        return len;
 }
 
-int __acpi_device_uevent_modalias(struct acpi_device *adev,
+int __acpi_device_uevent_modalias(const struct acpi_device *adev,
                                  struct kobj_uevent_env *env)
 {
        int len;
@@ -277,7 +277,7 @@ int __acpi_device_uevent_modalias(struct acpi_device *adev,
  * Because other buses do not support ACPI HIDs & CIDs, e.g. for a device with
  * hid:IBM0001 and cid:ACPI0001 you get: "acpi:IBM0001:ACPI0001".
  */
-int acpi_device_uevent_modalias(struct device *dev, struct kobj_uevent_env *env)
+int acpi_device_uevent_modalias(const struct device *dev, struct kobj_uevent_env *env)
 {
        return __acpi_device_uevent_modalias(acpi_companion_match(dev), env);
 }
index ec584442fb298861d75b51adafe9732f5ec09290..06ad497067acf8709f18ab8fe8c21addbbff7edf 100644 (file)
@@ -120,7 +120,7 @@ int acpi_bus_register_early_device(int type);
                      Device Matching and Notification
    -------------------------------------------------------------------------- */
 struct acpi_device *acpi_companion_match(const struct device *dev);
-int __acpi_device_uevent_modalias(struct acpi_device *adev,
+int __acpi_device_uevent_modalias(const struct acpi_device *adev,
                                  struct kobj_uevent_env *env);
 
 /* --------------------------------------------------------------------------
index adddd8c45d0c1fe39b919020f8ce343075ad5c61..aa597cda0d88741334c68bf1f9f23fcf8e43c292 100644 (file)
@@ -133,7 +133,7 @@ static void get_ids(const u32 *directory, int *id)
        }
 }
 
-static void get_modalias_ids(struct fw_unit *unit, int *id)
+static void get_modalias_ids(const struct fw_unit *unit, int *id)
 {
        get_ids(&fw_parent_device(unit)->config_rom[5], id);
        get_ids(unit->directory, id);
@@ -195,7 +195,7 @@ static void fw_unit_remove(struct device *dev)
        driver->remove(fw_unit(dev));
 }
 
-static int get_modalias(struct fw_unit *unit, char *buffer, size_t buffer_size)
+static int get_modalias(const struct fw_unit *unit, char *buffer, size_t buffer_size)
 {
        int id[] = {0, 0, 0, 0};
 
@@ -206,9 +206,9 @@ static int get_modalias(struct fw_unit *unit, char *buffer, size_t buffer_size)
                        id[0], id[1], id[2], id[3]);
 }
 
-static int fw_unit_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int fw_unit_uevent(const struct device *dev, struct kobj_uevent_env *env)
 {
-       struct fw_unit *unit = fw_unit(dev);
+       const struct fw_unit *unit = fw_unit(dev);
        char modalias[64];
 
        get_modalias(unit, modalias, sizeof(modalias));
index e31a0261c53e52ac639a242c6a1b1831e8ffd01a..8a165be1a82144fc0c766286eec12cda3d38e794 100644 (file)
@@ -161,7 +161,7 @@ static void dp_aux_ep_dev_release(struct device *dev)
        kfree(aux_ep_with_data);
 }
 
-static int dp_aux_ep_dev_modalias(struct device *dev, struct kobj_uevent_env *env)
+static int dp_aux_ep_dev_modalias(const struct device *dev, struct kobj_uevent_env *env)
 {
        return of_device_uevent_modalias(dev, env);
 }
index 087e480b624cb2dde420183fb80a8651c27d8101..51b78a52ab7fc1106470693ed942b3286b308698 100644 (file)
@@ -136,9 +136,9 @@ static int i2c_device_match(struct device *dev, struct device_driver *drv)
        return 0;
 }
 
-static int i2c_device_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int i2c_device_uevent(const struct device *dev, struct kobj_uevent_env *env)
 {
-       struct i2c_client *client = to_i2c_client(dev);
+       const struct i2c_client *client = to_i2c_client(dev);
        int rc;
 
        rc = of_device_uevent_modalias(dev, env);
index d111499061b28589321ff24d8580e09fdaaed9da..1a6a8703dbc3aa61b40e39eb09e40e72e6089b92 100644 (file)
@@ -78,7 +78,7 @@ EXPORT_SYMBOL_GPL(i3c_device_do_setdasa);
  *
  * Retrieve I3C dev info.
  */
-void i3c_device_get_info(struct i3c_device *dev,
+void i3c_device_get_info(const struct i3c_device *dev,
                         struct i3c_device_info *info)
 {
        if (!info)
index d7e6f6c99aea558f7781de8c34f354aeb0add48b..7a60e1c5e5874692dd79067f4b9fed36a3510e93 100644 (file)
@@ -273,9 +273,9 @@ static struct attribute *i3c_device_attrs[] = {
 };
 ATTRIBUTE_GROUPS(i3c_device);
 
-static int i3c_device_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int i3c_device_uevent(const struct device *dev, struct kobj_uevent_env *env)
 {
-       struct i3c_device *i3cdev = dev_to_i3cdev(dev);
+       const struct i3c_device *i3cdev = dev_to_i3cdev(dev);
        struct i3c_device_info devinfo;
        u16 manuf, part, ext;
 
index ca2e3dd7188bb9461b7916ce159902efacef1851..0336e799d713ca2f9d35e787c27f87f6b56eb2a7 100644 (file)
@@ -1372,7 +1372,7 @@ INPUT_DEV_STRING_ATTR_SHOW(phys);
 INPUT_DEV_STRING_ATTR_SHOW(uniq);
 
 static int input_print_modalias_bits(char *buf, int size,
-                                    char name, unsigned long *bm,
+                                    char name, const unsigned long *bm,
                                     unsigned int min_bit, unsigned int max_bit)
 {
        int len = 0, i;
@@ -1384,7 +1384,7 @@ static int input_print_modalias_bits(char *buf, int size,
        return len;
 }
 
-static int input_print_modalias(char *buf, int size, struct input_dev *id,
+static int input_print_modalias(char *buf, int size, const struct input_dev *id,
                                int add_cr)
 {
        int len;
@@ -1432,7 +1432,7 @@ static ssize_t input_dev_show_modalias(struct device *dev,
 }
 static DEVICE_ATTR(modalias, S_IRUGO, input_dev_show_modalias, NULL);
 
-static int input_print_bitmap(char *buf, int buf_size, unsigned long *bitmap,
+static int input_print_bitmap(char *buf, int buf_size, const unsigned long *bitmap,
                              int max, int add_cr);
 
 static ssize_t input_dev_show_properties(struct device *dev,
@@ -1524,7 +1524,7 @@ static const struct attribute_group input_dev_id_attr_group = {
        .attrs  = input_dev_id_attrs,
 };
 
-static int input_print_bitmap(char *buf, int buf_size, unsigned long *bitmap,
+static int input_print_bitmap(char *buf, int buf_size, const unsigned long *bitmap,
                              int max, int add_cr)
 {
        int i;
@@ -1621,7 +1621,7 @@ static void input_dev_release(struct device *device)
  * device bitfields.
  */
 static int input_add_uevent_bm_var(struct kobj_uevent_env *env,
-                                  const char *name, unsigned long *bitmap, int max)
+                                  const char *name, const unsigned long *bitmap, int max)
 {
        int len;
 
@@ -1639,7 +1639,7 @@ static int input_add_uevent_bm_var(struct kobj_uevent_env *env,
 }
 
 static int input_add_uevent_modalias_var(struct kobj_uevent_env *env,
-                                        struct input_dev *dev)
+                                        const struct input_dev *dev)
 {
        int len;
 
@@ -1677,9 +1677,9 @@ static int input_add_uevent_modalias_var(struct kobj_uevent_env *env,
                        return err;                                     \
        } while (0)
 
-static int input_dev_uevent(struct device *device, struct kobj_uevent_env *env)
+static int input_dev_uevent(const struct device *device, struct kobj_uevent_env *env)
 {
-       struct input_dev *dev = to_input_dev(device);
+       const struct input_dev *dev = to_input_dev(device);
 
        INPUT_ADD_HOTPLUG_VAR("PRODUCT=%x/%x/%x/%x",
                                dev->id.bustype, dev->id.vendor,
index 527d9324742bb394aa7a855d492900bde375a4a9..6bdad6341844f5e8fda3f35b8800e0129427466f 100644 (file)
@@ -1614,7 +1614,7 @@ static void rc_dev_release(struct device *device)
        kfree(dev);
 }
 
-static int rc_dev_uevent(struct device *device, struct kobj_uevent_env *env)
+static int rc_dev_uevent(const struct device *device, struct kobj_uevent_env *env)
 {
        struct rc_dev *dev = to_rc_dev(device);
        int ret = 0;
index de539938896e25c3f9d3232641fdbf1f3fe11aa1..407eb55050a6c80cf5ad34607887cb595856007c 100644 (file)
@@ -35,9 +35,9 @@ static struct attribute *ssam_device_attrs[] = {
 };
 ATTRIBUTE_GROUPS(ssam_device);
 
-static int ssam_device_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int ssam_device_uevent(const struct device *dev, struct kobj_uevent_env *env)
 {
-       struct ssam_device *sdev = to_ssam_device(dev);
+       const struct ssam_device *sdev = to_ssam_device(dev);
 
        return add_uevent_var(env, "MODALIAS=ssam:d%02Xc%02Xt%02Xi%02Xf%02X",
                              sdev->uid.domain, sdev->uid.category,
index 04b3529f89293887fa4f772f0d66b74d6831182a..26c9a0a85d492dd9cde25c313975ee243debcd7e 100644 (file)
@@ -58,9 +58,9 @@ int sdw_slave_modalias(const struct sdw_slave *slave, char *buf, size_t size)
                        slave->id.sdw_version, slave->id.class_id);
 }
 
-int sdw_slave_uevent(struct device *dev, struct kobj_uevent_env *env)
+int sdw_slave_uevent(const struct device *dev, struct kobj_uevent_env *env)
 {
-       struct sdw_slave *slave = dev_to_sdw_dev(dev);
+       const struct sdw_slave *slave = dev_to_sdw_dev(dev);
        char modalias[32];
 
        sdw_slave_modalias(slave, modalias, sizeof(modalias));
index 363d712aa364347c25e361f8b79bca470be47a8a..cb6c304c445ee58112c4b0c6f4bc24df2277d69f 100644 (file)
@@ -2176,9 +2176,9 @@ static void tb_switch_release(struct device *dev)
        kfree(sw);
 }
 
-static int tb_switch_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int tb_switch_uevent(const struct device *dev, struct kobj_uevent_env *env)
 {
-       struct tb_switch *sw = tb_to_switch(dev);
+       const struct tb_switch *sw = tb_to_switch(dev);
        const char *type;
 
        if (sw->config.thunderbolt_version == USB4_VERSION_1_0) {
index f9786976f5ecfc55bd6c5e53452cba97b9c1c9ca..909da0a98134e53bb4974905af81e1f971040778 100644 (file)
@@ -815,7 +815,7 @@ static inline bool tb_is_switch(const struct device *dev)
        return dev->type == &tb_switch_type;
 }
 
-static inline struct tb_switch *tb_to_switch(struct device *dev)
+static inline struct tb_switch *tb_to_switch(const struct device *dev)
 {
        if (tb_is_switch(dev))
                return container_of(dev, struct tb_switch, dev);
index 3c51e47dd86b77786ff47a19617b06da13b5e8b4..a48335c95d39be5efca46eb6a2dbdae501044df1 100644 (file)
@@ -881,7 +881,7 @@ static ssize_t key_show(struct device *dev, struct device_attribute *attr,
 }
 static DEVICE_ATTR_RO(key);
 
-static int get_modalias(struct tb_service *svc, char *buf, size_t size)
+static int get_modalias(const struct tb_service *svc, char *buf, size_t size)
 {
        return snprintf(buf, size, "tbsvc:k%sp%08Xv%08Xr%08X", svc->key,
                        svc->prtcid, svc->prtcvers, svc->prtcrevs);
@@ -953,9 +953,9 @@ static const struct attribute_group *tb_service_attr_groups[] = {
        NULL,
 };
 
-static int tb_service_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int tb_service_uevent(const struct device *dev, struct kobj_uevent_env *env)
 {
-       struct tb_service *svc = container_of(dev, struct tb_service, dev);
+       const struct tb_service *svc = container_of_const(dev, struct tb_service, dev);
        char modalias[64];
 
        get_modalias(svc, modalias, sizeof(modalias));
index 0180e1e4e75df5a0e69a20aeb337613afbe762b5..aa80de3a819478e83b20839bce704c615afcf9b4 100644 (file)
@@ -42,7 +42,7 @@ static struct attribute *serdev_device_attrs[] = {
 };
 ATTRIBUTE_GROUPS(serdev_device);
 
-static int serdev_device_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int serdev_device_uevent(const struct device *dev, struct kobj_uevent_env *env)
 {
        int rc;
 
index 127fac1af6767a1181293326521c70d1108e263e..cc404bb7e8f776a894ec54a953e48f194283345c 100644 (file)
@@ -1819,11 +1819,11 @@ void usb_authorize_interface(struct usb_interface *intf)
        }
 }
 
-static int usb_if_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int usb_if_uevent(const struct device *dev, struct kobj_uevent_env *env)
 {
-       struct usb_device *usb_dev;
-       struct usb_interface *intf;
-       struct usb_host_interface *alt;
+       const struct usb_device *usb_dev;
+       const struct usb_interface *intf;
+       const struct usb_host_interface *alt;
 
        intf = to_usb_interface(dev);
        usb_dev = interface_to_usbdev(intf);
index 11b15d7b357add288e7d004bba610bdc89c3537f..8527c06b65e6566dda0fe6ede9e70aa50c6618dc 100644 (file)
@@ -423,9 +423,9 @@ static void usb_release_dev(struct device *dev)
        kfree(udev);
 }
 
-static int usb_dev_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int usb_dev_uevent(const struct device *dev, struct kobj_uevent_env *env)
 {
-       struct usb_device *usb_dev;
+       const struct usb_device *usb_dev;
 
        usb_dev = to_usb_device(dev);
 
index 1b24492bb4e5f6ddec9beb1dce608cc93922d0e9..4b468bde19cfb4f0a3725b8713850b622a5196ae 100644 (file)
@@ -80,7 +80,7 @@ static struct usb_phy *__of_usb_find_phy(struct device_node *node)
        return ERR_PTR(-EPROBE_DEFER);
 }
 
-static struct usb_phy *__device_to_usb_phy(struct device *dev)
+static struct usb_phy *__device_to_usb_phy(const struct device *dev)
 {
        struct usb_phy *usb_phy;
 
@@ -145,9 +145,9 @@ static void usb_phy_notify_charger_work(struct work_struct *work)
        kobject_uevent(&usb_phy->dev->kobj, KOBJ_CHANGE);
 }
 
-static int usb_phy_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int usb_phy_uevent(const struct device *dev, struct kobj_uevent_env *env)
 {
-       struct usb_phy *usb_phy;
+       const struct usb_phy *usb_phy;
        char uchger_state[50] = { 0 };
        char uchger_type[50] = { 0 };
        unsigned long flags;
index eacb46ec2ab30379e96b68672fef92553facf76c..56814ef80c24a5aa2aa2b484337a72c60f218427 100644 (file)
@@ -274,8 +274,7 @@ static const struct attribute_group *usb_role_switch_groups[] = {
        NULL,
 };
 
-static int
-usb_role_switch_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int usb_role_switch_uevent(const struct device *dev, struct kobj_uevent_env *env)
 {
        int ret;
 
index 5897905cb4f08bf095ce4389338ac454df5bf911..a89d8fd3f46ca4ccd56263527c8cea5293effdfb 100644 (file)
@@ -1737,7 +1737,7 @@ static const struct attribute_group *typec_groups[] = {
        NULL
 };
 
-static int typec_uevent(struct device *dev, struct kobj_uevent_env *env)
+static int typec_uevent(const struct device *dev, struct kobj_uevent_env *env)
 {
        int ret;
 
index 5e6a876e17ba0794cd05f128a264697a32329468..564b62f13bd0bcc664d23e7797ee343b2bc95cb9 100644 (file)
@@ -723,7 +723,7 @@ const struct acpi_device_id *acpi_match_device(const struct acpi_device_id *ids,
 const void *acpi_device_get_match_data(const struct device *dev);
 extern bool acpi_driver_match_device(struct device *dev,
                                     const struct device_driver *drv);
-int acpi_device_uevent_modalias(struct device *, struct kobj_uevent_env *);
+int acpi_device_uevent_modalias(const struct device *, struct kobj_uevent_env *);
 int acpi_device_modalias(struct device *, char *, int);
 
 struct platform_device *acpi_create_platform_device(struct acpi_device *,
@@ -958,7 +958,7 @@ static inline union acpi_object *acpi_evaluate_dsm(acpi_handle handle,
        return NULL;
 }
 
-static inline int acpi_device_uevent_modalias(struct device *dev,
+static inline int acpi_device_uevent_modalias(const struct device *dev,
                                struct kobj_uevent_env *env)
 {
        return -ENODEV;
index 44e3acae7b36e233aba803e2fdea2b4b2ef857a0..dad0614aad964398204f7e7ff34a75dc93773ee2 100644 (file)
@@ -88,7 +88,7 @@ int subsys_virtual_register(struct bus_type *subsys,
 struct device_type {
        const char *name;
        const struct attribute_group **groups;
-       int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
+       int (*uevent)(const struct device *dev, struct kobj_uevent_env *env);
        char *(*devnode)(struct device *dev, umode_t *mode,
                         kuid_t *uid, kgid_t *gid);
        void (*release)(struct device *dev);
index 68b558929aeca2e9c80398e7e69a7f192315735b..ce115ef08fec2db2cda67edfff22ac704bcb525b 100644 (file)
@@ -303,7 +303,7 @@ int i3c_device_do_priv_xfers(struct i3c_device *dev,
 
 int i3c_device_do_setdasa(struct i3c_device *dev);
 
-void i3c_device_get_info(struct i3c_device *dev, struct i3c_device_info *info);
+void i3c_device_get_info(const struct i3c_device *dev, struct i3c_device_info *info);
 
 struct i3c_ibi_payload {
        unsigned int len;
index 52eb66cd11bc96c031af9949d5bf03319600e192..d8c27f1e5559cb7018406e8031cc9c6d10033c60 100644 (file)
@@ -21,7 +21,7 @@ static inline int is_sdw_slave(const struct device *dev)
 int __sdw_register_driver(struct sdw_driver *drv, struct module *owner);
 void sdw_unregister_driver(struct sdw_driver *drv);
 
-int sdw_slave_uevent(struct device *dev, struct kobj_uevent_env *env);
+int sdw_slave_uevent(const struct device *dev, struct kobj_uevent_env *env);
 
 /**
  * module_sdw_driver() - Helper macro for registering a Soundwire driver