diff options
Diffstat (limited to 'drivers/input/serio')
| -rw-r--r-- | drivers/input/serio/Kconfig | 8 | ||||
| -rw-r--r-- | drivers/input/serio/Makefile | 1 | ||||
| -rw-r--r-- | drivers/input/serio/altera_ps2.c | 204 | ||||
| -rw-r--r-- | drivers/input/serio/ambakmi.c | 9 | ||||
| -rw-r--r-- | drivers/input/serio/at32psif.c | 4 | ||||
| -rw-r--r-- | drivers/input/serio/ct82c710.c | 1 | ||||
| -rw-r--r-- | drivers/input/serio/gscps2.c | 7 | ||||
| -rw-r--r-- | drivers/input/serio/hil_mlc.c | 9 | ||||
| -rw-r--r-- | drivers/input/serio/hp_sdc.c | 2 | ||||
| -rw-r--r-- | drivers/input/serio/hp_sdc_mlc.c | 2 | ||||
| -rw-r--r-- | drivers/input/serio/i8042-x86ia64io.h | 168 | ||||
| -rw-r--r-- | drivers/input/serio/i8042.c | 123 | ||||
| -rw-r--r-- | drivers/input/serio/libps2.c | 1 | ||||
| -rw-r--r-- | drivers/input/serio/parkbd.c | 1 | ||||
| -rw-r--r-- | drivers/input/serio/pcips2.c | 3 | ||||
| -rw-r--r-- | drivers/input/serio/q40kbd.c | 1 | ||||
| -rw-r--r-- | drivers/input/serio/rpckbd.c | 1 | ||||
| -rw-r--r-- | drivers/input/serio/sa1111ps2.c | 10 | ||||
| -rw-r--r-- | drivers/input/serio/serio.c | 142 | ||||
| -rw-r--r-- | drivers/input/serio/serio_raw.c | 11 | ||||
| -rw-r--r-- | drivers/input/serio/xilinx_ps2.c | 7 |
21 files changed, 497 insertions, 218 deletions
diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig index aa533ceffe34..7e319d65ec57 100644 --- a/drivers/input/serio/Kconfig +++ b/drivers/input/serio/Kconfig | |||
| @@ -201,4 +201,12 @@ config SERIO_XILINX_XPS_PS2 | |||
| 201 | To compile this driver as a module, choose M here: the | 201 | To compile this driver as a module, choose M here: the |
| 202 | module will be called xilinx_ps2. | 202 | module will be called xilinx_ps2. |
| 203 | 203 | ||
| 204 | config SERIO_ALTERA_PS2 | ||
| 205 | tristate "Altera UP PS/2 controller" | ||
| 206 | help | ||
| 207 | Say Y here if you have Altera University Program PS/2 ports. | ||
| 208 | |||
| 209 | To compile this driver as a module, choose M here: the | ||
| 210 | module will be called altera_ps2. | ||
| 211 | |||
| 204 | endif | 212 | endif |
diff --git a/drivers/input/serio/Makefile b/drivers/input/serio/Makefile index 9b6c8135955f..bf945f789d05 100644 --- a/drivers/input/serio/Makefile +++ b/drivers/input/serio/Makefile | |||
| @@ -22,3 +22,4 @@ obj-$(CONFIG_SERIO_MACEPS2) += maceps2.o | |||
| 22 | obj-$(CONFIG_SERIO_LIBPS2) += libps2.o | 22 | obj-$(CONFIG_SERIO_LIBPS2) += libps2.o |
| 23 | obj-$(CONFIG_SERIO_RAW) += serio_raw.o | 23 | obj-$(CONFIG_SERIO_RAW) += serio_raw.o |
| 24 | obj-$(CONFIG_SERIO_XILINX_XPS_PS2) += xilinx_ps2.o | 24 | obj-$(CONFIG_SERIO_XILINX_XPS_PS2) += xilinx_ps2.o |
| 25 | obj-$(CONFIG_SERIO_ALTERA_PS2) += altera_ps2.o | ||
diff --git a/drivers/input/serio/altera_ps2.c b/drivers/input/serio/altera_ps2.c new file mode 100644 index 000000000000..7998560a1904 --- /dev/null +++ b/drivers/input/serio/altera_ps2.c | |||
| @@ -0,0 +1,204 @@ | |||
| 1 | /* | ||
| 2 | * Altera University Program PS2 controller driver | ||
| 3 | * | ||
| 4 | * Copyright (C) 2008 Thomas Chou <thomas@wytron.com.tw> | ||
| 5 | * | ||
| 6 | * Based on sa1111ps2.c, which is: | ||
| 7 | * Copyright (C) 2002 Russell King | ||
| 8 | * | ||
| 9 | * This program is free software; you can redistribute it and/or modify | ||
| 10 | * it under the terms of the GNU General Public License version 2 as | ||
| 11 | * published by the Free Software Foundation. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <linux/module.h> | ||
| 15 | #include <linux/init.h> | ||
| 16 | #include <linux/input.h> | ||
| 17 | #include <linux/serio.h> | ||
| 18 | #include <linux/interrupt.h> | ||
| 19 | #include <linux/platform_device.h> | ||
| 20 | #include <linux/io.h> | ||
| 21 | #include <linux/slab.h> | ||
| 22 | |||
| 23 | #define DRV_NAME "altera_ps2" | ||
| 24 | |||
| 25 | struct ps2if { | ||
| 26 | struct serio *io; | ||
| 27 | struct resource *iomem_res; | ||
| 28 | void __iomem *base; | ||
| 29 | unsigned irq; | ||
| 30 | }; | ||
| 31 | |||
| 32 | /* | ||
| 33 | * Read all bytes waiting in the PS2 port. There should be | ||
| 34 | * at the most one, but we loop for safety. | ||
| 35 | */ | ||
| 36 | static irqreturn_t altera_ps2_rxint(int irq, void *dev_id) | ||
| 37 | { | ||
| 38 | struct ps2if *ps2if = dev_id; | ||
| 39 | unsigned int status; | ||
| 40 | int handled = IRQ_NONE; | ||
| 41 | |||
| 42 | while ((status = readl(ps2if->base)) & 0xffff0000) { | ||
| 43 | serio_interrupt(ps2if->io, status & 0xff, 0); | ||
| 44 | handled = IRQ_HANDLED; | ||
| 45 | } | ||
| 46 | |||
| 47 | return handled; | ||
| 48 | } | ||
| 49 | |||
| 50 | /* | ||
| 51 | * Write a byte to the PS2 port. | ||
| 52 | */ | ||
| 53 | static int altera_ps2_write(struct serio *io, unsigned char val) | ||
| 54 | { | ||
| 55 | struct ps2if *ps2if = io->port_data; | ||
| 56 | |||
| 57 | writel(val, ps2if->base); | ||
| 58 | return 0; | ||
| 59 | } | ||
| 60 | |||
| 61 | static int altera_ps2_open(struct serio *io) | ||
| 62 | { | ||
| 63 | struct ps2if *ps2if = io->port_data; | ||
| 64 | |||
| 65 | /* clear fifo */ | ||
| 66 | while (readl(ps2if->base) & 0xffff0000) | ||
| 67 | /* empty */; | ||
| 68 | |||
| 69 | writel(1, ps2if->base + 4); /* enable rx irq */ | ||
| 70 | return 0; | ||
| 71 | } | ||
| 72 | |||
| 73 | static void altera_ps2_close(struct serio *io) | ||
| 74 | { | ||
| 75 | struct ps2if *ps2if = io->port_data; | ||
| 76 | |||
| 77 | writel(0, ps2if->base); /* disable rx irq */ | ||
| 78 | } | ||
| 79 | |||
| 80 | /* | ||
| 81 | * Add one device to this driver. | ||
| 82 | */ | ||
| 83 | static int __devinit altera_ps2_probe(struct platform_device *pdev) | ||
| 84 | { | ||
| 85 | struct ps2if *ps2if; | ||
| 86 | struct serio *serio; | ||
| 87 | int error, irq; | ||
| 88 | |||
| 89 | ps2if = kzalloc(sizeof(struct ps2if), GFP_KERNEL); | ||
| 90 | serio = kzalloc(sizeof(struct serio), GFP_KERNEL); | ||
| 91 | if (!ps2if || !serio) { | ||
| 92 | error = -ENOMEM; | ||
| 93 | goto err_free_mem; | ||
| 94 | } | ||
| 95 | |||
| 96 | serio->id.type = SERIO_8042; | ||
| 97 | serio->write = altera_ps2_write; | ||
| 98 | serio->open = altera_ps2_open; | ||
| 99 | serio->close = altera_ps2_close; | ||
| 100 | strlcpy(serio->name, dev_name(&pdev->dev), sizeof(serio->name)); | ||
| 101 | strlcpy(serio->phys, dev_name(&pdev->dev), sizeof(serio->phys)); | ||
| 102 | serio->port_data = ps2if; | ||
| 103 | serio->dev.parent = &pdev->dev; | ||
| 104 | ps2if->io = serio; | ||
| 105 | |||
| 106 | ps2if->iomem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
| 107 | if (ps2if->iomem_res == NULL) { | ||
| 108 | error = -ENOENT; | ||
| 109 | goto err_free_mem; | ||
| 110 | } | ||
| 111 | |||
| 112 | |||
| 113 | irq = platform_get_irq(pdev, 0); | ||
| 114 | if (irq < 0) { | ||
| 115 | error = -ENXIO; | ||
| 116 | goto err_free_mem; | ||
| 117 | } | ||
| 118 | ps2if->irq = irq; | ||
| 119 | |||
| 120 | if (!request_mem_region(ps2if->iomem_res->start, | ||
| 121 | resource_size(ps2if->iomem_res), pdev->name)) { | ||
| 122 | error = -EBUSY; | ||
| 123 | goto err_free_mem; | ||
| 124 | } | ||
| 125 | |||
| 126 | ps2if->base = ioremap(ps2if->iomem_res->start, | ||
| 127 | resource_size(ps2if->iomem_res)); | ||
| 128 | if (!ps2if->base) { | ||
| 129 | error = -ENOMEM; | ||
| 130 | goto err_free_res; | ||
| 131 | } | ||
| 132 | |||
| 133 | error = request_irq(ps2if->irq, altera_ps2_rxint, 0, pdev->name, ps2if); | ||
| 134 | if (error) { | ||
| 135 | dev_err(&pdev->dev, "could not allocate IRQ %d: %d\n", | ||
| 136 | ps2if->irq, error); | ||
| 137 | goto err_unmap; | ||
| 138 | } | ||
| 139 | |||
| 140 | dev_info(&pdev->dev, "base %p, irq %d\n", ps2if->base, ps2if->irq); | ||
| 141 | |||
| 142 | serio_register_port(ps2if->io); | ||
| 143 | platform_set_drvdata(pdev, ps2if); | ||
| 144 | |||
| 145 | return 0; | ||
| 146 | |||
| 147 | err_unmap: | ||
| 148 | iounmap(ps2if->base); | ||
| 149 | err_free_res: | ||
| 150 | release_mem_region(ps2if->iomem_res->start, | ||
| 151 | resource_size(ps2if->iomem_res)); | ||
| 152 | err_free_mem: | ||
| 153 | kfree(ps2if); | ||
| 154 | kfree(serio); | ||
| 155 | return error; | ||
| 156 | } | ||
| 157 | |||
| 158 | /* | ||
| 159 | * Remove one device from this driver. | ||
| 160 | */ | ||
| 161 | static int __devexit altera_ps2_remove(struct platform_device *pdev) | ||
| 162 | { | ||
| 163 | struct ps2if *ps2if = platform_get_drvdata(pdev); | ||
| 164 | |||
| 165 | platform_set_drvdata(pdev, NULL); | ||
| 166 | serio_unregister_port(ps2if->io); | ||
| 167 | free_irq(ps2if->irq, ps2if); | ||
| 168 | iounmap(ps2if->base); | ||
| 169 | release_mem_region(ps2if->iomem_res->start, | ||
| 170 | resource_size(ps2if->iomem_res)); | ||
| 171 | kfree(ps2if); | ||
| 172 | |||
| 173 | return 0; | ||
| 174 | } | ||
| 175 | |||
| 176 | /* | ||
| 177 | * Our device driver structure | ||
| 178 | */ | ||
| 179 | static struct platform_driver altera_ps2_driver = { | ||
| 180 | .probe = altera_ps2_probe, | ||
| 181 | .remove = __devexit_p(altera_ps2_remove), | ||
| 182 | .driver = { | ||
| 183 | .name = DRV_NAME, | ||
| 184 | .owner = THIS_MODULE, | ||
| 185 | }, | ||
| 186 | }; | ||
| 187 | |||
| 188 | static int __init altera_ps2_init(void) | ||
| 189 | { | ||
| 190 | return platform_driver_register(&altera_ps2_driver); | ||
| 191 | } | ||
| 192 | |||
| 193 | static void __exit altera_ps2_exit(void) | ||
| 194 | { | ||
| 195 | platform_driver_unregister(&altera_ps2_driver); | ||
| 196 | } | ||
| 197 | |||
| 198 | module_init(altera_ps2_init); | ||
| 199 | module_exit(altera_ps2_exit); | ||
| 200 | |||
| 201 | MODULE_DESCRIPTION("Altera University Program PS2 controller driver"); | ||
| 202 | MODULE_AUTHOR("Thomas Chou <thomas@wytron.com.tw>"); | ||
| 203 | MODULE_LICENSE("GPL"); | ||
| 204 | MODULE_ALIAS("platform:" DRV_NAME); | ||
diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c index 89b394183a75..92563a681d65 100644 --- a/drivers/input/serio/ambakmi.c +++ b/drivers/input/serio/ambakmi.c | |||
| @@ -107,7 +107,7 @@ static void amba_kmi_close(struct serio *io) | |||
| 107 | clk_disable(kmi->clk); | 107 | clk_disable(kmi->clk); |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | static int amba_kmi_probe(struct amba_device *dev, struct amba_id *id) | 110 | static int __devinit amba_kmi_probe(struct amba_device *dev, struct amba_id *id) |
| 111 | { | 111 | { |
| 112 | struct amba_kmi_port *kmi; | 112 | struct amba_kmi_port *kmi; |
| 113 | struct serio *io; | 113 | struct serio *io; |
| @@ -134,7 +134,7 @@ static int amba_kmi_probe(struct amba_device *dev, struct amba_id *id) | |||
| 134 | io->port_data = kmi; | 134 | io->port_data = kmi; |
| 135 | io->dev.parent = &dev->dev; | 135 | io->dev.parent = &dev->dev; |
| 136 | 136 | ||
| 137 | kmi->io = io; | 137 | kmi->io = io; |
| 138 | kmi->base = ioremap(dev->res.start, resource_size(&dev->res)); | 138 | kmi->base = ioremap(dev->res.start, resource_size(&dev->res)); |
| 139 | if (!kmi->base) { | 139 | if (!kmi->base) { |
| 140 | ret = -ENOMEM; | 140 | ret = -ENOMEM; |
| @@ -162,7 +162,7 @@ static int amba_kmi_probe(struct amba_device *dev, struct amba_id *id) | |||
| 162 | return ret; | 162 | return ret; |
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | static int amba_kmi_remove(struct amba_device *dev) | 165 | static int __devexit amba_kmi_remove(struct amba_device *dev) |
| 166 | { | 166 | { |
| 167 | struct amba_kmi_port *kmi = amba_get_drvdata(dev); | 167 | struct amba_kmi_port *kmi = amba_get_drvdata(dev); |
| 168 | 168 | ||
| @@ -197,10 +197,11 @@ static struct amba_id amba_kmi_idtable[] = { | |||
| 197 | static struct amba_driver ambakmi_driver = { | 197 | static struct amba_driver ambakmi_driver = { |
| 198 | .drv = { | 198 | .drv = { |
| 199 | .name = "kmi-pl050", | 199 | .name = "kmi-pl050", |
| 200 | .owner = THIS_MODULE, | ||
| 200 | }, | 201 | }, |
| 201 | .id_table = amba_kmi_idtable, | 202 | .id_table = amba_kmi_idtable, |
| 202 | .probe = amba_kmi_probe, | 203 | .probe = amba_kmi_probe, |
| 203 | .remove = amba_kmi_remove, | 204 | .remove = __devexit_p(amba_kmi_remove), |
| 204 | .resume = amba_kmi_resume, | 205 | .resume = amba_kmi_resume, |
| 205 | }; | 206 | }; |
| 206 | 207 | ||
diff --git a/drivers/input/serio/at32psif.c b/drivers/input/serio/at32psif.c index a6fb7a3dcc46..6ee8f0ddad51 100644 --- a/drivers/input/serio/at32psif.c +++ b/drivers/input/serio/at32psif.c | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
| 19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
| 20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
| 21 | #include <linux/slab.h> | ||
| 21 | 22 | ||
| 22 | /* PSIF register offsets */ | 23 | /* PSIF register offsets */ |
| 23 | #define PSIF_CR 0x00 | 24 | #define PSIF_CR 0x00 |
| @@ -137,7 +138,7 @@ static int psif_write(struct serio *io, unsigned char val) | |||
| 137 | spin_lock_irqsave(&psif->lock, flags); | 138 | spin_lock_irqsave(&psif->lock, flags); |
| 138 | 139 | ||
| 139 | while (!(psif_readl(psif, SR) & PSIF_BIT(TXEMPTY)) && timeout--) | 140 | while (!(psif_readl(psif, SR) & PSIF_BIT(TXEMPTY)) && timeout--) |
| 140 | msleep(10); | 141 | udelay(50); |
| 141 | 142 | ||
| 142 | if (timeout >= 0) { | 143 | if (timeout >= 0) { |
| 143 | psif_writel(psif, THR, val); | 144 | psif_writel(psif, THR, val); |
| @@ -352,6 +353,7 @@ static struct platform_driver psif_driver = { | |||
| 352 | .remove = __exit_p(psif_remove), | 353 | .remove = __exit_p(psif_remove), |
| 353 | .driver = { | 354 | .driver = { |
| 354 | .name = "atmel_psif", | 355 | .name = "atmel_psif", |
| 356 | .owner = THIS_MODULE, | ||
| 355 | }, | 357 | }, |
| 356 | .suspend = psif_suspend, | 358 | .suspend = psif_suspend, |
| 357 | .resume = psif_resume, | 359 | .resume = psif_resume, |
diff --git a/drivers/input/serio/ct82c710.c b/drivers/input/serio/ct82c710.c index d1380fc72cc6..4a3084695c00 100644 --- a/drivers/input/serio/ct82c710.c +++ b/drivers/input/serio/ct82c710.c | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | #include <linux/errno.h> | 35 | #include <linux/errno.h> |
| 36 | #include <linux/err.h> | 36 | #include <linux/err.h> |
| 37 | #include <linux/platform_device.h> | 37 | #include <linux/platform_device.h> |
| 38 | #include <linux/slab.h> | ||
| 38 | 39 | ||
| 39 | #include <asm/io.h> | 40 | #include <asm/io.h> |
| 40 | 41 | ||
diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c index bd0f92d9f40f..3c287dd879d3 100644 --- a/drivers/input/serio/gscps2.c +++ b/drivers/input/serio/gscps2.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | * Copyright (c) 2002 Thibaut Varene <varenet@parisc-linux.org> | 6 | * Copyright (c) 2002 Thibaut Varene <varenet@parisc-linux.org> |
| 7 | * | 7 | * |
| 8 | * Pieces of code based on linux-2.4's hp_mouse.c & hp_keyb.c | 8 | * Pieces of code based on linux-2.4's hp_mouse.c & hp_keyb.c |
| 9 | * Copyright (c) 1999 Alex deVries <alex@onefishtwo.ca> | 9 | * Copyright (c) 1999 Alex deVries <alex@onefishtwo.ca> |
| 10 | * Copyright (c) 1999-2000 Philipp Rumpf <prumpf@tux.org> | 10 | * Copyright (c) 1999-2000 Philipp Rumpf <prumpf@tux.org> |
| 11 | * Copyright (c) 2000 Xavier Debacker <debackex@esiee.fr> | 11 | * Copyright (c) 2000 Xavier Debacker <debackex@esiee.fr> |
| 12 | * Copyright (c) 2000-2001 Thomas Marteau <marteaut@esiee.fr> | 12 | * Copyright (c) 2000-2001 Thomas Marteau <marteaut@esiee.fr> |
| @@ -24,6 +24,7 @@ | |||
| 24 | 24 | ||
| 25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
| 26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
| 27 | #include <linux/slab.h> | ||
| 27 | #include <linux/serio.h> | 28 | #include <linux/serio.h> |
| 28 | #include <linux/input.h> | 29 | #include <linux/input.h> |
| 29 | #include <linux/interrupt.h> | 30 | #include <linux/interrupt.h> |
| @@ -326,7 +327,7 @@ static void gscps2_close(struct serio *port) | |||
| 326 | * @return: success/error report | 327 | * @return: success/error report |
| 327 | */ | 328 | */ |
| 328 | 329 | ||
| 329 | static int __init gscps2_probe(struct parisc_device *dev) | 330 | static int __devinit gscps2_probe(struct parisc_device *dev) |
| 330 | { | 331 | { |
| 331 | struct gscps2port *ps2port; | 332 | struct gscps2port *ps2port; |
| 332 | struct serio *serio; | 333 | struct serio *serio; |
| @@ -443,7 +444,7 @@ static struct parisc_driver parisc_ps2_driver = { | |||
| 443 | .name = "gsc_ps2", | 444 | .name = "gsc_ps2", |
| 444 | .id_table = gscps2_device_tbl, | 445 | .id_table = gscps2_device_tbl, |
| 445 | .probe = gscps2_probe, | 446 | .probe = gscps2_probe, |
| 446 | .remove = gscps2_remove, | 447 | .remove = __devexit_p(gscps2_remove), |
| 447 | }; | 448 | }; |
| 448 | 449 | ||
| 449 | static int __init gscps2_init(void) | 450 | static int __init gscps2_init(void) |
diff --git a/drivers/input/serio/hil_mlc.c b/drivers/input/serio/hil_mlc.c index 7ba9f2b2c041..c92f4edfee7b 100644 --- a/drivers/input/serio/hil_mlc.c +++ b/drivers/input/serio/hil_mlc.c | |||
| @@ -58,6 +58,7 @@ | |||
| 58 | #include <linux/module.h> | 58 | #include <linux/module.h> |
| 59 | #include <linux/init.h> | 59 | #include <linux/init.h> |
| 60 | #include <linux/interrupt.h> | 60 | #include <linux/interrupt.h> |
| 61 | #include <linux/slab.h> | ||
| 61 | #include <linux/timer.h> | 62 | #include <linux/timer.h> |
| 62 | #include <linux/list.h> | 63 | #include <linux/list.h> |
| 63 | 64 | ||
| @@ -993,10 +994,8 @@ int hil_mlc_unregister(hil_mlc *mlc) | |||
| 993 | 994 | ||
| 994 | static int __init hil_mlc_init(void) | 995 | static int __init hil_mlc_init(void) |
| 995 | { | 996 | { |
| 996 | init_timer(&hil_mlcs_kicker); | 997 | setup_timer(&hil_mlcs_kicker, &hil_mlcs_timer, 0); |
| 997 | hil_mlcs_kicker.expires = jiffies + HZ; | 998 | mod_timer(&hil_mlcs_kicker, jiffies + HZ); |
| 998 | hil_mlcs_kicker.function = &hil_mlcs_timer; | ||
| 999 | add_timer(&hil_mlcs_kicker); | ||
| 1000 | 999 | ||
| 1001 | tasklet_enable(&hil_mlcs_tasklet); | 1000 | tasklet_enable(&hil_mlcs_tasklet); |
| 1002 | 1001 | ||
| @@ -1005,7 +1004,7 @@ static int __init hil_mlc_init(void) | |||
| 1005 | 1004 | ||
| 1006 | static void __exit hil_mlc_exit(void) | 1005 | static void __exit hil_mlc_exit(void) |
| 1007 | { | 1006 | { |
| 1008 | del_timer(&hil_mlcs_kicker); | 1007 | del_timer_sync(&hil_mlcs_kicker); |
| 1009 | 1008 | ||
| 1010 | tasklet_disable(&hil_mlcs_tasklet); | 1009 | tasklet_disable(&hil_mlcs_tasklet); |
| 1011 | tasklet_kill(&hil_mlcs_tasklet); | 1010 | tasklet_kill(&hil_mlcs_tasklet); |
diff --git a/drivers/input/serio/hp_sdc.c b/drivers/input/serio/hp_sdc.c index 1c9410d1822c..bcc2d30ec245 100644 --- a/drivers/input/serio/hp_sdc.c +++ b/drivers/input/serio/hp_sdc.c | |||
| @@ -955,7 +955,7 @@ static int __init hp_sdc_init_hppa(struct parisc_device *d) | |||
| 955 | INIT_DELAYED_WORK(&moduleloader_work, request_module_delayed); | 955 | INIT_DELAYED_WORK(&moduleloader_work, request_module_delayed); |
| 956 | 956 | ||
| 957 | ret = hp_sdc_init(); | 957 | ret = hp_sdc_init(); |
| 958 | /* after sucessfull initialization give SDC some time to settle | 958 | /* after successfull initialization give SDC some time to settle |
| 959 | * and then load the hp_sdc_mlc upper layer driver */ | 959 | * and then load the hp_sdc_mlc upper layer driver */ |
| 960 | if (!ret) | 960 | if (!ret) |
| 961 | schedule_delayed_work(&moduleloader_work, | 961 | schedule_delayed_work(&moduleloader_work, |
diff --git a/drivers/input/serio/hp_sdc_mlc.c b/drivers/input/serio/hp_sdc_mlc.c index 820e51673b26..7d2b820ef58d 100644 --- a/drivers/input/serio/hp_sdc_mlc.c +++ b/drivers/input/serio/hp_sdc_mlc.c | |||
| @@ -125,7 +125,7 @@ static void hp_sdc_mlc_isr (int irq, void *dev_id, | |||
| 125 | break; | 125 | break; |
| 126 | 126 | ||
| 127 | default: | 127 | default: |
| 128 | printk(KERN_WARNING PREFIX "Unkown HIL Error status (%x)!\n", data); | 128 | printk(KERN_WARNING PREFIX "Unknown HIL Error status (%x)!\n", data); |
| 129 | break; | 129 | break; |
| 130 | } | 130 | } |
| 131 | 131 | ||
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index 2bcf1ace27c0..ead0494721d0 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h | |||
| @@ -67,10 +67,12 @@ static inline void i8042_write_command(int val) | |||
| 67 | 67 | ||
| 68 | #include <linux/dmi.h> | 68 | #include <linux/dmi.h> |
| 69 | 69 | ||
| 70 | static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = { | 70 | static const struct dmi_system_id __initconst i8042_dmi_noloop_table[] = { |
| 71 | { | 71 | { |
| 72 | /* AUX LOOP command does not raise AUX IRQ */ | 72 | /* |
| 73 | .ident = "Arima-Rioworks HDAMB", | 73 | * Arima-Rioworks HDAMB - |
| 74 | * AUX LOOP command does not raise AUX IRQ | ||
| 75 | */ | ||
| 74 | .matches = { | 76 | .matches = { |
| 75 | DMI_MATCH(DMI_BOARD_VENDOR, "RIOWORKS"), | 77 | DMI_MATCH(DMI_BOARD_VENDOR, "RIOWORKS"), |
| 76 | DMI_MATCH(DMI_BOARD_NAME, "HDAMB"), | 78 | DMI_MATCH(DMI_BOARD_NAME, "HDAMB"), |
| @@ -78,7 +80,7 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = { | |||
| 78 | }, | 80 | }, |
| 79 | }, | 81 | }, |
| 80 | { | 82 | { |
| 81 | .ident = "ASUS G1S", | 83 | /* ASUS G1S */ |
| 82 | .matches = { | 84 | .matches = { |
| 83 | DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer Inc."), | 85 | DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer Inc."), |
| 84 | DMI_MATCH(DMI_BOARD_NAME, "G1S"), | 86 | DMI_MATCH(DMI_BOARD_NAME, "G1S"), |
| @@ -86,8 +88,7 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = { | |||
| 86 | }, | 88 | }, |
| 87 | }, | 89 | }, |
| 88 | { | 90 | { |
| 89 | /* AUX LOOP command does not raise AUX IRQ */ | 91 | /* ASUS P65UP5 - AUX LOOP command does not raise AUX IRQ */ |
| 90 | .ident = "ASUS P65UP5", | ||
| 91 | .matches = { | 92 | .matches = { |
| 92 | DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), | 93 | DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), |
| 93 | DMI_MATCH(DMI_BOARD_NAME, "P/I-P65UP5"), | 94 | DMI_MATCH(DMI_BOARD_NAME, "P/I-P65UP5"), |
| @@ -95,7 +96,6 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = { | |||
| 95 | }, | 96 | }, |
| 96 | }, | 97 | }, |
| 97 | { | 98 | { |
| 98 | .ident = "Compaq Proliant 8500", | ||
| 99 | .matches = { | 99 | .matches = { |
| 100 | DMI_MATCH(DMI_SYS_VENDOR, "Compaq"), | 100 | DMI_MATCH(DMI_SYS_VENDOR, "Compaq"), |
| 101 | DMI_MATCH(DMI_PRODUCT_NAME , "ProLiant"), | 101 | DMI_MATCH(DMI_PRODUCT_NAME , "ProLiant"), |
| @@ -103,7 +103,6 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = { | |||
| 103 | }, | 103 | }, |
| 104 | }, | 104 | }, |
| 105 | { | 105 | { |
| 106 | .ident = "Compaq Proliant DL760", | ||
| 107 | .matches = { | 106 | .matches = { |
| 108 | DMI_MATCH(DMI_SYS_VENDOR, "Compaq"), | 107 | DMI_MATCH(DMI_SYS_VENDOR, "Compaq"), |
| 109 | DMI_MATCH(DMI_PRODUCT_NAME , "ProLiant"), | 108 | DMI_MATCH(DMI_PRODUCT_NAME , "ProLiant"), |
| @@ -111,7 +110,7 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = { | |||
| 111 | }, | 110 | }, |
| 112 | }, | 111 | }, |
| 113 | { | 112 | { |
| 114 | .ident = "OQO Model 01", | 113 | /* OQO Model 01 */ |
| 115 | .matches = { | 114 | .matches = { |
| 116 | DMI_MATCH(DMI_SYS_VENDOR, "OQO"), | 115 | DMI_MATCH(DMI_SYS_VENDOR, "OQO"), |
| 117 | DMI_MATCH(DMI_PRODUCT_NAME, "ZEPTO"), | 116 | DMI_MATCH(DMI_PRODUCT_NAME, "ZEPTO"), |
| @@ -119,8 +118,7 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = { | |||
| 119 | }, | 118 | }, |
| 120 | }, | 119 | }, |
| 121 | { | 120 | { |
| 122 | /* AUX LOOP does not work properly */ | 121 | /* ULI EV4873 - AUX LOOP does not work properly */ |
| 123 | .ident = "ULI EV4873", | ||
| 124 | .matches = { | 122 | .matches = { |
| 125 | DMI_MATCH(DMI_SYS_VENDOR, "ULI"), | 123 | DMI_MATCH(DMI_SYS_VENDOR, "ULI"), |
| 126 | DMI_MATCH(DMI_PRODUCT_NAME, "EV4873"), | 124 | DMI_MATCH(DMI_PRODUCT_NAME, "EV4873"), |
| @@ -128,7 +126,7 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = { | |||
| 128 | }, | 126 | }, |
| 129 | }, | 127 | }, |
| 130 | { | 128 | { |
| 131 | .ident = "Microsoft Virtual Machine", | 129 | /* Microsoft Virtual Machine */ |
| 132 | .matches = { | 130 | .matches = { |
| 133 | DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"), | 131 | DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"), |
| 134 | DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"), | 132 | DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"), |
| @@ -136,7 +134,7 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = { | |||
| 136 | }, | 134 | }, |
| 137 | }, | 135 | }, |
| 138 | { | 136 | { |
| 139 | .ident = "Medion MAM 2070", | 137 | /* Medion MAM 2070 */ |
| 140 | .matches = { | 138 | .matches = { |
| 141 | DMI_MATCH(DMI_SYS_VENDOR, "Notebook"), | 139 | DMI_MATCH(DMI_SYS_VENDOR, "Notebook"), |
| 142 | DMI_MATCH(DMI_PRODUCT_NAME, "MAM 2070"), | 140 | DMI_MATCH(DMI_PRODUCT_NAME, "MAM 2070"), |
| @@ -144,7 +142,7 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = { | |||
| 144 | }, | 142 | }, |
| 145 | }, | 143 | }, |
| 146 | { | 144 | { |
| 147 | .ident = "Blue FB5601", | 145 | /* Blue FB5601 */ |
| 148 | .matches = { | 146 | .matches = { |
| 149 | DMI_MATCH(DMI_SYS_VENDOR, "blue"), | 147 | DMI_MATCH(DMI_SYS_VENDOR, "blue"), |
| 150 | DMI_MATCH(DMI_PRODUCT_NAME, "FB5601"), | 148 | DMI_MATCH(DMI_PRODUCT_NAME, "FB5601"), |
| @@ -152,7 +150,7 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = { | |||
| 152 | }, | 150 | }, |
| 153 | }, | 151 | }, |
| 154 | { | 152 | { |
| 155 | .ident = "Gigabyte M912", | 153 | /* Gigabyte M912 */ |
| 156 | .matches = { | 154 | .matches = { |
| 157 | DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"), | 155 | DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"), |
| 158 | DMI_MATCH(DMI_PRODUCT_NAME, "M912"), | 156 | DMI_MATCH(DMI_PRODUCT_NAME, "M912"), |
| @@ -160,7 +158,14 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = { | |||
| 160 | }, | 158 | }, |
| 161 | }, | 159 | }, |
| 162 | { | 160 | { |
| 163 | .ident = "HP DV9700", | 161 | /* Gigabyte M1022M netbook */ |
| 162 | .matches = { | ||
| 163 | DMI_MATCH(DMI_BOARD_VENDOR, "Gigabyte Technology Co.,Ltd."), | ||
| 164 | DMI_MATCH(DMI_BOARD_NAME, "M1022E"), | ||
| 165 | DMI_MATCH(DMI_BOARD_VERSION, "1.02"), | ||
| 166 | }, | ||
| 167 | }, | ||
| 168 | { | ||
| 164 | .matches = { | 169 | .matches = { |
| 165 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | 170 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), |
| 166 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv9700"), | 171 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv9700"), |
| @@ -177,72 +182,72 @@ static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = { | |||
| 177 | * ... apparently some Toshibas don't like MUX mode either and | 182 | * ... apparently some Toshibas don't like MUX mode either and |
| 178 | * die horrible death on reboot. | 183 | * die horrible death on reboot. |
| 179 | */ | 184 | */ |
| 180 | static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { | 185 | static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = { |
| 181 | { | 186 | { |
| 182 | .ident = "Fujitsu Lifebook P7010/P7010D", | 187 | /* Fujitsu Lifebook P7010/P7010D */ |
| 183 | .matches = { | 188 | .matches = { |
| 184 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), | 189 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), |
| 185 | DMI_MATCH(DMI_PRODUCT_NAME, "P7010"), | 190 | DMI_MATCH(DMI_PRODUCT_NAME, "P7010"), |
| 186 | }, | 191 | }, |
| 187 | }, | 192 | }, |
| 188 | { | 193 | { |
| 189 | .ident = "Fujitsu Lifebook P7010", | 194 | /* Fujitsu Lifebook P7010 */ |
| 190 | .matches = { | 195 | .matches = { |
| 191 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), | 196 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), |
| 192 | DMI_MATCH(DMI_PRODUCT_NAME, "0000000000"), | 197 | DMI_MATCH(DMI_PRODUCT_NAME, "0000000000"), |
| 193 | }, | 198 | }, |
| 194 | }, | 199 | }, |
| 195 | { | 200 | { |
| 196 | .ident = "Fujitsu Lifebook P5020D", | 201 | /* Fujitsu Lifebook P5020D */ |
| 197 | .matches = { | 202 | .matches = { |
| 198 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), | 203 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), |
| 199 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook P Series"), | 204 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook P Series"), |
| 200 | }, | 205 | }, |
| 201 | }, | 206 | }, |
| 202 | { | 207 | { |
| 203 | .ident = "Fujitsu Lifebook S2000", | 208 | /* Fujitsu Lifebook S2000 */ |
| 204 | .matches = { | 209 | .matches = { |
| 205 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), | 210 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), |
| 206 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S Series"), | 211 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S Series"), |
| 207 | }, | 212 | }, |
| 208 | }, | 213 | }, |
| 209 | { | 214 | { |
| 210 | .ident = "Fujitsu Lifebook S6230", | 215 | /* Fujitsu Lifebook S6230 */ |
| 211 | .matches = { | 216 | .matches = { |
| 212 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), | 217 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), |
| 213 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S6230"), | 218 | DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S6230"), |
| 214 | }, | 219 | }, |
| 215 | }, | 220 | }, |
| 216 | { | 221 | { |
| 217 | .ident = "Fujitsu T70H", | 222 | /* Fujitsu T70H */ |
| 218 | .matches = { | 223 | .matches = { |
| 219 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), | 224 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), |
| 220 | DMI_MATCH(DMI_PRODUCT_NAME, "FMVLT70H"), | 225 | DMI_MATCH(DMI_PRODUCT_NAME, "FMVLT70H"), |
| 221 | }, | 226 | }, |
| 222 | }, | 227 | }, |
| 223 | { | 228 | { |
| 224 | .ident = "Fujitsu-Siemens Lifebook T3010", | 229 | /* Fujitsu-Siemens Lifebook T3010 */ |
| 225 | .matches = { | 230 | .matches = { |
| 226 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), | 231 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), |
| 227 | DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK T3010"), | 232 | DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK T3010"), |
| 228 | }, | 233 | }, |
| 229 | }, | 234 | }, |
| 230 | { | 235 | { |
| 231 | .ident = "Fujitsu-Siemens Lifebook E4010", | 236 | /* Fujitsu-Siemens Lifebook E4010 */ |
| 232 | .matches = { | 237 | .matches = { |
| 233 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), | 238 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), |
| 234 | DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E4010"), | 239 | DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E4010"), |
| 235 | }, | 240 | }, |
| 236 | }, | 241 | }, |
| 237 | { | 242 | { |
| 238 | .ident = "Fujitsu-Siemens Amilo Pro 2010", | 243 | /* Fujitsu-Siemens Amilo Pro 2010 */ |
| 239 | .matches = { | 244 | .matches = { |
| 240 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), | 245 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), |
| 241 | DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pro V2010"), | 246 | DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pro V2010"), |
| 242 | }, | 247 | }, |
| 243 | }, | 248 | }, |
| 244 | { | 249 | { |
| 245 | .ident = "Fujitsu-Siemens Amilo Pro 2030", | 250 | /* Fujitsu-Siemens Amilo Pro 2030 */ |
| 246 | .matches = { | 251 | .matches = { |
| 247 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), | 252 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), |
| 248 | DMI_MATCH(DMI_PRODUCT_NAME, "AMILO PRO V2030"), | 253 | DMI_MATCH(DMI_PRODUCT_NAME, "AMILO PRO V2030"), |
| @@ -253,7 +258,7 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { | |||
| 253 | * No data is coming from the touchscreen unless KBC | 258 | * No data is coming from the touchscreen unless KBC |
| 254 | * is in legacy mode. | 259 | * is in legacy mode. |
| 255 | */ | 260 | */ |
| 256 | .ident = "Panasonic CF-29", | 261 | /* Panasonic CF-29 */ |
| 257 | .matches = { | 262 | .matches = { |
| 258 | DMI_MATCH(DMI_SYS_VENDOR, "Matsushita"), | 263 | DMI_MATCH(DMI_SYS_VENDOR, "Matsushita"), |
| 259 | DMI_MATCH(DMI_PRODUCT_NAME, "CF-29"), | 264 | DMI_MATCH(DMI_PRODUCT_NAME, "CF-29"), |
| @@ -261,10 +266,10 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { | |||
| 261 | }, | 266 | }, |
| 262 | { | 267 | { |
| 263 | /* | 268 | /* |
| 264 | * Errors on MUX ports are reported without raising AUXDATA | 269 | * HP Pavilion DV4017EA - |
| 270 | * errors on MUX ports are reported without raising AUXDATA | ||
| 265 | * causing "spurious NAK" messages. | 271 | * causing "spurious NAK" messages. |
| 266 | */ | 272 | */ |
| 267 | .ident = "HP Pavilion DV4017EA", | ||
| 268 | .matches = { | 273 | .matches = { |
| 269 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | 274 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), |
| 270 | DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion dv4000 (EA032EA#ABF)"), | 275 | DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion dv4000 (EA032EA#ABF)"), |
| @@ -272,9 +277,9 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { | |||
| 272 | }, | 277 | }, |
| 273 | { | 278 | { |
| 274 | /* | 279 | /* |
| 275 | * Like DV4017EA does not raise AUXERR for errors on MUX ports. | 280 | * HP Pavilion ZT1000 - |
| 281 | * like DV4017EA does not raise AUXERR for errors on MUX ports. | ||
| 276 | */ | 282 | */ |
| 277 | .ident = "HP Pavilion ZT1000", | ||
| 278 | .matches = { | 283 | .matches = { |
| 279 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | 284 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), |
| 280 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion Notebook PC"), | 285 | DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion Notebook PC"), |
| @@ -283,44 +288,41 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { | |||
| 283 | }, | 288 | }, |
| 284 | { | 289 | { |
| 285 | /* | 290 | /* |
| 286 | * Like DV4017EA does not raise AUXERR for errors on MUX ports. | 291 | * HP Pavilion DV4270ca - |
| 292 | * like DV4017EA does not raise AUXERR for errors on MUX ports. | ||
| 287 | */ | 293 | */ |
| 288 | .ident = "HP Pavilion DV4270ca", | ||
| 289 | .matches = { | 294 | .matches = { |
| 290 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | 295 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), |
| 291 | DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion dv4000 (EH476UA#ABL)"), | 296 | DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion dv4000 (EH476UA#ABL)"), |
| 292 | }, | 297 | }, |
| 293 | }, | 298 | }, |
| 294 | { | 299 | { |
| 295 | .ident = "Toshiba P10", | ||
| 296 | .matches = { | 300 | .matches = { |
| 297 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | 301 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), |
| 298 | DMI_MATCH(DMI_PRODUCT_NAME, "Satellite P10"), | 302 | DMI_MATCH(DMI_PRODUCT_NAME, "Satellite P10"), |
| 299 | }, | 303 | }, |
| 300 | }, | 304 | }, |
| 301 | { | 305 | { |
| 302 | .ident = "Toshiba Equium A110", | ||
| 303 | .matches = { | 306 | .matches = { |
| 304 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | 307 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), |
| 305 | DMI_MATCH(DMI_PRODUCT_NAME, "EQUIUM A110"), | 308 | DMI_MATCH(DMI_PRODUCT_NAME, "EQUIUM A110"), |
| 306 | }, | 309 | }, |
| 307 | }, | 310 | }, |
| 308 | { | 311 | { |
| 309 | .ident = "Alienware Sentia", | ||
| 310 | .matches = { | 312 | .matches = { |
| 311 | DMI_MATCH(DMI_SYS_VENDOR, "ALIENWARE"), | 313 | DMI_MATCH(DMI_SYS_VENDOR, "ALIENWARE"), |
| 312 | DMI_MATCH(DMI_PRODUCT_NAME, "Sentia"), | 314 | DMI_MATCH(DMI_PRODUCT_NAME, "Sentia"), |
| 313 | }, | 315 | }, |
| 314 | }, | 316 | }, |
| 315 | { | 317 | { |
| 316 | .ident = "Sharp Actius MM20", | 318 | /* Sharp Actius MM20 */ |
| 317 | .matches = { | 319 | .matches = { |
| 318 | DMI_MATCH(DMI_SYS_VENDOR, "SHARP"), | 320 | DMI_MATCH(DMI_SYS_VENDOR, "SHARP"), |
| 319 | DMI_MATCH(DMI_PRODUCT_NAME, "PC-MM20 Series"), | 321 | DMI_MATCH(DMI_PRODUCT_NAME, "PC-MM20 Series"), |
| 320 | }, | 322 | }, |
| 321 | }, | 323 | }, |
| 322 | { | 324 | { |
| 323 | .ident = "Sony Vaio FS-115b", | 325 | /* Sony Vaio FS-115b */ |
| 324 | .matches = { | 326 | .matches = { |
| 325 | DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), | 327 | DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), |
| 326 | DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FS115B"), | 328 | DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FS115B"), |
| @@ -328,73 +330,72 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { | |||
| 328 | }, | 330 | }, |
| 329 | { | 331 | { |
| 330 | /* | 332 | /* |
| 331 | * Reset and GET ID commands issued via KBD port are | 333 | * Sony Vaio FZ-240E - |
| 334 | * reset and GET ID commands issued via KBD port are | ||
| 332 | * sometimes being delivered to AUX3. | 335 | * sometimes being delivered to AUX3. |
| 333 | */ | 336 | */ |
| 334 | .ident = "Sony Vaio FZ-240E", | ||
| 335 | .matches = { | 337 | .matches = { |
| 336 | DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), | 338 | DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), |
| 337 | DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ240E"), | 339 | DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ240E"), |
| 338 | }, | 340 | }, |
| 339 | }, | 341 | }, |
| 340 | { | 342 | { |
| 341 | .ident = "Amoi M636/A737", | 343 | /* Amoi M636/A737 */ |
| 342 | .matches = { | 344 | .matches = { |
| 343 | DMI_MATCH(DMI_SYS_VENDOR, "Amoi Electronics CO.,LTD."), | 345 | DMI_MATCH(DMI_SYS_VENDOR, "Amoi Electronics CO.,LTD."), |
| 344 | DMI_MATCH(DMI_PRODUCT_NAME, "M636/A737 platform"), | 346 | DMI_MATCH(DMI_PRODUCT_NAME, "M636/A737 platform"), |
| 345 | }, | 347 | }, |
| 346 | }, | 348 | }, |
| 347 | { | 349 | { |
| 348 | .ident = "Lenovo 3000 n100", | 350 | /* Lenovo 3000 n100 */ |
| 349 | .matches = { | 351 | .matches = { |
| 350 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | 352 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), |
| 351 | DMI_MATCH(DMI_PRODUCT_NAME, "076804U"), | 353 | DMI_MATCH(DMI_PRODUCT_NAME, "076804U"), |
| 352 | }, | 354 | }, |
| 353 | }, | 355 | }, |
| 354 | { | 356 | { |
| 355 | .ident = "Acer Aspire 1360", | ||
| 356 | .matches = { | 357 | .matches = { |
| 357 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | 358 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), |
| 358 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 1360"), | 359 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 1360"), |
| 359 | }, | 360 | }, |
| 360 | }, | 361 | }, |
| 361 | { | 362 | { |
| 362 | .ident = "Gericom Bellagio", | 363 | /* Gericom Bellagio */ |
| 363 | .matches = { | 364 | .matches = { |
| 364 | DMI_MATCH(DMI_SYS_VENDOR, "Gericom"), | 365 | DMI_MATCH(DMI_SYS_VENDOR, "Gericom"), |
| 365 | DMI_MATCH(DMI_PRODUCT_NAME, "N34AS6"), | 366 | DMI_MATCH(DMI_PRODUCT_NAME, "N34AS6"), |
| 366 | }, | 367 | }, |
| 367 | }, | 368 | }, |
| 368 | { | 369 | { |
| 369 | .ident = "IBM 2656", | 370 | /* IBM 2656 */ |
| 370 | .matches = { | 371 | .matches = { |
| 371 | DMI_MATCH(DMI_SYS_VENDOR, "IBM"), | 372 | DMI_MATCH(DMI_SYS_VENDOR, "IBM"), |
| 372 | DMI_MATCH(DMI_PRODUCT_NAME, "2656"), | 373 | DMI_MATCH(DMI_PRODUCT_NAME, "2656"), |
| 373 | }, | 374 | }, |
| 374 | }, | 375 | }, |
| 375 | { | 376 | { |
| 376 | .ident = "Dell XPS M1530", | 377 | /* Dell XPS M1530 */ |
| 377 | .matches = { | 378 | .matches = { |
| 378 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | 379 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), |
| 379 | DMI_MATCH(DMI_PRODUCT_NAME, "XPS M1530"), | 380 | DMI_MATCH(DMI_PRODUCT_NAME, "XPS M1530"), |
| 380 | }, | 381 | }, |
| 381 | }, | 382 | }, |
| 382 | { | 383 | { |
| 383 | .ident = "Compal HEL80I", | 384 | /* Compal HEL80I */ |
| 384 | .matches = { | 385 | .matches = { |
| 385 | DMI_MATCH(DMI_SYS_VENDOR, "COMPAL"), | 386 | DMI_MATCH(DMI_SYS_VENDOR, "COMPAL"), |
| 386 | DMI_MATCH(DMI_PRODUCT_NAME, "HEL80I"), | 387 | DMI_MATCH(DMI_PRODUCT_NAME, "HEL80I"), |
| 387 | }, | 388 | }, |
| 388 | }, | 389 | }, |
| 389 | { | 390 | { |
| 390 | .ident = "Dell Vostro 1510", | 391 | /* Dell Vostro 1510 */ |
| 391 | .matches = { | 392 | .matches = { |
| 392 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | 393 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), |
| 393 | DMI_MATCH(DMI_PRODUCT_NAME, "Vostro1510"), | 394 | DMI_MATCH(DMI_PRODUCT_NAME, "Vostro1510"), |
| 394 | }, | 395 | }, |
| 395 | }, | 396 | }, |
| 396 | { | 397 | { |
| 397 | .ident = "Acer Aspire 5536", | 398 | /* Acer Aspire 5536 */ |
| 398 | .matches = { | 399 | .matches = { |
| 399 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | 400 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), |
| 400 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5536"), | 401 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5536"), |
| @@ -404,65 +405,72 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { | |||
| 404 | { } | 405 | { } |
| 405 | }; | 406 | }; |
| 406 | 407 | ||
| 407 | static struct dmi_system_id __initdata i8042_dmi_reset_table[] = { | 408 | static const struct dmi_system_id __initconst i8042_dmi_reset_table[] = { |
| 408 | { | 409 | { |
| 409 | .ident = "MSI Wind U-100", | 410 | /* MSI Wind U-100 */ |
| 410 | .matches = { | 411 | .matches = { |
| 411 | DMI_MATCH(DMI_BOARD_NAME, "U-100"), | 412 | DMI_MATCH(DMI_BOARD_NAME, "U-100"), |
| 412 | DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"), | 413 | DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"), |
| 413 | }, | 414 | }, |
| 414 | }, | 415 | }, |
| 415 | { | 416 | { |
| 416 | .ident = "LG Electronics X110", | 417 | /* LG Electronics X110 */ |
| 417 | .matches = { | 418 | .matches = { |
| 418 | DMI_MATCH(DMI_BOARD_NAME, "X110"), | 419 | DMI_MATCH(DMI_BOARD_NAME, "X110"), |
| 419 | DMI_MATCH(DMI_BOARD_VENDOR, "LG Electronics Inc."), | 420 | DMI_MATCH(DMI_BOARD_VENDOR, "LG Electronics Inc."), |
| 420 | }, | 421 | }, |
| 421 | }, | 422 | }, |
| 422 | { | 423 | { |
| 423 | .ident = "Acer Aspire One 150", | 424 | /* Acer Aspire One 150 */ |
| 424 | .matches = { | 425 | .matches = { |
| 425 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | 426 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), |
| 426 | DMI_MATCH(DMI_PRODUCT_NAME, "AOA150"), | 427 | DMI_MATCH(DMI_PRODUCT_NAME, "AOA150"), |
| 427 | }, | 428 | }, |
| 428 | }, | 429 | }, |
| 429 | { | 430 | { |
| 430 | .ident = "Advent 4211", | 431 | /* Advent 4211 */ |
| 431 | .matches = { | 432 | .matches = { |
| 432 | DMI_MATCH(DMI_SYS_VENDOR, "DIXONSXP"), | 433 | DMI_MATCH(DMI_SYS_VENDOR, "DIXONSXP"), |
| 433 | DMI_MATCH(DMI_PRODUCT_NAME, "Advent 4211"), | 434 | DMI_MATCH(DMI_PRODUCT_NAME, "Advent 4211"), |
| 434 | }, | 435 | }, |
| 435 | }, | 436 | }, |
| 436 | { | 437 | { |
| 437 | .ident = "Medion Akoya Mini E1210", | 438 | /* Medion Akoya Mini E1210 */ |
| 438 | .matches = { | 439 | .matches = { |
| 439 | DMI_MATCH(DMI_SYS_VENDOR, "MEDION"), | 440 | DMI_MATCH(DMI_SYS_VENDOR, "MEDION"), |
| 440 | DMI_MATCH(DMI_PRODUCT_NAME, "E1210"), | 441 | DMI_MATCH(DMI_PRODUCT_NAME, "E1210"), |
| 441 | }, | 442 | }, |
| 442 | }, | 443 | }, |
| 443 | { | 444 | { |
| 444 | .ident = "Mivvy M310", | 445 | /* Medion Akoya E1222 */ |
| 446 | .matches = { | ||
| 447 | DMI_MATCH(DMI_SYS_VENDOR, "MEDION"), | ||
| 448 | DMI_MATCH(DMI_PRODUCT_NAME, "E122X"), | ||
| 449 | }, | ||
| 450 | }, | ||
| 451 | { | ||
| 452 | /* Mivvy M310 */ | ||
| 445 | .matches = { | 453 | .matches = { |
| 446 | DMI_MATCH(DMI_SYS_VENDOR, "VIOOO"), | 454 | DMI_MATCH(DMI_SYS_VENDOR, "VIOOO"), |
| 447 | DMI_MATCH(DMI_PRODUCT_NAME, "N10"), | 455 | DMI_MATCH(DMI_PRODUCT_NAME, "N10"), |
| 448 | }, | 456 | }, |
| 449 | }, | 457 | }, |
| 450 | { | 458 | { |
| 451 | .ident = "Dell Vostro 1320", | 459 | /* Dell Vostro 1320 */ |
| 452 | .matches = { | 460 | .matches = { |
| 453 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | 461 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), |
| 454 | DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1320"), | 462 | DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1320"), |
| 455 | }, | 463 | }, |
| 456 | }, | 464 | }, |
| 457 | { | 465 | { |
| 458 | .ident = "Dell Vostro 1520", | 466 | /* Dell Vostro 1520 */ |
| 459 | .matches = { | 467 | .matches = { |
| 460 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | 468 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), |
| 461 | DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1520"), | 469 | DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1520"), |
| 462 | }, | 470 | }, |
| 463 | }, | 471 | }, |
| 464 | { | 472 | { |
| 465 | .ident = "Dell Vostro 1720", | 473 | /* Dell Vostro 1720 */ |
| 466 | .matches = { | 474 | .matches = { |
| 467 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | 475 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), |
| 468 | DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1720"), | 476 | DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1720"), |
| @@ -472,16 +480,16 @@ static struct dmi_system_id __initdata i8042_dmi_reset_table[] = { | |||
| 472 | }; | 480 | }; |
| 473 | 481 | ||
| 474 | #ifdef CONFIG_PNP | 482 | #ifdef CONFIG_PNP |
| 475 | static struct dmi_system_id __initdata i8042_dmi_nopnp_table[] = { | 483 | static const struct dmi_system_id __initconst i8042_dmi_nopnp_table[] = { |
| 476 | { | 484 | { |
| 477 | .ident = "Intel MBO Desktop D845PESV", | 485 | /* Intel MBO Desktop D845PESV */ |
| 478 | .matches = { | 486 | .matches = { |
| 479 | DMI_MATCH(DMI_BOARD_NAME, "D845PESV"), | 487 | DMI_MATCH(DMI_BOARD_NAME, "D845PESV"), |
| 480 | DMI_MATCH(DMI_BOARD_VENDOR, "Intel Corporation"), | 488 | DMI_MATCH(DMI_BOARD_VENDOR, "Intel Corporation"), |
| 481 | }, | 489 | }, |
| 482 | }, | 490 | }, |
| 483 | { | 491 | { |
| 484 | .ident = "MSI Wind U-100", | 492 | /* MSI Wind U-100 */ |
| 485 | .matches = { | 493 | .matches = { |
| 486 | DMI_MATCH(DMI_BOARD_NAME, "U-100"), | 494 | DMI_MATCH(DMI_BOARD_NAME, "U-100"), |
| 487 | DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"), | 495 | DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"), |
| @@ -490,27 +498,23 @@ static struct dmi_system_id __initdata i8042_dmi_nopnp_table[] = { | |||
| 490 | { } | 498 | { } |
| 491 | }; | 499 | }; |
| 492 | 500 | ||
| 493 | static struct dmi_system_id __initdata i8042_dmi_laptop_table[] = { | 501 | static const struct dmi_system_id __initconst i8042_dmi_laptop_table[] = { |
| 494 | { | 502 | { |
| 495 | .ident = "Portable", | ||
| 496 | .matches = { | 503 | .matches = { |
| 497 | DMI_MATCH(DMI_CHASSIS_TYPE, "8"), /* Portable */ | 504 | DMI_MATCH(DMI_CHASSIS_TYPE, "8"), /* Portable */ |
| 498 | }, | 505 | }, |
| 499 | }, | 506 | }, |
| 500 | { | 507 | { |
| 501 | .ident = "Laptop", | ||
| 502 | .matches = { | 508 | .matches = { |
| 503 | DMI_MATCH(DMI_CHASSIS_TYPE, "9"), /* Laptop */ | 509 | DMI_MATCH(DMI_CHASSIS_TYPE, "9"), /* Laptop */ |
| 504 | }, | 510 | }, |
| 505 | }, | 511 | }, |
| 506 | { | 512 | { |
| 507 | .ident = "Notebook", | ||
| 508 | .matches = { | 513 | .matches = { |
| 509 | DMI_MATCH(DMI_CHASSIS_TYPE, "10"), /* Notebook */ | 514 | DMI_MATCH(DMI_CHASSIS_TYPE, "10"), /* Notebook */ |
| 510 | }, | 515 | }, |
| 511 | }, | 516 | }, |
| 512 | { | 517 | { |
| 513 | .ident = "Sub-Notebook", | ||
| 514 | .matches = { | 518 | .matches = { |
| 515 | DMI_MATCH(DMI_CHASSIS_TYPE, "14"), /* Sub-Notebook */ | 519 | DMI_MATCH(DMI_CHASSIS_TYPE, "14"), /* Sub-Notebook */ |
| 516 | }, | 520 | }, |
| @@ -525,58 +529,65 @@ static struct dmi_system_id __initdata i8042_dmi_laptop_table[] = { | |||
| 525 | * Originally, this was just confined to older laptops, but a few Acer laptops | 529 | * Originally, this was just confined to older laptops, but a few Acer laptops |
| 526 | * have turned up in 2007 that also need this again. | 530 | * have turned up in 2007 that also need this again. |
| 527 | */ | 531 | */ |
| 528 | static struct dmi_system_id __initdata i8042_dmi_dritek_table[] = { | 532 | static const struct dmi_system_id __initconst i8042_dmi_dritek_table[] = { |
| 533 | { | ||
| 534 | /* Acer Aspire 5610 */ | ||
| 535 | .matches = { | ||
| 536 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | ||
| 537 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5610"), | ||
| 538 | }, | ||
| 539 | }, | ||
| 529 | { | 540 | { |
| 530 | .ident = "Acer Aspire 5630", | 541 | /* Acer Aspire 5630 */ |
| 531 | .matches = { | 542 | .matches = { |
| 532 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | 543 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), |
| 533 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5630"), | 544 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5630"), |
| 534 | }, | 545 | }, |
| 535 | }, | 546 | }, |
| 536 | { | 547 | { |
| 537 | .ident = "Acer Aspire 5650", | 548 | /* Acer Aspire 5650 */ |
| 538 | .matches = { | 549 | .matches = { |
| 539 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | 550 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), |
| 540 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5650"), | 551 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5650"), |
| 541 | }, | 552 | }, |
| 542 | }, | 553 | }, |
| 543 | { | 554 | { |
| 544 | .ident = "Acer Aspire 5680", | 555 | /* Acer Aspire 5680 */ |
| 545 | .matches = { | 556 | .matches = { |
| 546 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | 557 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), |
| 547 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5680"), | 558 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5680"), |
| 548 | }, | 559 | }, |
| 549 | }, | 560 | }, |
| 550 | { | 561 | { |
| 551 | .ident = "Acer Aspire 5720", | 562 | /* Acer Aspire 5720 */ |
| 552 | .matches = { | 563 | .matches = { |
| 553 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | 564 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), |
| 554 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5720"), | 565 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5720"), |
| 555 | }, | 566 | }, |
| 556 | }, | 567 | }, |
| 557 | { | 568 | { |
| 558 | .ident = "Acer Aspire 9110", | 569 | /* Acer Aspire 9110 */ |
| 559 | .matches = { | 570 | .matches = { |
| 560 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | 571 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), |
| 561 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 9110"), | 572 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 9110"), |
| 562 | }, | 573 | }, |
| 563 | }, | 574 | }, |
| 564 | { | 575 | { |
| 565 | .ident = "Acer TravelMate 660", | 576 | /* Acer TravelMate 660 */ |
| 566 | .matches = { | 577 | .matches = { |
| 567 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | 578 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), |
| 568 | DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 660"), | 579 | DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 660"), |
| 569 | }, | 580 | }, |
| 570 | }, | 581 | }, |
| 571 | { | 582 | { |
| 572 | .ident = "Acer TravelMate 2490", | 583 | /* Acer TravelMate 2490 */ |
| 573 | .matches = { | 584 | .matches = { |
| 574 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | 585 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), |
| 575 | DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 2490"), | 586 | DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 2490"), |
| 576 | }, | 587 | }, |
| 577 | }, | 588 | }, |
| 578 | { | 589 | { |
| 579 | .ident = "Acer TravelMate 4280", | 590 | /* Acer TravelMate 4280 */ |
| 580 | .matches = { | 591 | .matches = { |
| 581 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | 592 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), |
| 582 | DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 4280"), | 593 | DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 4280"), |
| @@ -620,6 +631,9 @@ static int i8042_pnp_kbd_probe(struct pnp_dev *dev, const struct pnp_device_id * | |||
| 620 | strlcat(i8042_pnp_kbd_name, pnp_dev_name(dev), sizeof(i8042_pnp_kbd_name)); | 631 | strlcat(i8042_pnp_kbd_name, pnp_dev_name(dev), sizeof(i8042_pnp_kbd_name)); |
| 621 | } | 632 | } |
| 622 | 633 | ||
| 634 | /* Keyboard ports are always supposed to be wakeup-enabled */ | ||
| 635 | device_set_wakeup_enable(&dev->dev, true); | ||
| 636 | |||
| 623 | i8042_pnp_kbd_devices++; | 637 | i8042_pnp_kbd_devices++; |
| 624 | return 0; | 638 | return 0; |
| 625 | } | 639 | } |
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 1df02d25aca5..6440a8f55686 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <linux/rcupdate.h> | 21 | #include <linux/rcupdate.h> |
| 22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
| 23 | #include <linux/i8042.h> | 23 | #include <linux/i8042.h> |
| 24 | #include <linux/slab.h> | ||
| 24 | 25 | ||
| 25 | #include <asm/io.h> | 26 | #include <asm/io.h> |
| 26 | 27 | ||
| @@ -38,7 +39,7 @@ MODULE_PARM_DESC(noaux, "Do not probe or use AUX (mouse) port."); | |||
| 38 | 39 | ||
| 39 | static bool i8042_nomux; | 40 | static bool i8042_nomux; |
| 40 | module_param_named(nomux, i8042_nomux, bool, 0); | 41 | module_param_named(nomux, i8042_nomux, bool, 0); |
| 41 | MODULE_PARM_DESC(nomux, "Do not check whether an active multiplexing conrtoller is present."); | 42 | MODULE_PARM_DESC(nomux, "Do not check whether an active multiplexing controller is present."); |
| 42 | 43 | ||
| 43 | static bool i8042_unlock; | 44 | static bool i8042_unlock; |
| 44 | module_param_named(unlock, i8042_unlock, bool, 0); | 45 | module_param_named(unlock, i8042_unlock, bool, 0); |
| @@ -126,6 +127,8 @@ static unsigned char i8042_suppress_kbd_ack; | |||
| 126 | static struct platform_device *i8042_platform_device; | 127 | static struct platform_device *i8042_platform_device; |
| 127 | 128 | ||
| 128 | static irqreturn_t i8042_interrupt(int irq, void *dev_id); | 129 | static irqreturn_t i8042_interrupt(int irq, void *dev_id); |
| 130 | static bool (*i8042_platform_filter)(unsigned char data, unsigned char str, | ||
| 131 | struct serio *serio); | ||
| 129 | 132 | ||
| 130 | void i8042_lock_chip(void) | 133 | void i8042_lock_chip(void) |
| 131 | { | 134 | { |
| @@ -139,6 +142,48 @@ void i8042_unlock_chip(void) | |||
| 139 | } | 142 | } |
| 140 | EXPORT_SYMBOL(i8042_unlock_chip); | 143 | EXPORT_SYMBOL(i8042_unlock_chip); |
| 141 | 144 | ||
| 145 | int i8042_install_filter(bool (*filter)(unsigned char data, unsigned char str, | ||
| 146 | struct serio *serio)) | ||
| 147 | { | ||
| 148 | unsigned long flags; | ||
| 149 | int ret = 0; | ||
| 150 | |||
| 151 | spin_lock_irqsave(&i8042_lock, flags); | ||
| 152 | |||
| 153 | if (i8042_platform_filter) { | ||
| 154 | ret = -EBUSY; | ||
| 155 | goto out; | ||
| 156 | } | ||
| 157 | |||
| 158 | i8042_platform_filter = filter; | ||
| 159 | |||
| 160 | out: | ||
| 161 | spin_unlock_irqrestore(&i8042_lock, flags); | ||
| 162 | return ret; | ||
| 163 | } | ||
| 164 | EXPORT_SYMBOL(i8042_install_filter); | ||
| 165 | |||
| 166 | int i8042_remove_filter(bool (*filter)(unsigned char data, unsigned char str, | ||
| 167 | struct serio *port)) | ||
| 168 | { | ||
| 169 | unsigned long flags; | ||
| 170 | int ret = 0; | ||
| 171 | |||
| 172 | spin_lock_irqsave(&i8042_lock, flags); | ||
| 173 | |||
| 174 | if (i8042_platform_filter != filter) { | ||
| 175 | ret = -EINVAL; | ||
| 176 | goto out; | ||
| 177 | } | ||
| 178 | |||
| 179 | i8042_platform_filter = NULL; | ||
| 180 | |||
| 181 | out: | ||
| 182 | spin_unlock_irqrestore(&i8042_lock, flags); | ||
| 183 | return ret; | ||
| 184 | } | ||
| 185 | EXPORT_SYMBOL(i8042_remove_filter); | ||
| 186 | |||
| 142 | /* | 187 | /* |
| 143 | * The i8042_wait_read() and i8042_wait_write functions wait for the i8042 to | 188 | * The i8042_wait_read() and i8042_wait_write functions wait for the i8042 to |
| 144 | * be ready for reading values from it / writing values to it. | 189 | * be ready for reading values from it / writing values to it. |
| @@ -369,6 +414,31 @@ static void i8042_stop(struct serio *serio) | |||
| 369 | } | 414 | } |
| 370 | 415 | ||
| 371 | /* | 416 | /* |
| 417 | * i8042_filter() filters out unwanted bytes from the input data stream. | ||
| 418 | * It is called from i8042_interrupt and thus is running with interrupts | ||
| 419 | * off and i8042_lock held. | ||
| 420 | */ | ||
| 421 | static bool i8042_filter(unsigned char data, unsigned char str, | ||
| 422 | struct serio *serio) | ||
| 423 | { | ||
| 424 | if (unlikely(i8042_suppress_kbd_ack)) { | ||
| 425 | if ((~str & I8042_STR_AUXDATA) && | ||
| 426 | (data == 0xfa || data == 0xfe)) { | ||
| 427 | i8042_suppress_kbd_ack--; | ||
| 428 | dbg("Extra keyboard ACK - filtered out\n"); | ||
| 429 | return true; | ||
| 430 | } | ||
| 431 | } | ||
| 432 | |||
| 433 | if (i8042_platform_filter && i8042_platform_filter(data, str, serio)) { | ||
| 434 | dbg("Filtered out by platform filter\n"); | ||
| 435 | return true; | ||
| 436 | } | ||
| 437 | |||
| 438 | return false; | ||
| 439 | } | ||
| 440 | |||
| 441 | /* | ||
| 372 | * i8042_interrupt() is the most important function in this driver - | 442 | * i8042_interrupt() is the most important function in this driver - |
| 373 | * it handles the interrupts from the i8042, and sends incoming bytes | 443 | * it handles the interrupts from the i8042, and sends incoming bytes |
| 374 | * to the upper layers. | 444 | * to the upper layers. |
| @@ -377,13 +447,16 @@ static void i8042_stop(struct serio *serio) | |||
| 377 | static irqreturn_t i8042_interrupt(int irq, void *dev_id) | 447 | static irqreturn_t i8042_interrupt(int irq, void *dev_id) |
| 378 | { | 448 | { |
| 379 | struct i8042_port *port; | 449 | struct i8042_port *port; |
| 450 | struct serio *serio; | ||
| 380 | unsigned long flags; | 451 | unsigned long flags; |
| 381 | unsigned char str, data; | 452 | unsigned char str, data; |
| 382 | unsigned int dfl; | 453 | unsigned int dfl; |
| 383 | unsigned int port_no; | 454 | unsigned int port_no; |
| 455 | bool filtered; | ||
| 384 | int ret = 1; | 456 | int ret = 1; |
| 385 | 457 | ||
| 386 | spin_lock_irqsave(&i8042_lock, flags); | 458 | spin_lock_irqsave(&i8042_lock, flags); |
| 459 | |||
| 387 | str = i8042_read_status(); | 460 | str = i8042_read_status(); |
| 388 | if (unlikely(~str & I8042_STR_OBF)) { | 461 | if (unlikely(~str & I8042_STR_OBF)) { |
| 389 | spin_unlock_irqrestore(&i8042_lock, flags); | 462 | spin_unlock_irqrestore(&i8042_lock, flags); |
| @@ -391,8 +464,8 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id) | |||
| 391 | ret = 0; | 464 | ret = 0; |
| 392 | goto out; | 465 | goto out; |
| 393 | } | 466 | } |
| 467 | |||
| 394 | data = i8042_read_data(); | 468 | data = i8042_read_data(); |
| 395 | spin_unlock_irqrestore(&i8042_lock, flags); | ||
| 396 | 469 | ||
| 397 | if (i8042_mux_present && (str & I8042_STR_AUXDATA)) { | 470 | if (i8042_mux_present && (str & I8042_STR_AUXDATA)) { |
| 398 | static unsigned long last_transmit; | 471 | static unsigned long last_transmit; |
| @@ -441,21 +514,19 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id) | |||
| 441 | } | 514 | } |
| 442 | 515 | ||
| 443 | port = &i8042_ports[port_no]; | 516 | port = &i8042_ports[port_no]; |
| 517 | serio = port->exists ? port->serio : NULL; | ||
| 444 | 518 | ||
| 445 | dbg("%02x <- i8042 (interrupt, %d, %d%s%s)", | 519 | dbg("%02x <- i8042 (interrupt, %d, %d%s%s)", |
| 446 | data, port_no, irq, | 520 | data, port_no, irq, |
| 447 | dfl & SERIO_PARITY ? ", bad parity" : "", | 521 | dfl & SERIO_PARITY ? ", bad parity" : "", |
| 448 | dfl & SERIO_TIMEOUT ? ", timeout" : ""); | 522 | dfl & SERIO_TIMEOUT ? ", timeout" : ""); |
| 449 | 523 | ||
| 450 | if (unlikely(i8042_suppress_kbd_ack)) | 524 | filtered = i8042_filter(data, str, serio); |
| 451 | if (port_no == I8042_KBD_PORT_NO && | 525 | |
| 452 | (data == 0xfa || data == 0xfe)) { | 526 | spin_unlock_irqrestore(&i8042_lock, flags); |
| 453 | i8042_suppress_kbd_ack--; | ||
| 454 | goto out; | ||
| 455 | } | ||
| 456 | 527 | ||
| 457 | if (likely(port->exists)) | 528 | if (likely(port->exists && !filtered)) |
| 458 | serio_interrupt(port->serio, data, dfl); | 529 | serio_interrupt(serio, data, dfl); |
| 459 | 530 | ||
| 460 | out: | 531 | out: |
| 461 | return IRQ_RETVAL(ret); | 532 | return IRQ_RETVAL(ret); |
| @@ -1091,9 +1162,17 @@ static int i8042_pm_restore(struct device *dev) | |||
| 1091 | return 0; | 1162 | return 0; |
| 1092 | } | 1163 | } |
| 1093 | 1164 | ||
| 1165 | static int i8042_pm_thaw(struct device *dev) | ||
| 1166 | { | ||
| 1167 | i8042_interrupt(0, NULL); | ||
| 1168 | |||
| 1169 | return 0; | ||
| 1170 | } | ||
| 1171 | |||
| 1094 | static const struct dev_pm_ops i8042_pm_ops = { | 1172 | static const struct dev_pm_ops i8042_pm_ops = { |
| 1095 | .suspend = i8042_pm_reset, | 1173 | .suspend = i8042_pm_reset, |
| 1096 | .resume = i8042_pm_restore, | 1174 | .resume = i8042_pm_restore, |
| 1175 | .thaw = i8042_pm_thaw, | ||
| 1097 | .poweroff = i8042_pm_reset, | 1176 | .poweroff = i8042_pm_reset, |
| 1098 | .restore = i8042_pm_restore, | 1177 | .restore = i8042_pm_restore, |
| 1099 | }; | 1178 | }; |
| @@ -1308,6 +1387,8 @@ static int __init i8042_probe(struct platform_device *dev) | |||
| 1308 | { | 1387 | { |
| 1309 | int error; | 1388 | int error; |
| 1310 | 1389 | ||
| 1390 | i8042_platform_device = dev; | ||
| 1391 | |||
| 1311 | error = i8042_controller_selftest(); | 1392 | error = i8042_controller_selftest(); |
| 1312 | if (error) | 1393 | if (error) |
| 1313 | return error; | 1394 | return error; |
| @@ -1343,6 +1424,7 @@ static int __init i8042_probe(struct platform_device *dev) | |||
| 1343 | i8042_free_aux_ports(); /* in case KBD failed but AUX not */ | 1424 | i8042_free_aux_ports(); /* in case KBD failed but AUX not */ |
| 1344 | i8042_free_irqs(); | 1425 | i8042_free_irqs(); |
| 1345 | i8042_controller_reset(); | 1426 | i8042_controller_reset(); |
| 1427 | i8042_platform_device = NULL; | ||
| 1346 | 1428 | ||
| 1347 | return error; | 1429 | return error; |
| 1348 | } | 1430 | } |
| @@ -1352,6 +1434,7 @@ static int __devexit i8042_remove(struct platform_device *dev) | |||
| 1352 | i8042_unregister_ports(); | 1434 | i8042_unregister_ports(); |
| 1353 | i8042_free_irqs(); | 1435 | i8042_free_irqs(); |
| 1354 | i8042_controller_reset(); | 1436 | i8042_controller_reset(); |
| 1437 | i8042_platform_device = NULL; | ||
| 1355 | 1438 | ||
| 1356 | return 0; | 1439 | return 0; |
| 1357 | } | 1440 | } |
| @@ -1370,6 +1453,7 @@ static struct platform_driver i8042_driver = { | |||
| 1370 | 1453 | ||
| 1371 | static int __init i8042_init(void) | 1454 | static int __init i8042_init(void) |
| 1372 | { | 1455 | { |
| 1456 | struct platform_device *pdev; | ||
| 1373 | int err; | 1457 | int err; |
| 1374 | 1458 | ||
| 1375 | dbg_init(); | 1459 | dbg_init(); |
| @@ -1382,31 +1466,18 @@ static int __init i8042_init(void) | |||
| 1382 | if (err) | 1466 | if (err) |
| 1383 | goto err_platform_exit; | 1467 | goto err_platform_exit; |
| 1384 | 1468 | ||
| 1385 | i8042_platform_device = platform_device_alloc("i8042", -1); | 1469 | pdev = platform_create_bundle(&i8042_driver, i8042_probe, NULL, 0, NULL, 0); |
| 1386 | if (!i8042_platform_device) { | 1470 | if (IS_ERR(pdev)) { |
| 1387 | err = -ENOMEM; | 1471 | err = PTR_ERR(pdev); |
| 1388 | goto err_platform_exit; | 1472 | goto err_platform_exit; |
| 1389 | } | 1473 | } |
| 1390 | 1474 | ||
| 1391 | err = platform_device_add(i8042_platform_device); | ||
| 1392 | if (err) | ||
| 1393 | goto err_free_device; | ||
| 1394 | |||
| 1395 | err = platform_driver_probe(&i8042_driver, i8042_probe); | ||
| 1396 | if (err) | ||
| 1397 | goto err_del_device; | ||
| 1398 | |||
| 1399 | panic_blink = i8042_panic_blink; | 1475 | panic_blink = i8042_panic_blink; |
| 1400 | 1476 | ||
| 1401 | return 0; | 1477 | return 0; |
| 1402 | 1478 | ||
| 1403 | err_del_device: | ||
| 1404 | platform_device_del(i8042_platform_device); | ||
| 1405 | err_free_device: | ||
| 1406 | platform_device_put(i8042_platform_device); | ||
| 1407 | err_platform_exit: | 1479 | err_platform_exit: |
| 1408 | i8042_platform_exit(); | 1480 | i8042_platform_exit(); |
| 1409 | |||
| 1410 | return err; | 1481 | return err; |
| 1411 | } | 1482 | } |
| 1412 | 1483 | ||
diff --git a/drivers/input/serio/libps2.c b/drivers/input/serio/libps2.c index f3876acc3e83..980af94ba9c8 100644 --- a/drivers/input/serio/libps2.c +++ b/drivers/input/serio/libps2.c | |||
| @@ -14,7 +14,6 @@ | |||
| 14 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
| 15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
| 16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
| 17 | #include <linux/slab.h> | ||
| 18 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
| 19 | #include <linux/input.h> | 18 | #include <linux/input.h> |
| 20 | #include <linux/serio.h> | 19 | #include <linux/serio.h> |
diff --git a/drivers/input/serio/parkbd.c b/drivers/input/serio/parkbd.c index b089977e0ef9..26b45936f9fd 100644 --- a/drivers/input/serio/parkbd.c +++ b/drivers/input/serio/parkbd.c | |||
| @@ -46,6 +46,7 @@ | |||
| 46 | 46 | ||
| 47 | #include <linux/module.h> | 47 | #include <linux/module.h> |
| 48 | #include <linux/parport.h> | 48 | #include <linux/parport.h> |
| 49 | #include <linux/slab.h> | ||
| 49 | #include <linux/init.h> | 50 | #include <linux/init.h> |
| 50 | #include <linux/serio.h> | 51 | #include <linux/serio.h> |
| 51 | 52 | ||
diff --git a/drivers/input/serio/pcips2.c b/drivers/input/serio/pcips2.c index 1dacbe0d9348..43494742541c 100644 --- a/drivers/input/serio/pcips2.c +++ b/drivers/input/serio/pcips2.c | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include <linux/ioport.h> | 15 | #include <linux/ioport.h> |
| 16 | #include <linux/input.h> | 16 | #include <linux/input.h> |
| 17 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
| 18 | #include <linux/slab.h> | ||
| 18 | #include <linux/init.h> | 19 | #include <linux/init.h> |
| 19 | #include <linux/serio.h> | 20 | #include <linux/serio.h> |
| 20 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
| @@ -186,7 +187,7 @@ static void __devexit pcips2_remove(struct pci_dev *dev) | |||
| 186 | pci_disable_device(dev); | 187 | pci_disable_device(dev); |
| 187 | } | 188 | } |
| 188 | 189 | ||
| 189 | static struct pci_device_id pcips2_ids[] = { | 190 | static const struct pci_device_id pcips2_ids[] = { |
| 190 | { | 191 | { |
| 191 | .vendor = 0x14f2, /* MOBILITY */ | 192 | .vendor = 0x14f2, /* MOBILITY */ |
| 192 | .device = 0x0123, /* Keyboard */ | 193 | .device = 0x0123, /* Keyboard */ |
diff --git a/drivers/input/serio/q40kbd.c b/drivers/input/serio/q40kbd.c index e36a0901646c..5eb84b3b67fb 100644 --- a/drivers/input/serio/q40kbd.c +++ b/drivers/input/serio/q40kbd.c | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | #include <linux/err.h> | 36 | #include <linux/err.h> |
| 37 | #include <linux/bitops.h> | 37 | #include <linux/bitops.h> |
| 38 | #include <linux/platform_device.h> | 38 | #include <linux/platform_device.h> |
| 39 | #include <linux/slab.h> | ||
| 39 | 40 | ||
| 40 | #include <asm/io.h> | 41 | #include <asm/io.h> |
| 41 | #include <asm/uaccess.h> | 42 | #include <asm/uaccess.h> |
diff --git a/drivers/input/serio/rpckbd.c b/drivers/input/serio/rpckbd.c index ed045c99f84b..9da6fbcaaa7e 100644 --- a/drivers/input/serio/rpckbd.c +++ b/drivers/input/serio/rpckbd.c | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | #include <linux/err.h> | 34 | #include <linux/err.h> |
| 35 | #include <linux/platform_device.h> | 35 | #include <linux/platform_device.h> |
| 36 | #include <linux/io.h> | 36 | #include <linux/io.h> |
| 37 | #include <linux/slab.h> | ||
| 37 | 38 | ||
| 38 | #include <asm/irq.h> | 39 | #include <asm/irq.h> |
| 39 | #include <mach/hardware.h> | 40 | #include <mach/hardware.h> |
diff --git a/drivers/input/serio/sa1111ps2.c b/drivers/input/serio/sa1111ps2.c index f412c69478a8..d55874e5d1c2 100644 --- a/drivers/input/serio/sa1111ps2.c +++ b/drivers/input/serio/sa1111ps2.c | |||
| @@ -180,8 +180,8 @@ static void __devinit ps2_clear_input(struct ps2if *ps2if) | |||
| 180 | } | 180 | } |
| 181 | } | 181 | } |
| 182 | 182 | ||
| 183 | static inline unsigned int | 183 | static unsigned int __devinit ps2_test_one(struct ps2if *ps2if, |
| 184 | ps2_test_one(struct ps2if *ps2if, unsigned int mask) | 184 | unsigned int mask) |
| 185 | { | 185 | { |
| 186 | unsigned int val; | 186 | unsigned int val; |
| 187 | 187 | ||
| @@ -197,7 +197,7 @@ ps2_test_one(struct ps2if *ps2if, unsigned int mask) | |||
| 197 | * Test the keyboard interface. We basically check to make sure that | 197 | * Test the keyboard interface. We basically check to make sure that |
| 198 | * we can drive each line to the keyboard independently of each other. | 198 | * we can drive each line to the keyboard independently of each other. |
| 199 | */ | 199 | */ |
| 200 | static int __init ps2_test(struct ps2if *ps2if) | 200 | static int __devinit ps2_test(struct ps2if *ps2if) |
| 201 | { | 201 | { |
| 202 | unsigned int stat; | 202 | unsigned int stat; |
| 203 | int ret = 0; | 203 | int ret = 0; |
| @@ -312,7 +312,7 @@ static int __devinit ps2_probe(struct sa1111_dev *dev) | |||
| 312 | /* | 312 | /* |
| 313 | * Remove one device from this driver. | 313 | * Remove one device from this driver. |
| 314 | */ | 314 | */ |
| 315 | static int ps2_remove(struct sa1111_dev *dev) | 315 | static int __devexit ps2_remove(struct sa1111_dev *dev) |
| 316 | { | 316 | { |
| 317 | struct ps2if *ps2if = sa1111_get_drvdata(dev); | 317 | struct ps2if *ps2if = sa1111_get_drvdata(dev); |
| 318 | 318 | ||
| @@ -335,7 +335,7 @@ static struct sa1111_driver ps2_driver = { | |||
| 335 | }, | 335 | }, |
| 336 | .devid = SA1111_DEVID_PS2, | 336 | .devid = SA1111_DEVID_PS2, |
| 337 | .probe = ps2_probe, | 337 | .probe = ps2_probe, |
| 338 | .remove = ps2_remove, | 338 | .remove = __devexit_p(ps2_remove), |
| 339 | }; | 339 | }; |
| 340 | 340 | ||
| 341 | static int __init ps2_init(void) | 341 | static int __init ps2_init(void) |
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c index 0236f0d5fd91..c3b626e9eae7 100644 --- a/drivers/input/serio/serio.c +++ b/drivers/input/serio/serio.c | |||
| @@ -26,6 +26,8 @@ | |||
| 26 | * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic | 26 | * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic |
| 27 | */ | 27 | */ |
| 28 | 28 | ||
| 29 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 30 | |||
| 29 | #include <linux/stddef.h> | 31 | #include <linux/stddef.h> |
| 30 | #include <linux/module.h> | 32 | #include <linux/module.h> |
| 31 | #include <linux/serio.h> | 33 | #include <linux/serio.h> |
| @@ -119,11 +121,10 @@ static int serio_bind_driver(struct serio *serio, struct serio_driver *drv) | |||
| 119 | 121 | ||
| 120 | error = device_bind_driver(&serio->dev); | 122 | error = device_bind_driver(&serio->dev); |
| 121 | if (error) { | 123 | if (error) { |
| 122 | printk(KERN_WARNING | 124 | dev_warn(&serio->dev, |
| 123 | "serio: device_bind_driver() failed " | 125 | "device_bind_driver() failed for %s (%s) and %s, error: %d\n", |
| 124 | "for %s (%s) and %s, error: %d\n", | 126 | serio->phys, serio->name, |
| 125 | serio->phys, serio->name, | 127 | drv->description, error); |
| 126 | drv->description, error); | ||
| 127 | serio_disconnect_driver(serio); | 128 | serio_disconnect_driver(serio); |
| 128 | serio->dev.driver = NULL; | 129 | serio->dev.driver = NULL; |
| 129 | return error; | 130 | return error; |
| @@ -138,9 +139,9 @@ static void serio_find_driver(struct serio *serio) | |||
| 138 | 139 | ||
| 139 | error = device_attach(&serio->dev); | 140 | error = device_attach(&serio->dev); |
| 140 | if (error < 0) | 141 | if (error < 0) |
| 141 | printk(KERN_WARNING | 142 | dev_warn(&serio->dev, |
| 142 | "serio: device_attach() failed for %s (%s), error: %d\n", | 143 | "device_attach() failed for %s (%s), error: %d\n", |
| 143 | serio->phys, serio->name, error); | 144 | serio->phys, serio->name, error); |
| 144 | } | 145 | } |
| 145 | 146 | ||
| 146 | 147 | ||
| @@ -194,17 +195,14 @@ static int serio_queue_event(void *object, struct module *owner, | |||
| 194 | 195 | ||
| 195 | event = kmalloc(sizeof(struct serio_event), GFP_ATOMIC); | 196 | event = kmalloc(sizeof(struct serio_event), GFP_ATOMIC); |
| 196 | if (!event) { | 197 | if (!event) { |
| 197 | printk(KERN_ERR | 198 | pr_err("Not enough memory to queue event %d\n", event_type); |
| 198 | "serio: Not enough memory to queue event %d\n", | ||
| 199 | event_type); | ||
| 200 | retval = -ENOMEM; | 199 | retval = -ENOMEM; |
| 201 | goto out; | 200 | goto out; |
| 202 | } | 201 | } |
| 203 | 202 | ||
| 204 | if (!try_module_get(owner)) { | 203 | if (!try_module_get(owner)) { |
| 205 | printk(KERN_WARNING | 204 | pr_warning("Can't get module reference, dropping event %d\n", |
| 206 | "serio: Can't get module reference, dropping event %d\n", | 205 | event_type); |
| 207 | event_type); | ||
| 208 | kfree(event); | 206 | kfree(event); |
| 209 | retval = -EINVAL; | 207 | retval = -EINVAL; |
| 210 | goto out; | 208 | goto out; |
| @@ -230,14 +228,12 @@ static void serio_free_event(struct serio_event *event) | |||
| 230 | 228 | ||
| 231 | static void serio_remove_duplicate_events(struct serio_event *event) | 229 | static void serio_remove_duplicate_events(struct serio_event *event) |
| 232 | { | 230 | { |
| 233 | struct list_head *node, *next; | 231 | struct serio_event *e, *next; |
| 234 | struct serio_event *e; | ||
| 235 | unsigned long flags; | 232 | unsigned long flags; |
| 236 | 233 | ||
| 237 | spin_lock_irqsave(&serio_event_lock, flags); | 234 | spin_lock_irqsave(&serio_event_lock, flags); |
| 238 | 235 | ||
| 239 | list_for_each_safe(node, next, &serio_event_list) { | 236 | list_for_each_entry_safe(e, next, &serio_event_list, node) { |
| 240 | e = list_entry(node, struct serio_event, node); | ||
| 241 | if (event->object == e->object) { | 237 | if (event->object == e->object) { |
| 242 | /* | 238 | /* |
| 243 | * If this event is of different type we should not | 239 | * If this event is of different type we should not |
| @@ -247,7 +243,7 @@ static void serio_remove_duplicate_events(struct serio_event *event) | |||
| 247 | if (event->type != e->type) | 243 | if (event->type != e->type) |
| 248 | break; | 244 | break; |
| 249 | 245 | ||
| 250 | list_del_init(node); | 246 | list_del_init(&e->node); |
| 251 | serio_free_event(e); | 247 | serio_free_event(e); |
| 252 | } | 248 | } |
| 253 | } | 249 | } |
| @@ -258,23 +254,18 @@ static void serio_remove_duplicate_events(struct serio_event *event) | |||
| 258 | 254 | ||
| 259 | static struct serio_event *serio_get_event(void) | 255 | static struct serio_event *serio_get_event(void) |
| 260 | { | 256 | { |
| 261 | struct serio_event *event; | 257 | struct serio_event *event = NULL; |
| 262 | struct list_head *node; | ||
| 263 | unsigned long flags; | 258 | unsigned long flags; |
| 264 | 259 | ||
| 265 | spin_lock_irqsave(&serio_event_lock, flags); | 260 | spin_lock_irqsave(&serio_event_lock, flags); |
| 266 | 261 | ||
| 267 | if (list_empty(&serio_event_list)) { | 262 | if (!list_empty(&serio_event_list)) { |
| 268 | spin_unlock_irqrestore(&serio_event_lock, flags); | 263 | event = list_first_entry(&serio_event_list, |
| 269 | return NULL; | 264 | struct serio_event, node); |
| 265 | list_del_init(&event->node); | ||
| 270 | } | 266 | } |
| 271 | 267 | ||
| 272 | node = serio_event_list.next; | ||
| 273 | event = list_entry(node, struct serio_event, node); | ||
| 274 | list_del_init(node); | ||
| 275 | |||
| 276 | spin_unlock_irqrestore(&serio_event_lock, flags); | 268 | spin_unlock_irqrestore(&serio_event_lock, flags); |
| 277 | |||
| 278 | return event; | 269 | return event; |
| 279 | } | 270 | } |
| 280 | 271 | ||
| @@ -284,38 +275,30 @@ static void serio_handle_event(void) | |||
| 284 | 275 | ||
| 285 | mutex_lock(&serio_mutex); | 276 | mutex_lock(&serio_mutex); |
| 286 | 277 | ||
| 287 | /* | 278 | while ((event = serio_get_event())) { |
| 288 | * Note that we handle only one event here to give swsusp | ||
| 289 | * a chance to freeze kseriod thread. Serio events should | ||
| 290 | * be pretty rare so we are not concerned about taking | ||
| 291 | * performance hit. | ||
| 292 | */ | ||
| 293 | if ((event = serio_get_event())) { | ||
| 294 | 279 | ||
| 295 | switch (event->type) { | 280 | switch (event->type) { |
| 296 | case SERIO_REGISTER_PORT: | ||
| 297 | serio_add_port(event->object); | ||
| 298 | break; | ||
| 299 | 281 | ||
| 300 | case SERIO_RECONNECT_PORT: | 282 | case SERIO_REGISTER_PORT: |
| 301 | serio_reconnect_port(event->object); | 283 | serio_add_port(event->object); |
| 302 | break; | 284 | break; |
| 303 | 285 | ||
| 304 | case SERIO_RESCAN_PORT: | 286 | case SERIO_RECONNECT_PORT: |
| 305 | serio_disconnect_port(event->object); | 287 | serio_reconnect_port(event->object); |
| 306 | serio_find_driver(event->object); | 288 | break; |
| 307 | break; | ||
| 308 | 289 | ||
| 309 | case SERIO_RECONNECT_CHAIN: | 290 | case SERIO_RESCAN_PORT: |
| 310 | serio_reconnect_chain(event->object); | 291 | serio_disconnect_port(event->object); |
| 311 | break; | 292 | serio_find_driver(event->object); |
| 293 | break; | ||
| 312 | 294 | ||
| 313 | case SERIO_ATTACH_DRIVER: | 295 | case SERIO_RECONNECT_CHAIN: |
| 314 | serio_attach_driver(event->object); | 296 | serio_reconnect_chain(event->object); |
| 315 | break; | 297 | break; |
| 316 | 298 | ||
| 317 | default: | 299 | case SERIO_ATTACH_DRIVER: |
| 318 | break; | 300 | serio_attach_driver(event->object); |
| 301 | break; | ||
| 319 | } | 302 | } |
| 320 | 303 | ||
| 321 | serio_remove_duplicate_events(event); | 304 | serio_remove_duplicate_events(event); |
| @@ -331,16 +314,14 @@ static void serio_handle_event(void) | |||
| 331 | */ | 314 | */ |
| 332 | static void serio_remove_pending_events(void *object) | 315 | static void serio_remove_pending_events(void *object) |
| 333 | { | 316 | { |
| 334 | struct list_head *node, *next; | 317 | struct serio_event *event, *next; |
| 335 | struct serio_event *event; | ||
| 336 | unsigned long flags; | 318 | unsigned long flags; |
| 337 | 319 | ||
| 338 | spin_lock_irqsave(&serio_event_lock, flags); | 320 | spin_lock_irqsave(&serio_event_lock, flags); |
| 339 | 321 | ||
| 340 | list_for_each_safe(node, next, &serio_event_list) { | 322 | list_for_each_entry_safe(event, next, &serio_event_list, node) { |
| 341 | event = list_entry(node, struct serio_event, node); | ||
| 342 | if (event->object == object) { | 323 | if (event->object == object) { |
| 343 | list_del_init(node); | 324 | list_del_init(&event->node); |
| 344 | serio_free_event(event); | 325 | serio_free_event(event); |
| 345 | } | 326 | } |
| 346 | } | 327 | } |
| @@ -380,14 +361,12 @@ static struct serio *serio_get_pending_child(struct serio *parent) | |||
| 380 | 361 | ||
| 381 | static int serio_thread(void *nothing) | 362 | static int serio_thread(void *nothing) |
| 382 | { | 363 | { |
| 383 | set_freezable(); | ||
| 384 | do { | 364 | do { |
| 385 | serio_handle_event(); | 365 | serio_handle_event(); |
| 386 | wait_event_freezable(serio_wait, | 366 | wait_event_interruptible(serio_wait, |
| 387 | kthread_should_stop() || !list_empty(&serio_event_list)); | 367 | kthread_should_stop() || !list_empty(&serio_event_list)); |
| 388 | } while (!kthread_should_stop()); | 368 | } while (!kthread_should_stop()); |
| 389 | 369 | ||
| 390 | printk(KERN_DEBUG "serio: kseriod exiting\n"); | ||
| 391 | return 0; | 370 | return 0; |
| 392 | } | 371 | } |
| 393 | 372 | ||
| @@ -452,6 +431,11 @@ static struct attribute_group serio_id_attr_group = { | |||
| 452 | .attrs = serio_device_id_attrs, | 431 | .attrs = serio_device_id_attrs, |
| 453 | }; | 432 | }; |
| 454 | 433 | ||
| 434 | static const struct attribute_group *serio_device_attr_groups[] = { | ||
| 435 | &serio_id_attr_group, | ||
| 436 | NULL | ||
| 437 | }; | ||
| 438 | |||
| 455 | static ssize_t serio_rebind_driver(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) | 439 | static ssize_t serio_rebind_driver(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) |
| 456 | { | 440 | { |
| 457 | struct serio *serio = to_serio_port(dev); | 441 | struct serio *serio = to_serio_port(dev); |
| @@ -539,6 +523,7 @@ static void serio_init_port(struct serio *serio) | |||
| 539 | (long)atomic_inc_return(&serio_no) - 1); | 523 | (long)atomic_inc_return(&serio_no) - 1); |
| 540 | serio->dev.bus = &serio_bus; | 524 | serio->dev.bus = &serio_bus; |
| 541 | serio->dev.release = serio_release_port; | 525 | serio->dev.release = serio_release_port; |
| 526 | serio->dev.groups = serio_device_attr_groups; | ||
| 542 | if (serio->parent) { | 527 | if (serio->parent) { |
| 543 | serio->dev.parent = &serio->parent->dev; | 528 | serio->dev.parent = &serio->parent->dev; |
| 544 | serio->depth = serio->parent->depth + 1; | 529 | serio->depth = serio->parent->depth + 1; |
| @@ -562,21 +547,15 @@ static void serio_add_port(struct serio *serio) | |||
| 562 | } | 547 | } |
| 563 | 548 | ||
| 564 | list_add_tail(&serio->node, &serio_list); | 549 | list_add_tail(&serio->node, &serio_list); |
| 550 | |||
| 565 | if (serio->start) | 551 | if (serio->start) |
| 566 | serio->start(serio); | 552 | serio->start(serio); |
| 553 | |||
| 567 | error = device_add(&serio->dev); | 554 | error = device_add(&serio->dev); |
| 568 | if (error) | 555 | if (error) |
| 569 | printk(KERN_ERR | 556 | dev_err(&serio->dev, |
| 570 | "serio: device_add() failed for %s (%s), error: %d\n", | 557 | "device_add() failed for %s (%s), error: %d\n", |
| 571 | serio->phys, serio->name, error); | 558 | serio->phys, serio->name, error); |
| 572 | else { | ||
| 573 | serio->registered = true; | ||
| 574 | error = sysfs_create_group(&serio->dev.kobj, &serio_id_attr_group); | ||
| 575 | if (error) | ||
| 576 | printk(KERN_ERR | ||
| 577 | "serio: sysfs_create_group() failed for %s (%s), error: %d\n", | ||
| 578 | serio->phys, serio->name, error); | ||
| 579 | } | ||
| 580 | } | 559 | } |
| 581 | 560 | ||
| 582 | /* | 561 | /* |
| @@ -603,11 +582,8 @@ static void serio_destroy_port(struct serio *serio) | |||
| 603 | serio->parent = NULL; | 582 | serio->parent = NULL; |
| 604 | } | 583 | } |
| 605 | 584 | ||
| 606 | if (serio->registered) { | 585 | if (device_is_registered(&serio->dev)) |
| 607 | sysfs_remove_group(&serio->dev.kobj, &serio_id_attr_group); | ||
| 608 | device_del(&serio->dev); | 586 | device_del(&serio->dev); |
| 609 | serio->registered = false; | ||
| 610 | } | ||
| 611 | 587 | ||
| 612 | list_del_init(&serio->node); | 588 | list_del_init(&serio->node); |
| 613 | serio_remove_pending_events(serio); | 589 | serio_remove_pending_events(serio); |
| @@ -805,9 +781,8 @@ static void serio_attach_driver(struct serio_driver *drv) | |||
| 805 | 781 | ||
| 806 | error = driver_attach(&drv->driver); | 782 | error = driver_attach(&drv->driver); |
| 807 | if (error) | 783 | if (error) |
| 808 | printk(KERN_WARNING | 784 | pr_warning("driver_attach() failed for %s with error %d\n", |
| 809 | "serio: driver_attach() failed for %s with error %d\n", | 785 | drv->driver.name, error); |
| 810 | drv->driver.name, error); | ||
| 811 | } | 786 | } |
| 812 | 787 | ||
| 813 | int __serio_register_driver(struct serio_driver *drv, struct module *owner, const char *mod_name) | 788 | int __serio_register_driver(struct serio_driver *drv, struct module *owner, const char *mod_name) |
| @@ -827,8 +802,7 @@ int __serio_register_driver(struct serio_driver *drv, struct module *owner, cons | |||
| 827 | 802 | ||
| 828 | error = driver_register(&drv->driver); | 803 | error = driver_register(&drv->driver); |
| 829 | if (error) { | 804 | if (error) { |
| 830 | printk(KERN_ERR | 805 | pr_err("driver_register() failed for %s, error: %d\n", |
| 831 | "serio: driver_register() failed for %s, error: %d\n", | ||
| 832 | drv->driver.name, error); | 806 | drv->driver.name, error); |
| 833 | return error; | 807 | return error; |
| 834 | } | 808 | } |
| @@ -994,7 +968,7 @@ irqreturn_t serio_interrupt(struct serio *serio, | |||
| 994 | 968 | ||
| 995 | if (likely(serio->drv)) { | 969 | if (likely(serio->drv)) { |
| 996 | ret = serio->drv->interrupt(serio, data, dfl); | 970 | ret = serio->drv->interrupt(serio, data, dfl); |
| 997 | } else if (!dfl && serio->registered) { | 971 | } else if (!dfl && device_is_registered(&serio->dev)) { |
| 998 | serio_rescan(serio); | 972 | serio_rescan(serio); |
| 999 | ret = IRQ_HANDLED; | 973 | ret = IRQ_HANDLED; |
| 1000 | } | 974 | } |
| @@ -1025,7 +999,7 @@ static int __init serio_init(void) | |||
| 1025 | 999 | ||
| 1026 | error = bus_register(&serio_bus); | 1000 | error = bus_register(&serio_bus); |
| 1027 | if (error) { | 1001 | if (error) { |
| 1028 | printk(KERN_ERR "serio: failed to register serio bus, error: %d\n", error); | 1002 | pr_err("Failed to register serio bus, error: %d\n", error); |
| 1029 | return error; | 1003 | return error; |
| 1030 | } | 1004 | } |
| 1031 | 1005 | ||
| @@ -1033,7 +1007,7 @@ static int __init serio_init(void) | |||
| 1033 | if (IS_ERR(serio_task)) { | 1007 | if (IS_ERR(serio_task)) { |
| 1034 | bus_unregister(&serio_bus); | 1008 | bus_unregister(&serio_bus); |
| 1035 | error = PTR_ERR(serio_task); | 1009 | error = PTR_ERR(serio_task); |
| 1036 | printk(KERN_ERR "serio: Failed to start kseriod, error: %d\n", error); | 1010 | pr_err("Failed to start kseriod, error: %d\n", error); |
| 1037 | return error; | 1011 | return error; |
| 1038 | } | 1012 | } |
| 1039 | 1013 | ||
diff --git a/drivers/input/serio/serio_raw.c b/drivers/input/serio/serio_raw.c index 27fdaaffbb40..998664854440 100644 --- a/drivers/input/serio/serio_raw.c +++ b/drivers/input/serio/serio_raw.c | |||
| @@ -81,12 +81,12 @@ static int serio_raw_open(struct inode *inode, struct file *file) | |||
| 81 | struct serio_raw_list *list; | 81 | struct serio_raw_list *list; |
| 82 | int retval = 0; | 82 | int retval = 0; |
| 83 | 83 | ||
| 84 | lock_kernel(); | ||
| 85 | retval = mutex_lock_interruptible(&serio_raw_mutex); | 84 | retval = mutex_lock_interruptible(&serio_raw_mutex); |
| 86 | if (retval) | 85 | if (retval) |
| 87 | goto out_bkl; | 86 | return retval; |
| 88 | 87 | ||
| 89 | if (!(serio_raw = serio_raw_locate(iminor(inode)))) { | 88 | serio_raw = serio_raw_locate(iminor(inode)); |
| 89 | if (!serio_raw) { | ||
| 90 | retval = -ENODEV; | 90 | retval = -ENODEV; |
| 91 | goto out; | 91 | goto out; |
| 92 | } | 92 | } |
| @@ -96,7 +96,8 @@ static int serio_raw_open(struct inode *inode, struct file *file) | |||
| 96 | goto out; | 96 | goto out; |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | if (!(list = kzalloc(sizeof(struct serio_raw_list), GFP_KERNEL))) { | 99 | list = kzalloc(sizeof(struct serio_raw_list), GFP_KERNEL); |
| 100 | if (!list) { | ||
| 100 | retval = -ENOMEM; | 101 | retval = -ENOMEM; |
| 101 | goto out; | 102 | goto out; |
| 102 | } | 103 | } |
| @@ -109,8 +110,6 @@ static int serio_raw_open(struct inode *inode, struct file *file) | |||
| 109 | 110 | ||
| 110 | out: | 111 | out: |
| 111 | mutex_unlock(&serio_raw_mutex); | 112 | mutex_unlock(&serio_raw_mutex); |
| 112 | out_bkl: | ||
| 113 | unlock_kernel(); | ||
| 114 | return retval; | 113 | return retval; |
| 115 | } | 114 | } |
| 116 | 115 | ||
diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c index ebb22f88c842..f84f8e32e3f1 100644 --- a/drivers/input/serio/xilinx_ps2.c +++ b/drivers/input/serio/xilinx_ps2.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <linux/serio.h> | 19 | #include <linux/serio.h> |
| 20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
| 21 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
| 22 | #include <linux/slab.h> | ||
| 22 | #include <linux/init.h> | 23 | #include <linux/init.h> |
| 23 | #include <linux/list.h> | 24 | #include <linux/list.h> |
| 24 | #include <linux/io.h> | 25 | #include <linux/io.h> |
| @@ -270,7 +271,7 @@ static int __devinit xps2_of_probe(struct of_device *ofdev, | |||
| 270 | drvdata->irq = r_irq.start; | 271 | drvdata->irq = r_irq.start; |
| 271 | 272 | ||
| 272 | phys_addr = r_mem.start; | 273 | phys_addr = r_mem.start; |
| 273 | remap_size = r_mem.end - r_mem.start + 1; | 274 | remap_size = resource_size(&r_mem); |
| 274 | if (!request_mem_region(phys_addr, remap_size, DRIVER_NAME)) { | 275 | if (!request_mem_region(phys_addr, remap_size, DRIVER_NAME)) { |
| 275 | dev_err(dev, "Couldn't lock memory region at 0x%08llX\n", | 276 | dev_err(dev, "Couldn't lock memory region at 0x%08llX\n", |
| 276 | (unsigned long long)phys_addr); | 277 | (unsigned long long)phys_addr); |
| @@ -344,7 +345,7 @@ static int __devexit xps2_of_remove(struct of_device *of_dev) | |||
| 344 | if (of_address_to_resource(of_dev->node, 0, &r_mem)) | 345 | if (of_address_to_resource(of_dev->node, 0, &r_mem)) |
| 345 | dev_err(dev, "invalid address\n"); | 346 | dev_err(dev, "invalid address\n"); |
| 346 | else | 347 | else |
| 347 | release_mem_region(r_mem.start, r_mem.end - r_mem.start + 1); | 348 | release_mem_region(r_mem.start, resource_size(&r_mem)); |
| 348 | 349 | ||
| 349 | kfree(drvdata); | 350 | kfree(drvdata); |
| 350 | 351 | ||
| @@ -354,7 +355,7 @@ static int __devexit xps2_of_remove(struct of_device *of_dev) | |||
| 354 | } | 355 | } |
| 355 | 356 | ||
| 356 | /* Match table for of_platform binding */ | 357 | /* Match table for of_platform binding */ |
| 357 | static struct of_device_id xps2_of_match[] __devinitdata = { | 358 | static const struct of_device_id xps2_of_match[] __devinitconst = { |
| 358 | { .compatible = "xlnx,xps-ps2-1.00.a", }, | 359 | { .compatible = "xlnx,xps-ps2-1.00.a", }, |
| 359 | { /* end of list */ }, | 360 | { /* end of list */ }, |
| 360 | }; | 361 | }; |
