linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Help with simple char device
@ 2004-12-31  5:32 Luis A. Montes
  2004-12-31  6:23 ` Kay Sievers
  0 siblings, 1 reply; 2+ messages in thread
From: Luis A. Montes @ 2004-12-31  5:32 UTC (permalink / raw)
  To: linux-hotplug

Hi there,

I'm trying to write a simple char device driver. I've used as starting
point code that someone posted recently to the list (I can't find the
post now, it was a file called mymod.c). Anyway, I do:

alloc_chrdev_region()
cdev_alloc()
set owner and file operations
kobject_set_name()
cdev_add()
class_simple_create()
class_simple_device_add()

It nicely creates a /dev/ entry, but it then complains:

wait_for_sysfs[5689]: either wait_for_sysfs (udev 042) needs an update
to handle the device '/class/mydevclass/mydev' properly (no device
symlink) or the sysfs-support of your device's driver needs to be fixed,
please report to <linux-hotplug-devel@lists.sourceforge.net>

Any pointers to what else do I need to do?

-- 
Luis A. Montes <luismontes@isp.com>


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Help with simple char device
  2004-12-31  5:32 Help with simple char device Luis A. Montes
@ 2004-12-31  6:23 ` Kay Sievers
  0 siblings, 0 replies; 2+ messages in thread
From: Kay Sievers @ 2004-12-31  6:23 UTC (permalink / raw)
  To: linux-hotplug

On Thu, 2004-12-30 at 21:32 -0800, Luis A. Montes wrote:
> Hi there,
> 
> I'm trying to write a simple char device driver. I've used as starting
> point code that someone posted recently to the list (I can't find the
> post now, it was a file called mymod.c). Anyway, I do:
> 
> alloc_chrdev_region()
> cdev_alloc()
> set owner and file operations
> kobject_set_name()
> cdev_add()
> class_simple_create()
> class_simple_device_add()
> 
> It nicely creates a /dev/ entry, but it then complains:
> 
> wait_for_sysfs[5689]: either wait_for_sysfs (udev 042) needs an update
> to handle the device '/class/mydevclass/mydev' properly (no device
> symlink) or the sysfs-support of your device's driver needs to be fixed,
> please report to <linux-hotplug-devel@lists.sourceforge.net>
> 
> Any pointers to what else do I need to do?

Just upgrade udev to get rid of the message or simply ignore it.

(That's cause udev doesn't know about that class name and the default is
to expect a symlink to the physical device. Newer udev versions will not
print this message and kernel 2.6.10 will carry the information in the
hotplug environment to let udev explicitly know what to wait for.)

Kay



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-12-31  6:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-31  5:32 Help with simple char device Luis A. Montes
2004-12-31  6:23 ` Kay Sievers

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).