Re: automagic udev device node creation?

From: Kay Sievers
Date: Wed Aug 12 2009 - 12:24:12 EST


On Wed, Aug 12, 2009 at 18:04, Sander, Tim<Tim.Sander@xxxxxxx> wrote:
> I have written a simple mmap test driver which seems to work so far.=20
> The only problem i have, is that no udev device node is automatically =
> created?=20
> So i really would like to know what part is missing to make udev =
> automatically create
> the device node?
>
> Everything works alright if i just create the device node by hand.
>
> I suspect that these should be created out of the sysfs information =
> created by the module.

Assign the "devt" value in the registered "struct device" with the
major/minor value of your device instance.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=include/linux/device.h;h=aebb81036db2d368a7b55664f5a2b9d102c5109d;hb=HEAD#l407

Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/