git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge to kernel-2.6.20-1.2949.fc6.vs2.2.0.1
[linux-2.6.git]
/
drivers
/
macintosh
/
apm_emu.c
diff --git
a/drivers/macintosh/apm_emu.c
b/drivers/macintosh/apm_emu.c
index
e5a2bbf
..
4300c62
100644
(file)
--- a/
drivers/macintosh/apm_emu.c
+++ b/
drivers/macintosh/apm_emu.c
@@
-18,7
+18,6
@@
*
*/
*
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/poll.h>
#include <linux/module.h>
#include <linux/poll.h>
@@
-322,7
+321,7
@@
static int do_open(struct inode * inode, struct file * filp)
{
struct apm_user * as;
{
struct apm_user * as;
- as =
(struct apm_user *)
kmalloc(sizeof(*as), GFP_KERNEL);
+ as = kmalloc(sizeof(*as), GFP_KERNEL);
if (as == NULL) {
printk(KERN_ERR "apm: cannot allocate struct of size %d bytes\n",
sizeof(*as));
if (as == NULL) {
printk(KERN_ERR "apm: cannot allocate struct of size %d bytes\n",
sizeof(*as));
@@
-530,7
+529,8
@@
static int __init apm_emu_init(void)
if (apm_proc)
apm_proc->owner = THIS_MODULE;
if (apm_proc)
apm_proc->owner = THIS_MODULE;
- misc_register(&apm_device);
+ if (misc_register(&apm_device) != 0)
+ printk(KERN_INFO "Could not create misc. device for apm\n");
pmu_register_sleep_notifier(&apm_sleep_notifier);
pmu_register_sleep_notifier(&apm_sleep_notifier);