Commit 573fc113 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds

[PATCH] move m68k rtc drivers over to initcalls

this gets rid of the last two explicit initializations in misc.c
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent cdb3826b
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/fcntl.h> #include <linux/fcntl.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/poll.h> #include <linux/poll.h>
#include <linux/module.h>
#include <linux/mc146818rtc.h> /* For struct rtc_time and ioctls, etc */ #include <linux/mc146818rtc.h> /* For struct rtc_time and ioctls, etc */
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <asm/bvme6000hw.h> #include <asm/bvme6000hw.h>
...@@ -171,7 +172,7 @@ static struct miscdevice rtc_dev = { ...@@ -171,7 +172,7 @@ static struct miscdevice rtc_dev = {
.fops = &rtc_fops .fops = &rtc_fops
}; };
int __init rtc_DP8570A_init(void) static int __init rtc_DP8570A_init(void)
{ {
if (!MACH_IS_BVME6000) if (!MACH_IS_BVME6000)
return -ENODEV; return -ENODEV;
...@@ -179,4 +180,4 @@ int __init rtc_DP8570A_init(void) ...@@ -179,4 +180,4 @@ int __init rtc_DP8570A_init(void)
printk(KERN_INFO "DP8570A Real Time Clock Driver v%s\n", RTC_VERSION); printk(KERN_INFO "DP8570A Real Time Clock Driver v%s\n", RTC_VERSION);
return misc_register(&rtc_dev); return misc_register(&rtc_dev);
} }
module_init(rtc_DP8570A_init);
...@@ -161,7 +161,7 @@ static struct miscdevice rtc_dev= ...@@ -161,7 +161,7 @@ static struct miscdevice rtc_dev=
.fops = &rtc_fops .fops = &rtc_fops
}; };
int __init rtc_MK48T08_init(void) static int __init rtc_MK48T08_init(void)
{ {
if (!MACH_IS_MVME16x) if (!MACH_IS_MVME16x)
return -ENODEV; return -ENODEV;
...@@ -169,4 +169,4 @@ int __init rtc_MK48T08_init(void) ...@@ -169,4 +169,4 @@ int __init rtc_MK48T08_init(void)
printk(KERN_INFO "MK48T08 Real Time Clock Driver v%s\n", RTC_VERSION); printk(KERN_INFO "MK48T08 Real Time Clock Driver v%s\n", RTC_VERSION);
return misc_register(&rtc_dev); return misc_register(&rtc_dev);
} }
module_init(rtc_MK48T08_init);
...@@ -63,8 +63,6 @@ static DECLARE_MUTEX(misc_sem); ...@@ -63,8 +63,6 @@ static DECLARE_MUTEX(misc_sem);
#define DYNAMIC_MINORS 64 /* like dynamic majors */ #define DYNAMIC_MINORS 64 /* like dynamic majors */
static unsigned char misc_minors[DYNAMIC_MINORS / 8]; static unsigned char misc_minors[DYNAMIC_MINORS / 8];
extern int rtc_DP8570A_init(void);
extern int rtc_MK48T08_init(void);
extern int pmu_device_init(void); extern int pmu_device_init(void);
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
...@@ -303,12 +301,7 @@ static int __init misc_init(void) ...@@ -303,12 +301,7 @@ static int __init misc_init(void)
misc_class = class_create(THIS_MODULE, "misc"); misc_class = class_create(THIS_MODULE, "misc");
if (IS_ERR(misc_class)) if (IS_ERR(misc_class))
return PTR_ERR(misc_class); return PTR_ERR(misc_class);
#ifdef CONFIG_MVME16x
rtc_MK48T08_init();
#endif
#ifdef CONFIG_BVME6000
rtc_DP8570A_init();
#endif
if (register_chrdev(MISC_MAJOR,"misc",&misc_fops)) { if (register_chrdev(MISC_MAJOR,"misc",&misc_fops)) {
printk("unable to get major %d for misc devices\n", printk("unable to get major %d for misc devices\n",
MISC_MAJOR); MISC_MAJOR);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment