Messages in this thread | | | Subject | Re: register_chrdev vs. cdev_add | From | (Jonathan Corbet) | Date | Wed, 14 May 2008 08:01:35 -0600 |
| |
> 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
| |