Can you also tell me what "class_simple_device_add() " does then?

thanks again,

PA

----- Original Message ----- From: "Greg KH" <[EMAIL PROTECTED]>
To: "Paul Akkermans" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; "kernel newbie" <[EMAIL PROTECTED]>
Sent: Tuesday, December 07, 2004 4:47 PM
Subject: Re: devfs_mk_cdev question



On Tue, Dec 07, 2004 at 03:16:48PM +0100, Paul Akkermans wrote:
Hi group,

Can anybody tell me what happens in this piece of code:

mousedev_table[minor] = mousedev;

 devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor),
   S_IFCHR|S_IRUGO|S_IWUSR, "input/mouse%d", minor);
 class_simple_device_add(input_class,
    MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor),
    dev->dev, "mouse%d", minor);

I am especially interested in devfs_mk_cdev and what is means.

Can anybody help me?

It creates a devfs char device, if devfs is enabled in the kernel.

Personally I find the class_simple_device_add() stuff more interesting
:)

Hope this helps,

greg k-h

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/





--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Reply via email to