* [PATCH] mfd: mcp-core: make mcp_bus_type const
@ 2024-02-04 20:10 Ricardo B. Marliere
2024-02-05 12:48 ` Greg Kroah-Hartman
2024-02-08 14:13 ` (subset) " Lee Jones
0 siblings, 2 replies; 3+ messages in thread
From: Ricardo B. Marliere @ 2024-02-04 20:10 UTC (permalink / raw)
To: Lee Jones; +Cc: linux-kernel, Greg Kroah-Hartman, Ricardo B. Marliere
Now that the driver core can properly handle constant struct bus_type,
move the mcp_bus_type variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
---
drivers/mfd/mcp-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/mcp-core.c b/drivers/mfd/mcp-core.c
index 2fa592c37c6f..16ca23311cab 100644
--- a/drivers/mfd/mcp-core.c
+++ b/drivers/mfd/mcp-core.c
@@ -41,7 +41,7 @@ static void mcp_bus_remove(struct device *dev)
drv->remove(mcp);
}
-static struct bus_type mcp_bus_type = {
+static const struct bus_type mcp_bus_type = {
.name = "mcp",
.match = mcp_bus_match,
.probe = mcp_bus_probe,
---
base-commit: 1e0ea9e75ff3f395ad6f85f0be2258ef114a53dc
change-id: 20240204-bus_cleanup-mfd-6ffb8bdbe13c
Best regards,
--
Ricardo B. Marliere <ricardo@marliere.net>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mfd: mcp-core: make mcp_bus_type const
2024-02-04 20:10 [PATCH] mfd: mcp-core: make mcp_bus_type const Ricardo B. Marliere
@ 2024-02-05 12:48 ` Greg Kroah-Hartman
2024-02-08 14:13 ` (subset) " Lee Jones
1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2024-02-05 12:48 UTC (permalink / raw)
To: Ricardo B. Marliere; +Cc: Lee Jones, linux-kernel
On Sun, Feb 04, 2024 at 05:10:32PM -0300, Ricardo B. Marliere wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the mcp_bus_type variable to be a constant structure as well,
> placing it into read-only memory which can not be modified at runtime.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: (subset) [PATCH] mfd: mcp-core: make mcp_bus_type const
2024-02-04 20:10 [PATCH] mfd: mcp-core: make mcp_bus_type const Ricardo B. Marliere
2024-02-05 12:48 ` Greg Kroah-Hartman
@ 2024-02-08 14:13 ` Lee Jones
1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2024-02-08 14:13 UTC (permalink / raw)
To: Lee Jones, Ricardo B. Marliere; +Cc: linux-kernel, Greg Kroah-Hartman
On Sun, 04 Feb 2024 17:10:32 -0300, Ricardo B. Marliere wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the mcp_bus_type variable to be a constant structure as well,
> placing it into read-only memory which can not be modified at runtime.
>
>
Applied, thanks!
[1/1] mfd: mcp-core: make mcp_bus_type const
commit: a940faea35c0bbdc0b2e563cc3b75c1b120e3ae8
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-08 14:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-04 20:10 [PATCH] mfd: mcp-core: make mcp_bus_type const Ricardo B. Marliere
2024-02-05 12:48 ` Greg Kroah-Hartman
2024-02-08 14:13 ` (subset) " Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®