Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965296AbWADWdj (ORCPT ); Wed, 4 Jan 2006 17:33:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965292AbWADWdj (ORCPT ); Wed, 4 Jan 2006 17:33:39 -0500 Received: from smtp.osdl.org ([65.172.181.4]:54199 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S965296AbWADWdi (ORCPT ); Wed, 4 Jan 2006 17:33:38 -0500 Date: Wed, 4 Jan 2006 14:31:57 -0800 From: Andrew Morton To: "Jason Dravet" Cc: greg@kroah.com, linux-kernel@vger.kernel.org, linux-parport@lists.infradead.org, device@lanana.org Subject: Re: [RFC]: add sysfs support to parport_pc, v3 Message-Id: <20060104143157.357f9830.akpm@osdl.org> In-Reply-To: References: <20060104010841.GA19541@kroah.com> X-Mailer: Sylpheed version 1.0.0 (GTK+ 1.2.10; i386-vine-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2141 Lines: 52 "Jason Dravet" wrote: > > >From: Greg KH > > > +++ /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 :( > > > > > + * Added sysfs and udev - Jason Dravet > > > */ > > > >Doesn't belong here, this goes in the change log. > My mistake. > > > > +#include > > > >Your email client also ate the leading spaces :( > My email client is hotmail. I have come to realize how much hotmail sucks > for email. It eats the leading spaces, converts tabs to spaces, and line > wraps. I will work on getting a new mail account. > > > > + 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? > Good question. The answer is I have no idea. I booted Fedora Core and I > did a ls -l /dev and wrote down the specs for lp0 and parport0. lp0 looked > like crw-rw---- root lp 6, 0 date lp0 so that is what I used. After > reading Linux Device Drivers I found out that 6 is the major number and 0 is > the minor number. The goal was to make sure that the nodes generated by my > patch were the same as the nodes generated before my patch so I used those > numbers. Should I have used different major numbers? > 6 is OK - it's LP_MAJOR. However 99 is JSFD_MAJOR, used by drivers/sbus/char/jsflash.c. And yet my /dev/parport0 is also 99:0 (RH 7.3 and RH FC1). I've no idea how that came about?? bix:/home/akpm> grep parport /etc/makedev.d/* /etc/makedev.d/generic:a generic parport /etc/makedev.d/linux-2.4.x:c $PRINTER 99 0 1 8 parport%d - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/