The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Jonathan McDowell <noodles@earth.li>
To: linux-parport@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] parport_pc MODULE_PARM fix
Date: Mon, 6 Dec 2004 18:02:42 +0000	[thread overview]
Message-ID: <20041206180242.GJ10285@earth.li> (raw)

[I hope sending this to just the linux-parport list is the right thing
to do; I'm assuming the maintainers read it and don't want individual
CCs as well.]

In the 2.6.10-rc releases parport_pc doesn't seem to want to take any
module parameters:

parport_pc: Ignoring new-style parameters in presence of obsolete ones
parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE]
parport0: irq 7 detected

I need to pass parameters to the module to make it detect my port fully
(the printer doesn't seem to want to print more than a page or so
without an irq in use). With the patch below, against 2.6.10-rc3 I can
do so and get:

parport0: PC-style at 0x378 (0x778), irq 7, dma 3 [PCSPP,TRISTATE,COMPAT,ECP,DMA]

------
--- drivers/parport/parport_pc.c.orig	2004-12-06 17:44:08.000000000 +0000
+++ drivers/parport/parport_pc.c	2004-12-06 17:49:59.000000000 +0000
@@ -3157,7 +3157,7 @@
 #ifdef CONFIG_PCI
 static int __init parport_init_mode_setup(char *str)
 {
-	printk(KERN_DEBUG "parport_pc.c: Specified parameter parport_init_mode=%s\n", str);
+	DPRINTK(KERN_DEBUG "parport_pc.c: Specified parameter parport_init_mode=%s\n", str);
 
 	if (!strcmp (str, "spp"))
 		parport_init_mode=1;
@@ -3176,7 +3176,7 @@
 #ifdef MODULE
 static const char *irq[PARPORT_PC_MAX_PORTS];
 static const char *dma[PARPORT_PC_MAX_PORTS];
-static char *init_mode;
+static char init_mode[7];
 
 MODULE_PARM_DESC(io, "Base I/O address (SPP regs)");
 module_param_array(io, int, NULL, 0);
@@ -3193,7 +3193,7 @@
 #endif
 #ifdef CONFIG_PCI
 MODULE_PARM_DESC(init_mode, "Initialise mode for VIA VT8231 port (spp, ps2, epp, ecp or ecpepp)");
-MODULE_PARM(init_mode, "s");
+module_param_string(init_mode, init_mode, 7, 0);
 #endif
 
 static int __init parse_parport_params(void)
------

J.

-- 
                                            jid: noodles@jabber.earth.li
Where are we going?  And WHY ARE WE IN
                                            THIS HANDBASKET?!!

             reply	other threads:[~2004-12-06 18:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-06 18:02 Jonathan McDowell [this message]
2004-12-06 17:44 ` [PATCH] parport_pc MODULE_PARM fix Randy.Dunlap
2004-12-06 18:24   ` Jonathan McDowell

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=20041206180242.GJ10285@earth.li \
    --to=noodles@earth.li \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parport@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox