Commit 9d4e7cce authored by Michael Still's avatar Michael Still Committed by Linus Torvalds

[PATCH] misc_register-007-005

parent ddba7f15
......@@ -404,11 +404,20 @@ static struct miscdevice rtc_gen_dev =
int __init rtc_generic_init(void)
{
int retval;
printk(KERN_INFO "Generic RTC Driver v%s\n", RTC_VERSION);
misc_register(&rtc_gen_dev);
create_proc_read_entry ("driver/rtc", 0, 0, gen_rtc_read_proc, NULL);
retval = misc_register(&rtc_gen_dev);
if(retval < 0)
return retval;
#ifdef CONFIG_PROC_FS
if((create_proc_read_entry ("driver/rtc", 0, 0, gen_rtc_read_proc, NULL)) == NULL){
misc_deregister(&rtc_gen_dev);
return -ENOMEM;
}
#endif
return 0;
}
......
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