linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* patch "maple: make maple_bus_type static and const" added to char-misc-testing
@ 2024-01-04 13:37 gregkh
  2024-01-04 13:48 ` John Paul Adrian Glaubitz
  0 siblings, 1 reply; 15+ messages in thread
From: gregkh @ 2024-01-04 13:37 UTC (permalink / raw)
  To: gregkh, dalias, glaubitz, linux-sh, ysato


This is a note to let you know that I've just added the patch titled

    maple: make maple_bus_type static and const

to my char-misc git tree which can be found at
    git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-testing branch.

The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)

The patch will be merged to the char-misc-next branch sometime soon,
after it passes testing, and the merge window is open.

If you have any questions about this process, please let me know.


From e76933a9bfa9b7f28a387f2e13cb3e689adc200d Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: Tue, 19 Dec 2023 15:06:19 +0100
Subject: maple: make maple_bus_type static and const

There is no need to export maple_bus_type as no one uses it outside of
maple.c, so make it static, AND make it const as it can be read-only as
no one modifies it.

Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: <linux-sh@vger.kernel.org>
Link: https://lore.kernel.org/r/2023121918-rejoicing-frostlike-d976@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/sh/maple/maple.c | 4 ++--
 include/linux/maple.h    | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/sh/maple/maple.c b/drivers/sh/maple/maple.c
index e05473c5c267..16018009a5a6 100644
--- a/drivers/sh/maple/maple.c
+++ b/drivers/sh/maple/maple.c
@@ -59,6 +59,7 @@ struct maple_device_specify {
 static bool checked[MAPLE_PORTS];
 static bool empty[MAPLE_PORTS];
 static struct maple_device *baseunits[MAPLE_PORTS];
+static const struct bus_type maple_bus_type;
 
 /**
  * maple_driver_register - register a maple driver
@@ -773,11 +774,10 @@ static struct maple_driver maple_unsupported_device = {
 /*
  * maple_bus_type - core maple bus structure
  */
-struct bus_type maple_bus_type = {
+static const struct bus_type maple_bus_type = {
 	.name = "maple",
 	.match = maple_match_bus_driver,
 };
-EXPORT_SYMBOL_GPL(maple_bus_type);
 
 static struct device maple_bus = {
 	.init_name = "maple",
diff --git a/include/linux/maple.h b/include/linux/maple.h
index 9b140272ee16..9aae44efcfd4 100644
--- a/include/linux/maple.h
+++ b/include/linux/maple.h
@@ -5,7 +5,6 @@
 #include <mach/maple.h>
 
 struct device;
-extern struct bus_type maple_bus_type;
 
 /* Maple Bus command and response codes */
 enum maple_code {
-- 
2.43.0



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

end of thread, other threads:[~2024-01-07 21:46 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-04 13:37 patch "maple: make maple_bus_type static and const" added to char-misc-testing gregkh
2024-01-04 13:48 ` John Paul Adrian Glaubitz
2024-01-04 13:57   ` Greg KH
2024-01-04 14:02     ` John Paul Adrian Glaubitz
2024-01-04 14:16       ` Geert Uytterhoeven
2024-01-04 14:20       ` Greg KH
2024-01-04 14:41         ` John Paul Adrian Glaubitz
2024-01-04 16:01           ` Geert Uytterhoeven
2024-01-04 18:44             ` John Paul Adrian Glaubitz
2024-01-05  7:34               ` Greg KH
2024-01-05  9:38                 ` John Paul Adrian Glaubitz
2024-01-05  9:45                   ` Greg KH
2024-01-07 21:39                     ` John Paul Adrian Glaubitz
2024-01-05  9:13               ` Geert Uytterhoeven
2024-01-07 21:46                 ` John Paul Adrian Glaubitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).