diff options
| author | Greg Kroah-Hartman <[email protected]> | 2023-01-11 12:30:03 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2023-01-27 13:45:28 +0100 |
| commit | a77ad4bf792652340ab334956e69b46ec2fdaefb (patch) | |
| tree | fcb8692b4f9218194cca346d0ed8af82385d0022 /include/linux | |
| parent | 8e3938a5d2d89d8a4b9688ba9cbec500640d401d (diff) | |
of: device: make of_device_uevent_modalias() take a const device *
of_device_uevent_modalias() does not modify the device pointer passed to
it, so mark it constant. In order to properly do this, a number of
busses need to have a modalias function added as they were attempting to
just point to of_device_uevent_modalias instead of their bus-specific
modalias function. This is fine except if the prototype for a bus and
device type modalias function diverges and then problems could happen. To
prevent all of that, just wrap the call to of_device_uevent_modalias()
directly for each bus and device type individually.
Cc: Michael Ellerman <[email protected]>
Cc: Nicholas Piggin <[email protected]>
Cc: Christophe Leroy <[email protected]>
Cc: Chen-Yu Tsai <[email protected]>
Cc: Jernej Skrabec <[email protected]>
Cc: Samuel Holland <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Frank Rowand <[email protected]>
Cc: Liang He <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Christophe JAILLET <[email protected]>
Cc: Thomas Zimmermann <[email protected]>
Cc: Dmitry Baryshkov <[email protected]>
Cc: Douglas Anderson <[email protected]>
Cc: Lyude Paul <[email protected]>
Cc: Corentin Labbe <[email protected]>
Cc: Zou Wei <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Acked-by: Hans de Goede <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/of_device.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/of_device.h b/include/linux/of_device.h index ab7d557d541d..f4b57614979d 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h @@ -36,7 +36,7 @@ extern ssize_t of_device_modalias(struct device *dev, char *str, ssize_t len); extern int of_device_request_module(struct device *dev); extern void of_device_uevent(const struct device *dev, struct kobj_uevent_env *env); -extern int of_device_uevent_modalias(struct device *dev, struct kobj_uevent_env *env); +extern int of_device_uevent_modalias(const struct device *dev, struct kobj_uevent_env *env); static inline struct device_node *of_cpu_device_node_get(int cpu) { @@ -83,7 +83,7 @@ static inline int of_device_request_module(struct device *dev) return -ENODEV; } -static inline int of_device_uevent_modalias(struct device *dev, +static inline int of_device_uevent_modalias(const struct device *dev, struct kobj_uevent_env *env) { return -ENODEV; |