lkml.org 
[lkml]   [2008]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: register_chrdev vs. cdev_add
From
Date
> dev = MKDEV(htrc110_major, htrc110_minor);
> ret = register_chrdev_region(dev, 1, mod_name);
> ret = register_chrdev(dev, mod_name, &htrc110_fops);

If you want to use register_chrdev(), do not make a separate call to
register_chrdev_region(). Those two are not meant to work together.
register_chrdev() implicitly allocates a region of 256 minors for you.

jon


\
 
 \ /
  Last update: 2008-05-14 16:03    [W:0.031 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site