aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/serio/i8042-sparcio.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2005-09-04 02:41:38 -0400
committerDmitry Torokhov <dtor_core@ameritech.net>2005-09-04 02:41:38 -0400
commit8d5987a6e17fa36776a0c9964db0f24c3d070862 (patch)
treefcabd9919c13d7d7eb3b77b09de852488ab7d13d /drivers/input/serio/i8042-sparcio.h
parent0854e52d86080c1043bc8988daef2ebda4775f64 (diff)
Input: make i8042_platform_init return 'real' error code
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/serio/i8042-sparcio.h')
-rw-r--r--drivers/input/serio/i8042-sparcio.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h
index da2a19812485..ed9446f6d7e3 100644
--- a/drivers/input/serio/i8042-sparcio.h
+++ b/drivers/input/serio/i8042-sparcio.h
@@ -48,10 +48,10 @@ static inline void i8042_write_command(int val)
48#define OBP_PS2MS_NAME1 "kdmouse" 48#define OBP_PS2MS_NAME1 "kdmouse"
49#define OBP_PS2MS_NAME2 "mouse" 49#define OBP_PS2MS_NAME2 "mouse"
50 50
51static int i8042_platform_init(void) 51static int __init i8042_platform_init(void)
52{ 52{
53#ifndef CONFIG_PCI 53#ifndef CONFIG_PCI
54 return -1; 54 return -ENODEV;
55#else 55#else
56 char prop[128]; 56 char prop[128];
57 int len; 57 int len;
@@ -59,14 +59,14 @@ static int i8042_platform_init(void)
59 len = prom_getproperty(prom_root_node, "name", prop, sizeof(prop)); 59 len = prom_getproperty(prom_root_node, "name", prop, sizeof(prop));
60 if (len < 0) { 60 if (len < 0) {
61 printk("i8042: Cannot get name property of root OBP node.\n"); 61 printk("i8042: Cannot get name property of root OBP node.\n");
62 return -1; 62 return -ENODEV;
63 } 63 }
64 if (strncmp(prop, "SUNW,JavaStation-1", len) == 0) { 64 if (strncmp(prop, "SUNW,JavaStation-1", len) == 0) {
65 /* Hardcoded values for MrCoffee. */ 65 /* Hardcoded values for MrCoffee. */
66 i8042_kbd_irq = i8042_aux_irq = 13 | 0x20; 66 i8042_kbd_irq = i8042_aux_irq = 13 | 0x20;
67 kbd_iobase = ioremap(0x71300060, 8); 67 kbd_iobase = ioremap(0x71300060, 8);
68 if (!kbd_iobase) 68 if (!kbd_iobase)
69 return -1; 69 return -ENODEV;
70 } else { 70 } else {
71 struct linux_ebus *ebus; 71 struct linux_ebus *ebus;
72 struct linux_ebus_device *edev; 72 struct linux_ebus_device *edev;
@@ -78,7 +78,7 @@ static int i8042_platform_init(void)
78 goto edev_found; 78 goto edev_found;
79 } 79 }
80 } 80 }
81 return -1; 81 return -ENODEV;
82 82
83 edev_found: 83 edev_found:
84 for_each_edevchild(edev, child) { 84 for_each_edevchild(edev, child) {
@@ -96,7 +96,7 @@ static int i8042_platform_init(void)
96 i8042_aux_irq == -1) { 96 i8042_aux_irq == -1) {
97 printk("i8042: Error, 8042 device lacks both kbd and " 97 printk("i8042: Error, 8042 device lacks both kbd and "
98 "mouse nodes.\n"); 98 "mouse nodes.\n");
99 return -1; 99 return -ENODEV;
100 } 100 }
101 } 101 }
102 102