linux-s390.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] s390/con3215: Use macros for hardcoded values
@ 2025-07-09 18:00 Xose Vazquez Perez
  2025-07-09 19:10 ` Xose Vazquez Perez
  0 siblings, 1 reply; 2+ messages in thread
From: Xose Vazquez Perez @ 2025-07-09 18:00 UTC (permalink / raw)
  Cc: Xose Vazquez Perez, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev, Christian Borntraeger, Sven Schnelle, S390 ML

Similar as in sclp_vt220

Cc: Heiko Carstens <hca@linux.ibm.com> (maintainer:S390 ARCHITECTURE,commit_signer:1/2=50%)
Cc: Vasily Gorbik <gor@linux.ibm.com> (maintainer:S390 ARCHITECTURE)
Cc: Alexander Gordeev <agordeev@linux.ibm.com> (maintainer:S390 ARCHITECTURE)
Cc: Christian Borntraeger <borntraeger@linux.ibm.com> (reviewer:S390 ARCHITECTURE)
Cc: Sven Schnelle <svens@linux.ibm.com> (reviewer:S390 ARCHITECTURE,commit_signer:1/2=50%)
Cc: S390 ML <linux-s390@vger.kernel.org> (open list:S390 ARCHITECTURE
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
---
Trivial, but uncompiled!!
---
 drivers/s390/char/con3215.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c
index 56e43d43c713..1519694c48f0 100644
--- a/drivers/s390/char/con3215.c
+++ b/drivers/s390/char/con3215.c
@@ -35,6 +35,12 @@
 
 #include "ctrlchar.h"
 
+#define RAW3215_MAJOR		TTY_MAJOR
+#define RAW3215_MINOR		64
+#define RAW3215_DRIVER_NAME	"tty3215"
+#define RAW3215_DEVICE_NAME	"ttyS"
+#define RAW3215_CONSOLE_NAME	"3215"
+
 #define NR_3215		    1
 #define NR_3215_REQ	    (4*NR_3215)
 #define RAW3215_BUFFER_SIZE 65536     /* output buffer size */
@@ -813,7 +819,7 @@ static const struct attribute_group *con3215_drv_attr_groups[] = {
 
 static struct ccw_driver raw3215_ccw_driver = {
 	.driver = {
-		.name	= "3215",
+		.name	= RAW3215_CONSOLE_NAME,
 		.groups = con3215_drv_attr_groups,
 		.owner	= THIS_MODULE,
 	},
@@ -887,7 +893,7 @@ static struct notifier_block on_reboot_nb = {
  *  The console structure for the 3215 console
  */
 static struct console con3215 = {
-	.name	 = "ttyS",
+	.name	 = RAW3215_DEVICE_NAME,
 	.write	 = con3215_write,
 	.device	 = con3215_device,
 	.flags	 = CON_PRINTBUFFER,
@@ -1168,10 +1174,10 @@ static int __init tty3215_init(void)
 	 * proc_entry, set_termios, flush_buffer, set_ldisc, write_proc
 	 */
 
-	driver->driver_name = "tty3215";
-	driver->name = "ttyS";
-	driver->major = TTY_MAJOR;
-	driver->minor_start = 64;
+	driver->driver_name = RAW3215_DRIVER_NAME;
+	driver->name = RAW3215_DEVICE_NAME;
+	driver->major = RAW3215_MAJOR;
+	driver->minor_start = RAW3215_MINOR;
 	driver->type = TTY_DRIVER_TYPE_SYSTEM;
 	driver->subtype = SYSTEM_TYPE_TTY;
 	driver->init_termios = tty_std_termios;
-- 
2.50.0


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

end of thread, other threads:[~2025-07-09 19:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-09 18:00 [PATCH] s390/con3215: Use macros for hardcoded values Xose Vazquez Perez
2025-07-09 19:10 ` Xose Vazquez Perez

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).