Skip to content

Commit

Permalink
sparc: i8042-sparcio.h: fix warning
Browse files Browse the repository at this point in the history
drivers/input/serio/i8042-sparcio.h:95: warning: 'sparc_i8042_driver'
defined but not used

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alexander Beregalov authored and David S. Miller committed Aug 6, 2008
1 parent 0967d61 commit 8c6a5ca
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions drivers/input/serio/i8042-sparcio.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ static inline void i8042_write_command(int val)
writeb(val, kbd_iobase + 0x64UL);
}

#ifdef CONFIG_PCI

#define OBP_PS2KBD_NAME1 "kb_ps2"
#define OBP_PS2KBD_NAME2 "keyboard"
#define OBP_PS2MS_NAME1 "kdmouse"
Expand Down Expand Up @@ -101,9 +103,6 @@ static struct of_platform_driver sparc_i8042_driver = {

static int __init i8042_platform_init(void)
{
#ifndef CONFIG_PCI
return -ENODEV;
#else
struct device_node *root = of_find_node_by_path("/");

if (!strcmp(root->name, "SUNW,JavaStation-1")) {
Expand Down Expand Up @@ -131,17 +130,25 @@ static int __init i8042_platform_init(void)
i8042_reset = 1;

return 0;
#endif /* CONFIG_PCI */
}

static inline void i8042_platform_exit(void)
{
#ifdef CONFIG_PCI
struct device_node *root = of_find_node_by_path("/");

if (strcmp(root->name, "SUNW,JavaStation-1"))
of_unregister_driver(&sparc_i8042_driver);
#endif
}

#else /* !CONFIG_PCI */
static int __init i8042_platform_init(void)
{
return -ENODEV;
}

static inline void i8042_platform_exit(void)
{
}
#endif /* !CONFIG_PCI */

#endif /* _I8042_SPARCIO_H */

0 comments on commit 8c6a5ca

Please sign in to comment.