[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <16204.1210773695@vena.lwn.net>
Date: Wed, 14 May 2008 08:01:35 -0600
From: corbet@....net (Jonathan Corbet)
To: Hinko Kočevar <hinko.kocevar@...rtapot.si>
Cc: linux-kernel@...r.kernel.org
Subject: Re: register_chrdev vs. cdev_add
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists