All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@osdl.org>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Vojtech Pavlik <vojtech@suse.cz>
Subject: Re: 2.6.10-rc1-mm1
Date: Wed, 27 Oct 2004 00:42:34 -0500	[thread overview]
Message-ID: <200410270042.34224.dtor_core@ameritech.net> (raw)
In-Reply-To: <20041026213156.682f35ca.akpm@osdl.org>

On Tuesday 26 October 2004 11:31 pm, Andrew Morton wrote: 
> +remove-module_parm-from-allyesconfig-almost.patch
> 
>  Move lots of MODULE_PARMs to module_param()
> 

Please consider applying the patch below for parkbd instead of
Rusty's changes. I find parameter names in form of parkbd.parkbd
and parkbd.parkbd_mode extremely ugly.

The patch is against Linus's -bk.

-- 
Dmitry


===================================================================


ChangeSet@1.1994, 2004-10-27 00:40:17-05:00, dtor_core@ameritech.net
  Input: parkbd - switch to use module_param. Parameter names are
         parkbd.port and parkbd.mode
  
  Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


 Documentation/kernel-parameters.txt |    7 +++++++
 drivers/input/serio/parkbd.c        |   19 ++++++++-----------
 2 files changed, 15 insertions(+), 11 deletions(-)


===================================================================



diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
--- a/Documentation/kernel-parameters.txt	2004-10-27 00:40:58 -05:00
+++ b/Documentation/kernel-parameters.txt	2004-10-27 00:40:58 -05:00
@@ -844,6 +844,13 @@
 	panic=		[KNL] Kernel behaviour on panic
 			Format: <timeout>
 
+	parkbd.port=	[HW] Parallel port number the keyboard adapter is
+			connected to, default is 0.
+			Format: <parport#>
+	parkbd.mode=	[HW] Parallel port keyboard adapter mode of operation,
+			0 for XT, 1 for AT (default is AT).
+			Format: <mode> 
+
 	parport=0	[HW,PPT]	Specify parallel ports. 0 disables.
 	parport=auto			Use 'auto' to force the driver to use
 	parport=0xBBB[,IRQ[,DMA]]	any IRQ/DMA settings detected (the
diff -Nru a/drivers/input/serio/parkbd.c b/drivers/input/serio/parkbd.c
--- a/drivers/input/serio/parkbd.c	2004-10-27 00:40:58 -05:00
+++ b/drivers/input/serio/parkbd.c	2004-10-27 00:40:58 -05:00
@@ -37,15 +37,17 @@
 MODULE_DESCRIPTION("Parallel port to Keyboard port adapter driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(parkbd, "1i");
-MODULE_PARM(parkbd_mode, "1i");
+static unsigned int parkbd_pp_no;
+module_param_named(port, parkbd_pp_no, int, 0);
+MODULE_PARM_DESC(port, "Parallel port the adapter is connected to (default is 0)");
+
+static unsigned int parkbd_mode = SERIO_8042;
+module_param_named(mode, parkbd_mode, uint, 0);
+MODULE_PARM_DESC(mode, "Mode of operation: XT = 0/AT = 1 (default)");
 
 #define PARKBD_CLOCK	0x01	/* Strobe & Ack */
 #define PARKBD_DATA	0x02	/* AutoFd & Busy */
 
-static int parkbd;
-static int parkbd_mode = SERIO_8042;
-
 static int parkbd_buffer;
 static int parkbd_counter;
 static unsigned long parkbd_last;
@@ -126,12 +128,7 @@
 {
 	struct parport *pp;
 
-	if (parkbd < 0) {
-		printk(KERN_ERR "parkbd: no port specified\n");
-		return -ENODEV;
-	}
-
-	pp = parport_find_number(parkbd);
+	pp = parport_find_number(parkbd_pp_no);
 
 	if (pp == NULL) {
 		printk(KERN_ERR "parkbd: no such parport\n");

  reply	other threads:[~2004-10-27  5:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-27  4:31 2.6.10-rc1-mm1 Andrew Morton
2004-10-27  5:42 ` Dmitry Torokhov [this message]
2004-10-27  5:51   ` 2.6.10-rc1-mm1 Andrew Morton
2004-10-27  6:31     ` 2.6.10-rc1-mm1 Dmitry Torokhov
2004-10-27  6:07   ` 2.6.10-rc1-mm1 Dmitry Torokhov
2004-10-27  6:07 ` 2.6.10-rc1-mm1 James Morris
2004-10-27  6:33   ` 2.6.10-rc1-mm1 Andrew Morton
2004-10-27  8:14     ` 2.6.10-rc1-mm1 James Morris
2004-10-27  9:20       ` 2.6.10-rc1-mm1 Andrew Morton
2004-10-27 14:52         ` 2.6.10-rc1-mm1 James Morris
2004-10-27 11:11 ` 2.6.10-rc1-mm1: reiser4 delete_from_page_cache compile error Adrian Bunk
2004-10-27 12:13   ` Hugh Dickins
2004-10-27 11:19 ` 2.6.10-rc1-mm1: ipc/mqueue.c: remove unused label Adrian Bunk
2004-10-27 11:32 ` 2.6.10-rc1-mm1 Mathieu Segaud
2004-10-27 14:18   ` 2.6.10-rc1-mm1 Adrian Bunk
2004-10-27 16:42 ` 2.6.10-rc1-mm1 (compile stats) John Cherry
2004-10-27 20:34   ` Andrew Morton
2004-10-28  0:12     ` John Cherry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200410270042.34224.dtor_core@ameritech.net \
    --to=dtor_core@ameritech.net \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=vojtech@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.