diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-01-05 13:38:08 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-01-24 21:17:33 +0300 |
commit | 9914cd29453564568668db8147973dba348c12ee (patch) | |
tree | 5cf09d2cc949ec3ee54822b4c98df3b74850ab15 /drivers/staging/greybus | |
parent | 1cc357dd4e9563c9796f84f3777e4877e1f7ad86 (diff) | |
download | linux-9914cd29453564568668db8147973dba348c12ee.tar.xz |
staging: greybus: gbphy: make gbphy_bus_type const
Now that the driver core can properly handle constant struct bus_type,
move the gbphy_bus_type variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.
Cc: Alex Elder <elder@kernel.org>
Cc: greybus-dev@lists.linaro.org
Cc: linux-staging@lists.linux.dev
Reviewed-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/2024010508-fossil-glove-c2c6@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/greybus')
-rw-r--r-- | drivers/staging/greybus/gbphy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/greybus/gbphy.c b/drivers/staging/greybus/gbphy.c index 6a7d8cf2a1eb..1c41b008ba39 100644 --- a/drivers/staging/greybus/gbphy.c +++ b/drivers/staging/greybus/gbphy.c @@ -182,7 +182,7 @@ static void gbphy_dev_remove(struct device *dev) pm_runtime_dont_use_autosuspend(dev); } -static struct bus_type gbphy_bus_type = { +static const struct bus_type gbphy_bus_type = { .name = "gbphy", .match = gbphy_dev_match, .probe = gbphy_dev_probe, |