diff options
author | Christoph Hellwig <hch@lst.de> | 2005-09-06 18:16:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-07 19:57:23 -0400 |
commit | 573fc113133e0b0984d2c0090e706c6506661f91 (patch) | |
tree | 306e0b5e809e413cb36cbd265d7694f04503044a | |
parent | cdb3826b9958c204bc8ffda2cf9bbe2d899ef90c (diff) |
[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>
-rw-r--r-- | arch/m68k/bvme6000/rtc.c | 5 | ||||
-rw-r--r-- | arch/m68k/mvme16x/rtc.c | 4 | ||||
-rw-r--r-- | drivers/char/misc.c | 9 |
3 files changed, 6 insertions, 12 deletions
diff --git a/arch/m68k/bvme6000/rtc.c b/arch/m68k/bvme6000/rtc.c index c6b2a410bf9a..eb63ca6ed94c 100644 --- a/arch/m68k/bvme6000/rtc.c +++ b/arch/m68k/bvme6000/rtc.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/fcntl.h> | 14 | #include <linux/fcntl.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/poll.h> | 16 | #include <linux/poll.h> |
17 | #include <linux/module.h> | ||
17 | #include <linux/mc146818rtc.h> /* For struct rtc_time and ioctls, etc */ | 18 | #include <linux/mc146818rtc.h> /* For struct rtc_time and ioctls, etc */ |
18 | #include <linux/smp_lock.h> | 19 | #include <linux/smp_lock.h> |
19 | #include <asm/bvme6000hw.h> | 20 | #include <asm/bvme6000hw.h> |
@@ -171,7 +172,7 @@ static struct miscdevice rtc_dev = { | |||
171 | .fops = &rtc_fops | 172 | .fops = &rtc_fops |
172 | }; | 173 | }; |
173 | 174 | ||
174 | int __init rtc_DP8570A_init(void) | 175 | static int __init rtc_DP8570A_init(void) |
175 | { | 176 | { |
176 | if (!MACH_IS_BVME6000) | 177 | if (!MACH_IS_BVME6000) |
177 | return -ENODEV; | 178 | return -ENODEV; |
@@ -179,4 +180,4 @@ int __init rtc_DP8570A_init(void) | |||
179 | printk(KERN_INFO "DP8570A Real Time Clock Driver v%s\n", RTC_VERSION); | 180 | printk(KERN_INFO "DP8570A Real Time Clock Driver v%s\n", RTC_VERSION); |
180 | return misc_register(&rtc_dev); | 181 | return misc_register(&rtc_dev); |
181 | } | 182 | } |
182 | 183 | module_init(rtc_DP8570A_init); | |
diff --git a/arch/m68k/mvme16x/rtc.c b/arch/m68k/mvme16x/rtc.c index 8a2425069088..7977eae50af2 100644 --- a/arch/m68k/mvme16x/rtc.c +++ b/arch/m68k/mvme16x/rtc.c | |||
@@ -161,7 +161,7 @@ static struct miscdevice rtc_dev= | |||
161 | .fops = &rtc_fops | 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 | if (!MACH_IS_MVME16x) | 166 | if (!MACH_IS_MVME16x) |
167 | return -ENODEV; | 167 | return -ENODEV; |
@@ -169,4 +169,4 @@ int __init rtc_MK48T08_init(void) | |||
169 | printk(KERN_INFO "MK48T08 Real Time Clock Driver v%s\n", RTC_VERSION); | 169 | printk(KERN_INFO "MK48T08 Real Time Clock Driver v%s\n", RTC_VERSION); |
170 | return misc_register(&rtc_dev); | 170 | return misc_register(&rtc_dev); |
171 | } | 171 | } |
172 | 172 | module_init(rtc_MK48T08_init); | |
diff --git a/drivers/char/misc.c b/drivers/char/misc.c index 931efd58f87a..0c8375165e29 100644 --- a/drivers/char/misc.c +++ b/drivers/char/misc.c | |||
@@ -63,8 +63,6 @@ static DECLARE_MUTEX(misc_sem); | |||
63 | #define DYNAMIC_MINORS 64 /* like dynamic majors */ | 63 | #define DYNAMIC_MINORS 64 /* like dynamic majors */ |
64 | static unsigned char misc_minors[DYNAMIC_MINORS / 8]; | 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 | extern int pmu_device_init(void); | 66 | extern int pmu_device_init(void); |
69 | 67 | ||
70 | #ifdef CONFIG_PROC_FS | 68 | #ifdef CONFIG_PROC_FS |
@@ -303,12 +301,7 @@ static int __init misc_init(void) | |||
303 | misc_class = class_create(THIS_MODULE, "misc"); | 301 | misc_class = class_create(THIS_MODULE, "misc"); |
304 | if (IS_ERR(misc_class)) | 302 | if (IS_ERR(misc_class)) |
305 | return PTR_ERR(misc_class); | 303 | return PTR_ERR(misc_class); |
306 | #ifdef CONFIG_MVME16x | 304 | |
307 | rtc_MK48T08_init(); | ||
308 | #endif | ||
309 | #ifdef CONFIG_BVME6000 | ||
310 | rtc_DP8570A_init(); | ||
311 | #endif | ||
312 | if (register_chrdev(MISC_MAJOR,"misc",&misc_fops)) { | 305 | if (register_chrdev(MISC_MAJOR,"misc",&misc_fops)) { |
313 | printk("unable to get major %d for misc devices\n", | 306 | printk("unable to get major %d for misc devices\n", |
314 | MISC_MAJOR); | 307 | MISC_MAJOR); |