Commit f1e747ff authored by Michael Still's avatar Michael Still Committed by Linus Torvalds

[PATCH] misc_register-008-004

parent 7d857c13
...@@ -474,6 +474,7 @@ int tosh_probe(void) ...@@ -474,6 +474,7 @@ int tosh_probe(void)
int __init tosh_init(void) int __init tosh_init(void)
{ {
int retval;
/* are we running on a Toshiba laptop */ /* are we running on a Toshiba laptop */
if (tosh_probe()!=0) if (tosh_probe()!=0)
...@@ -483,17 +484,21 @@ int __init tosh_init(void) ...@@ -483,17 +484,21 @@ int __init tosh_init(void)
TOSH_VERSION"\n"); TOSH_VERSION"\n");
/* set the port to use for Fn status if not specified as a parameter */ /* set the port to use for Fn status if not specified as a parameter */
if (tosh_fn==0x00) if (tosh_fn==0x00)
tosh_set_fn_port(); tosh_set_fn_port();
/* register the device file */ /* register the device file */
retval = misc_register(&tosh_device);
if(retval < 0)
return retval;
misc_register(&tosh_device); #ifdef CONFIG_PROC_FS
/* register the proc entry */ /* register the proc entry */
if(create_proc_info_entry("toshiba", 0, NULL, tosh_get_info) == NULL){
create_proc_info_entry("toshiba", 0, NULL, tosh_get_info); misc_deregister(&tosh_device);
return -ENOMEM;
}
#endif
return 0; 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