Skip to contentSkip to conversation

Trivial patch for drivers/serial/8250_cs

PATCH Дамјан Георгиевски 3 participants 3 messages Aug 25, 2003 – Aug 26, 2003

lore
Share & tools
lore
#0 lore raw

This patch is against 2.6.0-test4.
It fixes the pcmcia serial driver to know its now called 8250_cs and not serial_cs...

Without this patch 8250_cs compiles but doesn't work.
All the patch does is change several "serial_cs" occurences to "8250_cs".

PS.
another possible sollution is to change everything (including the file name) from "8250_cs" to "serial_cs" like it is in 2.4

8250_cs.c renamed from 8250_cs.c~ +11 -11
@@ -2,7 +2,7 @@
 
     A driver for PCMCIA serial devices
 
-    serial_cs.c 1.134 2002/05/04 05:48:53
+    8250_cs.c 1.134 2002/05/04 05:48:53
 
     The contents of this file are subject to the Mozilla Public
     License Version 1.1 (the "License"); you may not use this file
@@ -58,7 +58,7 @@
 static int pc_debug = PCMCIA_DEBUG;
 MODULE_PARM(pc_debug, "i");
 #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
-static char *version = "serial_cs.c 1.134 2002/05/04 05:48:53 (David Hinds)";
+static char *version = "8250_cs.c 1.134 2002/05/04 05:48:53 (David Hinds)";
 #else
 #define DEBUG(n, args...)
 #endif
@@ -116,7 +116,7 @@
 static int serial_event(event_t event, int priority,
 			event_callback_args_t * args);
 
-static dev_info_t dev_info = "serial_cs";
+static dev_info_t dev_info = "8250_cs";
 
 static dev_link_t *serial_attach(void);
 static void serial_detach(dev_link_t *);
@@ -281,7 +281,7 @@
 		serial.flags |= UPF_BUGGY_UART;
 	line = register_serial(&serial);
 	if (line < 0) {
-		printk(KERN_NOTICE "serial_cs: register_serial() at 0x%04lx,"
+		printk(KERN_NOTICE "8250_cs: register_serial() at 0x%04lx,"
 		       " irq %d failed\n", (u_long) serial.port, serial.irq);
 		return -EINVAL;
 	}
@@ -401,7 +401,7 @@
       found_port:
 	if (i != CS_SUCCESS) {
 		printk(KERN_NOTICE
-		       "serial_cs: no usable port range found, giving up\n");
+		       "8250_cs: no usable port range found, giving up\n");
 		cs_error(link->handle, RequestIO, i);
 		return -1;
 	}
@@ -497,7 +497,7 @@
 	i = CardServices(RequestIRQ, link->handle, &link->irq);
 	if (i != CS_SUCCESS) {
 		printk(KERN_NOTICE
-		       "serial_cs: no usable port range found, giving up\n");
+		       "8250_cs: no usable port range found, giving up\n");
 		cs_error(link->handle, RequestIRQ, i);
 		link->irq.AssignedIRQ = 0;
 	}
@@ -686,18 +686,18 @@
 static struct pcmcia_driver serial_cs_driver = {
 	.owner		= THIS_MODULE,
 	.drv		= {
-		.name	= "serial_cs",
+		.name	= "8250_cs",
 	},
 	.attach		= serial_attach,
 	.detach		= serial_detach,
 };
 
-static int __init init_serial_cs(void)
+static int __init init_8250_cs(void)
 {
 	return pcmcia_register_driver(&serial_cs_driver);
 }
 
-static void __exit exit_serial_cs(void)
+static void __exit exit_8250_cs(void)
 {
 	pcmcia_unregister_driver(&serial_cs_driver);
 
@@ -706,7 +706,7 @@
 		serial_detach(dev_list);
 }
 
-module_init(init_serial_cs);
-module_exit(exit_serial_cs);
+module_init(init_8250_cs);
+module_exit(exit_8250_cs);
 
 MODULE_LICENSE("GPL");
#1 lore raw
Quoted 5 lines · ???????????? ??????????????????????

This patch is against 2.6.0-test4.
It fixes the pcmcia serial driver to know its now called 8250_cs and not serial_cs...

Without this patch 8250_cs compiles but doesn't work.

What do you mean by "doesn't work", exactly? The existing name should work if you have:

device "serial_cs" module "8250_cs"

in /etc/pcmcia/config. With your patch, it would work with:

device "8250_cs" module "8250_cs"

(and also changing every instance of serial_cs to 8250_cs)

Quoted 5 lines

All the patch does is change several "serial_cs" occurences to "8250_cs".

PS.
another possible sollution is to change everything (including the file name) from "8250_cs" to "serial_cs" like it is in 2.4

I would say that "serial_cs" is more accurate since this is the driver for cards that conform to the standard for PCMCIA serial interfaces. Renaming to "8250_cs" is obfuscatory and pointlessly breaks config files for previous kernel versions. It is second in foolishness only to the genious who thought renaming "ide_cs" to "ide-cs" was a good idea.

-- Dave

P.S. -- your email name ('???...') is a good way to target your email to the spam bucket; I almost discarded it myself.

#2 lore raw
Quoted 6 lines · David Hinds

I would say that "serial_cs" is more accurate since this is the driver for cards that conform to the standard for PCMCIA serial interfaces. Renaming to "8250_cs" is obfuscatory and pointlessly breaks config files for previous kernel versions. It is second in foolishness only to the genious who thought renaming "ide_cs" to "ide-cs" was a good idea.

Yep, and I've also said that I intend changing it back to serial_cs. I just haven't gotten around to it yet.

Signature · 2 lines
Russell King ([email protected])                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html