linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: cm4000 device creation again
Date: Thu, 06 Apr 2006 14:53:46 +0000	[thread overview]
Message-ID: <20060406145346.GA32382@kroah.com> (raw)
In-Reply-To: <1142167169.5920.3.camel@otto.ehbuehl.net>

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&kid\x110944&bid$1720&dat\x121642
_______________________________________________
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

  parent reply	other threads:[~2006-04-06 14:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-12 12:39 cm4000 device creation again Joachim Breitner
2006-03-13  7:02 ` Kay Sievers
2006-03-13 21:33 ` Joachim Breitner
2006-04-02 20:58 ` Joachim Breitner
2006-04-04 17:01 ` Greg KH
2006-04-06 13:57 ` Harald Welte
2006-04-06 14:02 ` Harald Welte
2006-04-06 14:53 ` Greg KH [this message]
2006-04-06 16:21 ` Joachim Breitner
2006-04-07 13:58 ` Jan Niehusmann
2006-04-07 14:25 ` Jan Niehusmann

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=20060406145346.GA32382@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-hotplug@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).