Re: struct miscdevice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 18, 2004 at 07:57:25PM +0100, Frank A. Uepping wrote:
> Hi,
> a miscdevice enables for easy creation of a char-device.
> Further, a miscdevice is attached to the class misc; that is, we get a dev 
> attribute exported to the sysfs (/sys/class/misc/.../dev), making udev create 
> a device node for us. 
> Is the miscdevice dedicated to some special purposes (e.g. system devices...)?
> May driver programmer freely use miscdevices for their purposes?

See Documentation/devices.txt and pay attention to the major number 10
for a list of all misc devices.

You can also use misc_register() to create a minor number of your own
for a device that does not have a major/minor number assigned to it
officially.

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/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux