On 13 January 2014 17:13, Mark Brown broonie@kernel.org wrote:
On Mon, Jan 13, 2014 at 03:52:16PM +0530, Tushar Behera wrote:
if (driver->major) {
dev = MKDEV(driver->major, driver->minor_start);
error = register_chrdev_region(dev, driver->num, driver->name);
/* In case of error, fall back to dynamic allocation */
if (error < 0)
driver->major = 0;
}
This probably needs to at least print a warning if the major number is being overridden.
Ok. I will update the patch with following print.
printk(KERN_WARNING "Device major number for %s is overridden\n", driver->name);
Thanks for reviewing.