diff options
| -rw-r--r-- | arch/i386/kernel/apm.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c index 8591f2fa920c..24fd577861f1 100644 --- a/arch/i386/kernel/apm.c +++ b/arch/i386/kernel/apm.c | |||
| @@ -2339,6 +2339,7 @@ static int __init apm_init(void) | |||
| 2339 | ret = kernel_thread(apm, NULL, CLONE_KERNEL | SIGCHLD); | 2339 | ret = kernel_thread(apm, NULL, CLONE_KERNEL | SIGCHLD); |
| 2340 | if (ret < 0) { | 2340 | if (ret < 0) { |
| 2341 | printk(KERN_ERR "apm: disabled - Unable to start kernel thread.\n"); | 2341 | printk(KERN_ERR "apm: disabled - Unable to start kernel thread.\n"); |
| 2342 | remove_proc_entry("apm", NULL); | ||
| 2342 | return -ENOMEM; | 2343 | return -ENOMEM; |
| 2343 | } | 2344 | } |
| 2344 | 2345 | ||
| @@ -2348,7 +2349,13 @@ static int __init apm_init(void) | |||
| 2348 | return 0; | 2349 | return 0; |
| 2349 | } | 2350 | } |
| 2350 | 2351 | ||
| 2351 | misc_register(&apm_device); | 2352 | /* |
| 2353 | * Note we don't actually care if the misc_device cannot be registered. | ||
| 2354 | * this driver can do its job without it, even if userspace can't | ||
| 2355 | * control it. just log the error | ||
| 2356 | */ | ||
| 2357 | if (misc_register(&apm_device)) | ||
| 2358 | printk(KERN_WARNING "apm: Could not register misc device.\n"); | ||
| 2352 | 2359 | ||
| 2353 | if (HZ != 100) | 2360 | if (HZ != 100) |
| 2354 | idle_period = (idle_period * HZ) / 100; | 2361 | idle_period = (idle_period * HZ) / 100; |
