Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] move m68k rtc drivers over to initcalls

this gets rid of the last two explicit initializations in misc.c

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Christoph Hellwig and committed by
Linus Torvalds
573fc113 cdb3826b

+6 -12
+3 -2
arch/m68k/bvme6000/rtc.c
··· 14 14 #include <linux/fcntl.h> 15 15 #include <linux/init.h> 16 16 #include <linux/poll.h> 17 + #include <linux/module.h> 17 18 #include <linux/mc146818rtc.h> /* For struct rtc_time and ioctls, etc */ 18 19 #include <linux/smp_lock.h> 19 20 #include <asm/bvme6000hw.h> ··· 172 171 .fops = &rtc_fops 173 172 }; 174 173 175 - int __init rtc_DP8570A_init(void) 174 + static int __init rtc_DP8570A_init(void) 176 175 { 177 176 if (!MACH_IS_BVME6000) 178 177 return -ENODEV; ··· 180 179 printk(KERN_INFO "DP8570A Real Time Clock Driver v%s\n", RTC_VERSION); 181 180 return misc_register(&rtc_dev); 182 181 } 183 - 182 + module_init(rtc_DP8570A_init);
+2 -2
arch/m68k/mvme16x/rtc.c
··· 161 161 .fops = &rtc_fops 162 162 }; 163 163 164 - int __init rtc_MK48T08_init(void) 164 + static int __init rtc_MK48T08_init(void) 165 165 { 166 166 if (!MACH_IS_MVME16x) 167 167 return -ENODEV; ··· 169 169 printk(KERN_INFO "MK48T08 Real Time Clock Driver v%s\n", RTC_VERSION); 170 170 return misc_register(&rtc_dev); 171 171 } 172 - 172 + module_init(rtc_MK48T08_init);
+1 -8
drivers/char/misc.c
··· 63 63 #define DYNAMIC_MINORS 64 /* like dynamic majors */ 64 64 static unsigned char misc_minors[DYNAMIC_MINORS / 8]; 65 65 66 - extern int rtc_DP8570A_init(void); 67 - extern int rtc_MK48T08_init(void); 68 66 extern int pmu_device_init(void); 69 67 70 68 #ifdef CONFIG_PROC_FS ··· 301 303 misc_class = class_create(THIS_MODULE, "misc"); 302 304 if (IS_ERR(misc_class)) 303 305 return PTR_ERR(misc_class); 304 - #ifdef CONFIG_MVME16x 305 - rtc_MK48T08_init(); 306 - #endif 307 - #ifdef CONFIG_BVME6000 308 - rtc_DP8570A_init(); 309 - #endif 306 + 310 307 if (register_chrdev(MISC_MAJOR,"misc",&misc_fops)) { 311 308 printk("unable to get major %d for misc devices\n", 312 309 MISC_MAJOR);