* [PATCH] staging: greybus: gbphy: make gbphy_bus_type const
@ 2024-01-05 10:38 Greg Kroah-Hartman
2024-01-05 10:47 ` Johan Hovold
0 siblings, 1 reply; 2+ messages in thread
From: Greg Kroah-Hartman @ 2024-01-05 10:38 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, Johan Hovold, Alex Elder, greybus-dev,
linux-staging
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: Johan Hovold <johan@kernel.org>
Cc: Alex Elder <elder@kernel.org>
Cc: greybus-dev@lists.linaro.org
Cc: linux-staging@lists.linux.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/greybus/gbphy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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,
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] staging: greybus: gbphy: make gbphy_bus_type const
2024-01-05 10:38 [PATCH] staging: greybus: gbphy: make gbphy_bus_type const Greg Kroah-Hartman
@ 2024-01-05 10:47 ` Johan Hovold
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hovold @ 2024-01-05 10:47 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-kernel, Alex Elder, greybus-dev, linux-staging
On Fri, Jan 05, 2024 at 11:38:08AM +0100, Greg Kroah-Hartman wrote:
> 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: Johan Hovold <johan@kernel.org>
> Cc: Alex Elder <elder@kernel.org>
> Cc: greybus-dev@lists.linaro.org
> Cc: linux-staging@lists.linux.dev
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Johan Hovold <johan@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-05 10:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-05 10:38 [PATCH] staging: greybus: gbphy: make gbphy_bus_type const Greg Kroah-Hartman
2024-01-05 10:47 ` Johan Hovold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox