Re: devfs_mk_cdev question
Where can I find this documentation?
----- Original Message -----
From: "Greg KH" <email@example.com>
To: "Paul Akkermans" <firstname.lastname@example.org>
Cc: "kernel newbie" <email@example.com>;
Sent: Tuesday, December 07, 2004 6:13 PM
Subject: Re: devfs_mk_cdev question
On Tue, Dec 07, 2004 at 05:34:16PM +0100, Paul Akkermans wrote:
Can you also tell me what "class_simple_device_add() " does then?
To quote the documentation (why do I write it if no one even reads
* class_simple_device_add - adds a class device to sysfs for a character
* @cs: pointer to the struct class_simple that this device should be
* @dev: the dev_t for the device to be added.
* @device: a pointer to a struct device that is assiociated with this
* @fmt: string for the class device's name
* This function can be used by simple char device classes that do not
* implement their own class device registration. A struct class_device
* be created in sysfs, registered to the specified class. A "dev" file
* be created, showing the dev_t for the device. The pointer to the struct
* class_device will be returned from the call. Any further sysfs files
* might be required can be created using this pointer.
* Note: the struct class_simple passed to this function must have
* created with a call to class_simple_create().
Use this if you want to add sysfs (and hence, udev) support to your
driver in a very easy manner. Also see class_simple_create() for some
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
Q: What is the most annoying thing on usenet and in e-mail?
Kernelnewbies: Help each other learn about the Linux kernel.