aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-13 19:29:17 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-23 13:21:58 +0100
commitd492cc2573a08352c48a66d3e3f312a15fb3f363 (patch)
treef1567d01293c8f82c156b39c0b442649d8280af0 /include/linux/device.h
parentiommu: make the pointer to struct bus_type constant (diff)
downloadwireguard-linux-d492cc2573a08352c48a66d3e3f312a15fb3f363.tar.xz
wireguard-linux-d492cc2573a08352c48a66d3e3f312a15fb3f363.zip
driver core: device.h: make struct bus_type a const *
Now that all users who accessed the bus_type structure in struct device are properly using it as a const *, mark it as such so that no one can modify it going forward anymore. Cc: "Rafael J. Wysocki" <rafael@kernel.org> Link: https://lore.kernel.org/r/20230313182918.1312597-35-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 862397ae520d..3b23772d3bbb 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -566,7 +566,7 @@ struct device {
const char *init_name; /* initial name of the device */
const struct device_type *type;
- struct bus_type *bus; /* type of bus device is on */
+ const struct bus_type *bus; /* type of bus device is on */
struct device_driver *driver; /* which driver has allocated this
device */
void *platform_data; /* Platform specific data, device