lkml.org 
[lkml]   [2000]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: stallion.c patch for devfs - fixed version checking
Date
On Mon, 04 Sep 2000, Richard Gooch wrote:
>Russell Coker writes:
>> I made the following patch for the stallion non-intelligent driver based on
>> cut/paste from serial.c. I have tested it and it works, the directories
>> /dev/tte and /dev/cue are correctly created when the module is inserted.
>>
>> Could this please be put in to 2.4.0-test8?
>>
>> Please note that this patch is to be applied after the stallion.c file has
>> been moved from the drivers/media/video directory to the drivers/char
>> directory.
>
>So submit a patch that will do this: it will make is easier on
>Linus. And we all know what that means...

True, however I would expect that moving a file is easier than applying a
patch (if he applies a patch then he'll probably want to eyeball it to make
sure it's not obviously wrong - stallion.c would make a reasonable sized
patch).
Anyway I have just been informed that the file has already been moved in the
pre-test8 patch.

>> +#if (LINUX_VERSION_CODE > 0x2032D && defined(CONFIG_DEVFS_FS))
>
>This is overkill. All you need is CONFIG_DEVFS_FS. It makes no sense
>to tie it to kernel versions.

That sounds logical, I have attached a patch that does that change and
changes serial.c (the code I copied from) in the same fashion.

Linus, please merge this in the next test release.


Russell Cokerdiff -ru linux-2.4.0-test7/drivers/char/serial.c new/drivers/char/serial.c
--- linux-2.4.0-test7/drivers/char/serial.c Mon Sep 4 20:23:33 2000
+++ new/drivers/char/serial.c Mon Sep 4 20:24:32 2000
@@ -5131,7 +5131,7 @@
#if (LINUX_VERSION_CODE > 0x20100)
serial_driver.driver_name = "serial";
#endif
-#if (LINUX_VERSION_CODE > 0x2032D && defined(CONFIG_DEVFS_FS))
+#ifdef CONFIG_DEVFS_FS
serial_driver.name = "tts/%d";
#else
serial_driver.name = "ttyS";
@@ -5179,7 +5179,7 @@
* major number and the subtype code.
*/
callout_driver = serial_driver;
-#if (LINUX_VERSION_CODE > 0x2032D && defined(CONFIG_DEVFS_FS))
+#ifdef CONFIG_DEVFS_FS
callout_driver.name = "cua/%d";
#else
callout_driver.name = "cua";
diff -ru linux-2.4.0-test7/drivers/char/stallion.c new/drivers/char/stallion.c
--- linux-2.4.0-test7/drivers/char/stallion.c Mon Sep 4 18:52:05 2000
+++ new/drivers/char/stallion.c Mon Sep 4 20:25:00 2000
@@ -138,8 +138,13 @@
static char *stl_drvtitle = "Stallion Multiport Serial Driver";
static char *stl_drvname = "stallion";
static char *stl_drvversion = "5.6.0";
+#ifdef CONFIG_DEVFS_FS
+static char *stl_serialname = "tte/%d";
+static char *stl_calloutname = "cue/%d";
+#else
static char *stl_serialname = "ttyE";
static char *stl_calloutname = "cue";
+#endif

static struct tty_driver stl_serial;
static struct tty_driver stl_callout;
\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.576 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site