]> Git Repo - J-linux.git/commitdiff
HID: make ishtp_cl_bus_type const
authorGreg Kroah-Hartman <[email protected]>
Wed, 20 Dec 2023 07:38:47 +0000 (08:38 +0100)
committerJiri Kosina <[email protected]>
Tue, 2 Jan 2024 10:25:28 +0000 (11:25 +0100)
Now that the driver core can properly handle constant struct bus_type,
move the ishtp_cl_bus_type variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

Cc: Srinivas Pandruvada <[email protected]>
Cc: Jiri Kosina <[email protected]>
Cc: Benjamin Tissoires <[email protected]>
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Acked-by: Srinivas Pandruvada <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
drivers/hid/intel-ish-hid/ishtp/bus.c

index 7fc738a223755601e50e51cecbf8f985e6241f01..aa6cb033bb06b77f182e6df441a04e1b016aaef5 100644 (file)
@@ -378,7 +378,7 @@ static const struct dev_pm_ops ishtp_cl_bus_dev_pm_ops = {
        .restore = ishtp_cl_device_resume,
 };
 
-static struct bus_type ishtp_cl_bus_type = {
+static const struct bus_type ishtp_cl_bus_type = {
        .name           = "ishtp",
        .dev_groups     = ishtp_cl_dev_groups,
        .probe          = ishtp_cl_device_probe,
This page took 0.049785 seconds and 4 git commands to generate.