From: Greg KH <greg@kroah.com>
To: Jason Dravet <dravet@hotmail.com>
Cc: linux-kernel@vger.kernel.org, linux-parport@lists.infradead.org
Subject: Re: [RFC]: add sysfs support to parport_pc, v3
Date: Tue, 3 Jan 2006 17:08:41 -0800 [thread overview]
Message-ID: <20060104010841.GA19541@kroah.com> (raw)
In-Reply-To: <BAY103-F835CFFD193D6F76C5527FDF2D0@phx.gbl>
On Mon, Jan 02, 2006 at 09:39:50AM -0600, Jason Dravet wrote:
> Here is a new patch to parport_pc that adds sysfs and thus udev support to
> parport_pc. I fixed my earilier problem of the kernel oops (I forgot the
> class_destory) and I can insmod and rmmod this module all day long with no
> side effects. I do have one question why do both lp and parport nodes have
> to be created?
>
> What do you think of this patch? What would be the next step to get this
> into the kernel?
>
> Thanks,
> Jason Dravet
>
> signed-off-by: Jason Dravet <dravet@hotmail.com>
"Signed-off-by:"
>
> --- /usr/src/linux-2.6.14/drivers/parport/parport_pc.c.orig 2005-12-30
> 13:52:48.000000000 -0600
> +++ /usr/src/linux-2.6.14/drivers/parport/parport_pc.c 2006-01-01
> 11:29:05.000000000 -0600
Line wrapped so it can't be applied :(
> @@ -14,6 +14,7 @@
> * More PCI support now conditional on CONFIG_PCI, 03/2001, Paul G.
> * Various hacks, Fred Barnes, 04/2001
> * Updated probing logic - Adam Belay <ambx1@neo.rr.com>
> + * Added sysfs and udev - Jason Dravet <dravet@hotmail.com>
> */
Doesn't belong here, this goes in the change log.
>
> /* This driver should work with any hardware that is broadly compatible
> @@ -55,6 +56,7 @@
> #include <linux/pci.h>
> #include <linux/pnp.h>
> #include <linux/sysctl.h>
> +#include <linux/sysfs.h>
Your email client also ate the leading spaces :(
>
> #include <asm/io.h>
> #include <asm/dma.h>
> @@ -99,6 +101,9 @@ static struct superio_struct { /* For Su
> int dma;
> } superios[NR_SUPERIOS] __devinitdata = { {0,},};
>
> +static struct class *parallel_class;
> +int countports = 0;
> +
> static int user_specified;
> #if defined(CONFIG_PARPORT_PC_SUPERIO) || \
> (defined(CONFIG_PARPORT_1284) && defined(CONFIG_PARPORT_PC_FIFO))
> @@ -2232,6 +2237,11 @@ struct parport *parport_pc_probe_port (u
> is mandatory (see above) */
> p->dma = PARPORT_DMA_NONE;
>
> + parallel_class = class_create(THIS_MODULE, "lp");
> + class_device_create(parallel_class, NULL, MKDEV(6, countports),
> NULL, "lp%i", countports);
> + class_device_create(parallel_class, NULL, MKDEV(99, countports),
> NULL, "parport%i", countports);
> + countports++;
What does the 6 and 99 come from? Aren't these #defined in a header
file somewhere?
thanks,
greg k-h
next prev parent reply other threads:[~2006-01-04 1:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-02 15:39 [RFC]: add sysfs support to parport_pc, v3 Jason Dravet
2006-01-02 19:50 ` [Linux-parport] " Marko Kohtala
2006-01-04 1:08 ` Greg KH [this message]
2006-01-04 3:24 ` Jason Dravet
2006-01-04 9:14 ` Jan Engelhardt
2006-01-04 22:31 ` Andrew Morton
2006-01-05 16:17 ` Marko Kohtala
2006-01-05 21:25 ` Kay Sievers
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=20060104010841.GA19541@kroah.com \
--to=greg@kroah.com \
--cc=dravet@hotmail.com \
--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