diff options
author | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-09-04 02:41:38 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-09-04 02:41:38 -0400 |
commit | 8d5987a6e17fa36776a0c9964db0f24c3d070862 (patch) | |
tree | fcabd9919c13d7d7eb3b77b09de852488ab7d13d /drivers/input/serio/i8042-x86ia64io.h | |
parent | 0854e52d86080c1043bc8988daef2ebda4775f64 (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-x86ia64io.h')
-rw-r--r-- | drivers/input/serio/i8042-x86ia64io.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index 03877c84e6ff..02bc23142ce0 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
@@ -256,7 +256,7 @@ static void i8042_pnp_exit(void) | |||
256 | } | 256 | } |
257 | } | 257 | } |
258 | 258 | ||
259 | static int i8042_pnp_init(void) | 259 | static int __init i8042_pnp_init(void) |
260 | { | 260 | { |
261 | int result_kbd, result_aux; | 261 | int result_kbd, result_aux; |
262 | 262 | ||
@@ -322,25 +322,29 @@ static int i8042_pnp_init(void) | |||
322 | return 0; | 322 | return 0; |
323 | } | 323 | } |
324 | 324 | ||
325 | #else | ||
326 | static inline int i8042_pnp_init(void) { return 0; } | ||
327 | static inline void i8042_pnp_exit(void) { } | ||
325 | #endif | 328 | #endif |
326 | 329 | ||
327 | static inline int i8042_platform_init(void) | 330 | static int __init i8042_platform_init(void) |
328 | { | 331 | { |
332 | int retval; | ||
333 | |||
329 | /* | 334 | /* |
330 | * On ix86 platforms touching the i8042 data register region can do really | 335 | * On ix86 platforms touching the i8042 data register region can do really |
331 | * bad things. Because of this the region is always reserved on ix86 boxes. | 336 | * bad things. Because of this the region is always reserved on ix86 boxes. |
332 | * | 337 | * |
333 | * if (!request_region(I8042_DATA_REG, 16, "i8042")) | 338 | * if (!request_region(I8042_DATA_REG, 16, "i8042")) |
334 | * return -1; | 339 | * return -EBUSY; |
335 | */ | 340 | */ |
336 | 341 | ||
337 | i8042_kbd_irq = I8042_MAP_IRQ(1); | 342 | i8042_kbd_irq = I8042_MAP_IRQ(1); |
338 | i8042_aux_irq = I8042_MAP_IRQ(12); | 343 | i8042_aux_irq = I8042_MAP_IRQ(12); |
339 | 344 | ||
340 | #ifdef CONFIG_PNP | 345 | retval = i8042_pnp_init(); |
341 | if (i8042_pnp_init()) | 346 | if (retval) |
342 | return -1; | 347 | return retval; |
343 | #endif | ||
344 | 348 | ||
345 | #if defined(__ia64__) | 349 | #if defined(__ia64__) |
346 | i8042_reset = 1; | 350 | i8042_reset = 1; |
@@ -354,14 +358,12 @@ static inline int i8042_platform_init(void) | |||
354 | i8042_nomux = 1; | 358 | i8042_nomux = 1; |
355 | #endif | 359 | #endif |
356 | 360 | ||
357 | return 0; | 361 | return retval; |
358 | } | 362 | } |
359 | 363 | ||
360 | static inline void i8042_platform_exit(void) | 364 | static inline void i8042_platform_exit(void) |
361 | { | 365 | { |
362 | #ifdef CONFIG_PNP | ||
363 | i8042_pnp_exit(); | 366 | i8042_pnp_exit(); |
364 | #endif | ||
365 | } | 367 | } |
366 | 368 | ||
367 | #endif /* _I8042_X86IA64IO_H */ | 369 | #endif /* _I8042_X86IA64IO_H */ |