diff options
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/kernel/cpu/sh4/sq.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c index 781dbb11c038..b09805f3ee23 100644 --- a/arch/sh/kernel/cpu/sh4/sq.c +++ b/arch/sh/kernel/cpu/sh4/sq.c | |||
@@ -421,18 +421,22 @@ static struct miscdevice sq_dev = { | |||
421 | 421 | ||
422 | static int __init sq_api_init(void) | 422 | static int __init sq_api_init(void) |
423 | { | 423 | { |
424 | int ret; | ||
424 | printk(KERN_NOTICE "sq: Registering store queue API.\n"); | 425 | printk(KERN_NOTICE "sq: Registering store queue API.\n"); |
425 | 426 | ||
426 | #ifdef CONFIG_PROC_FS | ||
427 | create_proc_read_entry("sq_mapping", 0, 0, sq_mapping_read_proc, 0); | 427 | create_proc_read_entry("sq_mapping", 0, 0, sq_mapping_read_proc, 0); |
428 | #endif | ||
429 | 428 | ||
430 | return misc_register(&sq_dev); | 429 | ret = misc_register(&sq_dev); |
430 | if (ret) | ||
431 | remove_proc_entry("sq_mapping", NULL); | ||
432 | |||
433 | return ret; | ||
431 | } | 434 | } |
432 | 435 | ||
433 | static void __exit sq_api_exit(void) | 436 | static void __exit sq_api_exit(void) |
434 | { | 437 | { |
435 | misc_deregister(&sq_dev); | 438 | misc_deregister(&sq_dev); |
439 | remove_proc_entry("sq_mapping", NULL); | ||
436 | } | 440 | } |
437 | 441 | ||
438 | module_init(sq_api_init); | 442 | module_init(sq_api_init); |