From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Thu, 06 Apr 2006 14:53:46 +0000 Subject: Re: cm4000 device creation again Message-Id: <20060406145346.GA32382@kroah.com> 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 On Thu, Apr 06, 2006 at 04:02:26PM +0200, Harald Welte wrote: > Hi Greg, > > On Thu, Apr 06, 2006 at 03:57:28PM +0200, Harald Welte wrote: > > On Tue, Apr 04, 2006 at 10:01:02AM -0700, Greg KH wrote: > > > > > That's the problem then. The driver needs to export the device > > > major:minor in order for udev to work properly. Please contact the > > > author of the driver to have them use the class_device_create() function > > > properly to achive this. > > > > that would be me. I'll investigate and cook up a patch asap. > > the question is: what is wrong about the current code? > > it uses: > > 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... Do you happen to have a pointer to the struct device for this class device? You might want to link to that in the above class_device_create() function (but that should not matter about the "dev" file creation.) Hm, can you enable CONFIG_DEBUG_DRIVER and see if the driver core is complaining about anything when you do the above class_device_create()? Also, the CONFIG_DEBUG_KOBJECT option might provide more info too (but be warned, it spits out a lot of stuff...) thanks, greg k-h ------------------------------------------------------- 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