From: Ben Hutchings Date: Fri, 29 Jan 2010 21:00:04 +0000 (+0000) Subject: mtdchar: Register the full range of minor numbers X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dad0db318b391ddb9845ac5e52044f921219bf69;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git mtdchar: Register the full range of minor numbers register_chrdev() registers minor numbers up to 255, but we can now potentially have much larger numbers. Signed-off-by: Ben Hutchings Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index 9f826cda2748..c355491d1326 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c @@ -955,7 +955,8 @@ static int __init init_mtdchar(void) { int status; - status = register_chrdev(MTD_CHAR_MAJOR, "mtd", &mtd_fops); + status = __register_chrdev(MTD_CHAR_MAJOR, 0, 1 << MINORBITS, + "mtd", &mtd_fops); if (status < 0) { printk(KERN_NOTICE "Can't allocate major number %d for Memory Technology Devices.\n", MTD_CHAR_MAJOR); @@ -966,7 +967,7 @@ static int __init init_mtdchar(void) static void __exit cleanup_mtdchar(void) { - unregister_chrdev(MTD_CHAR_MAJOR, "mtd"); + __unregister_chrdev(MTD_CHAR_MAJOR, 0, 1 << MINORBITS, "mtd"); } module_init(init_mtdchar);