mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mux: constify mux class
@ 2024-10-14 12:25 Bartosz Golaszewski
  2024-10-24 19:08 ` Bartosz Golaszewski
  0 siblings, 1 reply; 5+ messages in thread
From: Bartosz Golaszewski @ 2024-10-14 12:25 UTC (permalink / raw)
  To: Peter Rosin; +Cc: linux-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

All class functions used here take a const pointer to the class
structure so we can make the struct itself constant.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 drivers/mux/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mux/core.c b/drivers/mux/core.c
index 78c0022697ec..02be4ba37257 100644
--- a/drivers/mux/core.c
+++ b/drivers/mux/core.c
@@ -42,7 +42,7 @@ struct mux_state {
 	unsigned int state;
 };
 
-static struct class mux_class = {
+static const struct class mux_class = {
 	.name = "mux",
 };
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-11-30 15:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-14 12:25 [PATCH] mux: constify mux class Bartosz Golaszewski
2024-10-24 19:08 ` Bartosz Golaszewski
2024-11-01 14:21   ` Bartosz Golaszewski
2024-11-05 21:53     ` Peter Rosin
2024-11-30 15:37       ` Bartosz Golaszewski

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®