miscdevice and default attributes

Greg KH greg at kroah.com
Mon Jun 8 10:24:08 EDT 2015


On Sun, Jun 07, 2015 at 08:13:37PM -0700, David Bakin wrote:
> Where do I set the default attributes for a device created with misc_register
> ()?
> 
> In kernel 3.19 struct miscdevice looks like this:
> 
> struct miscdevice  {
>  int minor;
>  const char *name;
>  const struct file_operations *fops;
>  struct list_head list;
>  struct device *parent;
>  struct device *this_device;
>  const char *nodename;
>  umode_t mode;
> };

Look at 4.1-rc1, this structure has changed to solve this issue.

Hope this helps,

greg k-h



More information about the Kernelnewbies mailing list