From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Niehusmann Date: Fri, 07 Apr 2006 13:58:51 +0000 Subject: Re: cm4000 device creation again Message-Id: List-Id: References: <1142167169.5920.3.camel@otto.ehbuehl.net> In-Reply-To: <1142167169.5920.3.camel@otto.ehbuehl.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Greg KH wrote: > On Thu, Apr 06, 2006 at 04:02:26PM +0200, Harald Welte wrote: >> cmm_class = class_create(THIS_MODULE, "cardman_4000"); >> major = register_chrdev(0, DEVICE_NAME, &cm4000_fops); >> class_device_create(cmm_class, NULL, MKDEV(major, i), NULL, "cmm%d", i); >> >> where 'i' is the minor number. > > Hm, that seems just fine. And no "dev" file is being created in the > sysfs directory? That should work... Maybe the code is in the wrong location or doesn't get called for some other reason? I observed the following: If I have the card plugged in at bootup, no /dev/cmm0 gets created, and /sys/class/cardman_4000/cmm0/ only contains uevent, no file called dev. But if I first load the cm4000_cs module manually and plug in the card after that, both /sys/class/cardman_4000/cmm0/dev and /dev/cmm0 appear. So it looks to me like either class_device_create doesn't get called if the cm4000_cs gets loaded in response to the card being inserted, or it does get called but doesn't work because something else is not yet properly initialized at that time. Does that make sense? Jan ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel