diff options
Diffstat (limited to 'drivers/input/serio')
-rw-r--r-- | drivers/input/serio/Kconfig | 9 | ||||
-rw-r--r-- | drivers/input/serio/Makefile | 1 | ||||
-rw-r--r-- | drivers/input/serio/altera_ps2.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/ambakmi.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/arc_ps2.c | 274 | ||||
-rw-r--r-- | drivers/input/serio/ct82c710.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/gscps2.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/hil_mlc.c | 13 | ||||
-rw-r--r-- | drivers/input/serio/i8042-io.h | 2 | ||||
-rw-r--r-- | drivers/input/serio/i8042-sparcio.h | 6 | ||||
-rw-r--r-- | drivers/input/serio/i8042-x86ia64io.h | 9 | ||||
-rw-r--r-- | drivers/input/serio/i8042.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/maceps2.c | 8 | ||||
-rw-r--r-- | drivers/input/serio/pcips2.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/q40kbd.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/rpckbd.c | 6 | ||||
-rw-r--r-- | drivers/input/serio/sa1111ps2.c | 12 | ||||
-rw-r--r-- | drivers/input/serio/serio.c | 11 | ||||
-rw-r--r-- | drivers/input/serio/xilinx_ps2.c | 8 |
19 files changed, 340 insertions, 61 deletions
diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig index 55f2c2293ec6..4a4e182c33e7 100644 --- a/drivers/input/serio/Kconfig +++ b/drivers/input/serio/Kconfig @@ -234,4 +234,13 @@ config SERIO_PS2MULT To compile this driver as a module, choose M here: the module will be called ps2mult. +config SERIO_ARC_PS2 + tristate "ARC PS/2 support" + help + Say Y here if you have an ARC FPGA platform with a PS/2 + controller in it. + + To compile this driver as a module, choose M here; the module + will be called arc_ps2. + endif diff --git a/drivers/input/serio/Makefile b/drivers/input/serio/Makefile index dbbe37616c92..4b0c8f84f1c1 100644 --- a/drivers/input/serio/Makefile +++ b/drivers/input/serio/Makefile @@ -25,3 +25,4 @@ obj-$(CONFIG_SERIO_RAW) += serio_raw.o obj-$(CONFIG_SERIO_AMS_DELTA) += ams_delta_serio.o obj-$(CONFIG_SERIO_XILINX_XPS_PS2) += xilinx_ps2.o obj-$(CONFIG_SERIO_ALTERA_PS2) += altera_ps2.o +obj-$(CONFIG_SERIO_ARC_PS2) += arc_ps2.o diff --git a/drivers/input/serio/altera_ps2.c b/drivers/input/serio/altera_ps2.c index cc11f4efe119..479ce5fe8955 100644 --- a/drivers/input/serio/altera_ps2.c +++ b/drivers/input/serio/altera_ps2.c @@ -81,7 +81,7 @@ static void altera_ps2_close(struct serio *io) /* * Add one device to this driver. */ -static int __devinit altera_ps2_probe(struct platform_device *pdev) +static int altera_ps2_probe(struct platform_device *pdev) { struct ps2if *ps2if; struct serio *serio; @@ -159,7 +159,7 @@ static int __devinit altera_ps2_probe(struct platform_device *pdev) /* * Remove one device from this driver. */ -static int __devexit altera_ps2_remove(struct platform_device *pdev) +static int altera_ps2_remove(struct platform_device *pdev) { struct ps2if *ps2if = platform_get_drvdata(pdev); @@ -187,7 +187,7 @@ MODULE_DEVICE_TABLE(of, altera_ps2_match); */ static struct platform_driver altera_ps2_driver = { .probe = altera_ps2_probe, - .remove = __devexit_p(altera_ps2_remove), + .remove = altera_ps2_remove, .driver = { .name = DRV_NAME, .owner = THIS_MODULE, diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c index 2e77246c2e5a..4e2fd44865e1 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) clk_disable_unprepare(kmi->clk); } -static int __devinit amba_kmi_probe(struct amba_device *dev, +static int amba_kmi_probe(struct amba_device *dev, const struct amba_id *id) { struct amba_kmi_port *kmi; @@ -163,7 +163,7 @@ static int __devinit amba_kmi_probe(struct amba_device *dev, return ret; } -static int __devexit amba_kmi_remove(struct amba_device *dev) +static int amba_kmi_remove(struct amba_device *dev) { struct amba_kmi_port *kmi = amba_get_drvdata(dev); @@ -204,7 +204,7 @@ static struct amba_driver ambakmi_driver = { }, .id_table = amba_kmi_idtable, .probe = amba_kmi_probe, - .remove = __devexit_p(amba_kmi_remove), + .remove = amba_kmi_remove, .resume = amba_kmi_resume, }; diff --git a/drivers/input/serio/arc_ps2.c b/drivers/input/serio/arc_ps2.c new file mode 100644 index 000000000000..b571eb3e4efc --- /dev/null +++ b/drivers/input/serio/arc_ps2.c @@ -0,0 +1,274 @@ +/* + * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Driver is originally developed by Pavel Sokolov <psokolov@synopsys.com> + */ + +#include <linux/module.h> +#include <linux/interrupt.h> +#include <linux/input.h> +#include <linux/serio.h> +#include <linux/platform_device.h> +#include <linux/io.h> +#include <linux/kernel.h> +#include <linux/slab.h> + +#define ARC_PS2_PORTS 2 + +#define ARC_ARC_PS2_ID 0x0001f609 + +#define STAT_TIMEOUT 128 + +#define PS2_STAT_RX_FRM_ERR (1) +#define PS2_STAT_RX_BUF_OVER (1 << 1) +#define PS2_STAT_RX_INT_EN (1 << 2) +#define PS2_STAT_RX_VAL (1 << 3) +#define PS2_STAT_TX_ISNOT_FUL (1 << 4) +#define PS2_STAT_TX_INT_EN (1 << 5) + +struct arc_ps2_port { + void __iomem *data_addr; + void __iomem *status_addr; + struct serio *io; +}; + +struct arc_ps2_data { + struct arc_ps2_port port[ARC_PS2_PORTS]; + void __iomem *addr; + unsigned int frame_error; + unsigned int buf_overflow; + unsigned int total_int; +}; + +static void arc_ps2_check_rx(struct arc_ps2_data *arc_ps2, + struct arc_ps2_port *port) +{ + unsigned int timeout = 1000; + unsigned int flag, status; + unsigned char data; + + do { + status = ioread32(port->status_addr); + if (!(status & PS2_STAT_RX_VAL)) + return; + + data = ioread32(port->data_addr) & 0xff; + + flag = 0; + arc_ps2->total_int++; + if (status & PS2_STAT_RX_FRM_ERR) { + arc_ps2->frame_error++; + flag |= SERIO_PARITY; + } else if (status & PS2_STAT_RX_BUF_OVER) { + arc_ps2->buf_overflow++; + flag |= SERIO_FRAME; + } + + serio_interrupt(port->io, data, flag); + } while (--timeout); + + dev_err(&port->io->dev, "PS/2 hardware stuck\n"); +} + +static irqreturn_t arc_ps2_interrupt(int irq, void *dev) +{ + struct arc_ps2_data *arc_ps2 = dev; + int i; + + for (i = 0; i < ARC_PS2_PORTS; i++) + arc_ps2_check_rx(arc_ps2, &arc_ps2->port[i]); + + return IRQ_HANDLED; +} + +static int arc_ps2_write(struct serio *io, unsigned char val) +{ + unsigned status; + struct arc_ps2_port *port = io->port_data; + int timeout = STAT_TIMEOUT; + + do { + status = ioread32(port->status_addr); + cpu_relax(); + + if (status & PS2_STAT_TX_ISNOT_FUL) { + iowrite32(val & 0xff, port->data_addr); + return 0; + } + + } while (--timeout); + + dev_err(&io->dev, "write timeout\n"); + return -ETIMEDOUT; +} + +static int arc_ps2_open(struct serio *io) +{ + struct arc_ps2_port *port = io->port_data; + + iowrite32(PS2_STAT_RX_INT_EN, port->status_addr); + + return 0; +} + +static void arc_ps2_close(struct serio *io) +{ + struct arc_ps2_port *port = io->port_data; + + iowrite32(ioread32(port->status_addr) & ~PS2_STAT_RX_INT_EN, + port->status_addr); +} + +static void __iomem *arc_ps2_calc_addr(struct arc_ps2_data *arc_ps2, + int index, bool status) +{ + void __iomem *addr; + + addr = arc_ps2->addr + 4 + 4 * index; + if (status) + addr += ARC_PS2_PORTS * 4; + + return addr; +} + +static void arc_ps2_inhibit_ports(struct arc_ps2_data *arc_ps2) +{ + void __iomem *addr; + u32 val; + int i; + + for (i = 0; i < ARC_PS2_PORTS; i++) { + addr = arc_ps2_calc_addr(arc_ps2, i, true); + val = ioread32(addr); + val &= ~(PS2_STAT_RX_INT_EN | PS2_STAT_TX_INT_EN); + iowrite32(val, addr); + } +} + +static int arc_ps2_create_port(struct platform_device *pdev, + struct arc_ps2_data *arc_ps2, + int index) +{ + struct arc_ps2_port *port = &arc_ps2->port[index]; + struct serio *io; + + io = kzalloc(sizeof(struct serio), GFP_KERNEL); + if (!io) + return -ENOMEM; + + io->id.type = SERIO_8042; + io->write = arc_ps2_write; + io->open = arc_ps2_open; + io->close = arc_ps2_close; + snprintf(io->name, sizeof(io->name), "ARC PS/2 port%d", index); + snprintf(io->phys, sizeof(io->phys), "arc/serio%d", index); + io->port_data = port; + + port->io = io; + + port->data_addr = arc_ps2_calc_addr(arc_ps2, index, false); + port->status_addr = arc_ps2_calc_addr(arc_ps2, index, true); + + dev_dbg(&pdev->dev, "port%d is allocated (data = 0x%p, status = 0x%p)\n", + index, port->data_addr, port->status_addr); + + serio_register_port(port->io); + return 0; +} + +static int arc_ps2_probe(struct platform_device *pdev) +{ + struct arc_ps2_data *arc_ps2; + struct resource *res; + int irq; + int error, id, i; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!res) { + dev_err(&pdev->dev, "no IO memory defined\n"); + return -EINVAL; + } + + irq = platform_get_irq_byname(pdev, "arc_ps2_irq"); + if (irq < 0) { + dev_err(&pdev->dev, "no IRQ defined\n"); + return -EINVAL; + } + + arc_ps2 = devm_kzalloc(&pdev->dev, sizeof(struct arc_ps2_data), + GFP_KERNEL); + if (!arc_ps2) { + dev_err(&pdev->dev, "out of memory\n"); + return -ENOMEM; + } + + arc_ps2->addr = devm_request_and_ioremap(&pdev->dev, res); + if (!arc_ps2->addr) + return -EBUSY; + + dev_info(&pdev->dev, "irq = %d, address = 0x%p, ports = %i\n", + irq, arc_ps2->addr, ARC_PS2_PORTS); + + id = ioread32(arc_ps2->addr); + if (id != ARC_ARC_PS2_ID) { + dev_err(&pdev->dev, "device id does not match\n"); + return -ENXIO; + } + + arc_ps2_inhibit_ports(arc_ps2); + + error = devm_request_irq(&pdev->dev, irq, arc_ps2_interrupt, + 0, "arc_ps2", arc_ps2); + if (error) { + dev_err(&pdev->dev, "Could not allocate IRQ\n"); + return error; + } + + for (i = 0; i < ARC_PS2_PORTS; i++) { + error = arc_ps2_create_port(pdev, arc_ps2, i); + if (error) { + while (--i >= 0) + serio_unregister_port(arc_ps2->port[i].io); + return error; + } + } + + platform_set_drvdata(pdev, arc_ps2); + + return 0; +} + +static int arc_ps2_remove(struct platform_device *pdev) +{ + struct arc_ps2_data *arc_ps2 = platform_get_drvdata(pdev); + int i; + + for (i = 0; i < ARC_PS2_PORTS; i++) + serio_unregister_port(arc_ps2->port[i].io); + + dev_dbg(&pdev->dev, "interrupt count = %i\n", arc_ps2->total_int); + dev_dbg(&pdev->dev, "frame error count = %i\n", arc_ps2->frame_error); + dev_dbg(&pdev->dev, "buffer overflow count = %i\n", + arc_ps2->buf_overflow); + + return 0; +} + +static struct platform_driver arc_ps2_driver = { + .driver = { + .name = "arc_ps2", + .owner = THIS_MODULE, + }, + .probe = arc_ps2_probe, + .remove = arc_ps2_remove, +}; + +module_platform_driver(arc_ps2_driver); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Pavel Sokolov <psokolov@synopsys.com>"); +MODULE_DESCRIPTION("ARC PS/2 Driver"); diff --git a/drivers/input/serio/ct82c710.c b/drivers/input/serio/ct82c710.c index 852816567241..cfe549d4eaa5 100644 --- a/drivers/input/serio/ct82c710.c +++ b/drivers/input/serio/ct82c710.c @@ -175,7 +175,7 @@ static int __init ct82c710_detect(void) return 0; } -static int __devinit ct82c710_probe(struct platform_device *dev) +static int ct82c710_probe(struct platform_device *dev) { ct82c710_port = kzalloc(sizeof(struct serio), GFP_KERNEL); if (!ct82c710_port) @@ -199,7 +199,7 @@ static int __devinit ct82c710_probe(struct platform_device *dev) return 0; } -static int __devexit ct82c710_remove(struct platform_device *dev) +static int ct82c710_remove(struct platform_device *dev) { serio_unregister_port(ct82c710_port); @@ -212,7 +212,7 @@ static struct platform_driver ct82c710_driver = { .owner = THIS_MODULE, }, .probe = ct82c710_probe, - .remove = __devexit_p(ct82c710_remove), + .remove = ct82c710_remove, }; diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c index 4225f5d6b15f..8d9ba0c3827c 100644 --- a/drivers/input/serio/gscps2.c +++ b/drivers/input/serio/gscps2.c @@ -327,7 +327,7 @@ static void gscps2_close(struct serio *port) * @return: success/error report */ -static int __devinit gscps2_probe(struct parisc_device *dev) +static int gscps2_probe(struct parisc_device *dev) { struct gscps2port *ps2port; struct serio *serio; @@ -414,7 +414,7 @@ fail_nomem: * @return: success/error report */ -static int __devexit gscps2_remove(struct parisc_device *dev) +static int gscps2_remove(struct parisc_device *dev) { struct gscps2port *ps2port = dev_get_drvdata(&dev->dev); @@ -444,7 +444,7 @@ static struct parisc_driver parisc_ps2_driver = { .name = "gsc_ps2", .id_table = gscps2_device_tbl, .probe = gscps2_probe, - .remove = __devexit_p(gscps2_remove), + .remove = gscps2_remove, }; static int __init gscps2_init(void) diff --git a/drivers/input/serio/hil_mlc.c b/drivers/input/serio/hil_mlc.c index bfd3865d886b..65605e4ef3cf 100644 --- a/drivers/input/serio/hil_mlc.c +++ b/drivers/input/serio/hil_mlc.c @@ -686,13 +686,12 @@ static int hilse_donode(hil_mlc *mlc) write_lock_irqsave(&mlc->lock, flags); pack = node->object.packet; out: - if (mlc->istarted) - goto out2; - /* Prepare to receive input */ - if ((node + 1)->act & HILSE_IN) - hilse_setup_input(mlc, node + 1); + if (!mlc->istarted) { + /* Prepare to receive input */ + if ((node + 1)->act & HILSE_IN) + hilse_setup_input(mlc, node + 1); + } - out2: write_unlock_irqrestore(&mlc->lock, flags); if (down_trylock(&mlc->osem)) { @@ -1010,8 +1009,6 @@ static int __init hil_mlc_init(void) static void __exit hil_mlc_exit(void) { del_timer_sync(&hil_mlcs_kicker); - - tasklet_disable(&hil_mlcs_tasklet); tasklet_kill(&hil_mlcs_tasklet); } diff --git a/drivers/input/serio/i8042-io.h b/drivers/input/serio/i8042-io.h index 5d48bb66aa73..a5eed2ade53d 100644 --- a/drivers/input/serio/i8042-io.h +++ b/drivers/input/serio/i8042-io.h @@ -76,7 +76,7 @@ static inline int i8042_platform_init(void) if (check_legacy_ioport(I8042_DATA_REG)) return -ENODEV; #endif -#if !defined(__sh__) && !defined(__alpha__) && !defined(__mips__) +#if !defined(__sh__) && !defined(__alpha__) if (!request_region(I8042_DATA_REG, 16, "i8042")) return -EBUSY; #endif diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h index 395a9af3adcd..d6aa4c67dbb6 100644 --- a/drivers/input/serio/i8042-sparcio.h +++ b/drivers/input/serio/i8042-sparcio.h @@ -49,7 +49,7 @@ static inline void i8042_write_command(int val) #define OBP_PS2MS_NAME1 "kdmouse" #define OBP_PS2MS_NAME2 "mouse" -static int __devinit sparc_i8042_probe(struct platform_device *op) +static int sparc_i8042_probe(struct platform_device *op) { struct device_node *dp = op->dev.of_node; @@ -80,7 +80,7 @@ static int __devinit sparc_i8042_probe(struct platform_device *op) return 0; } -static int __devexit sparc_i8042_remove(struct platform_device *op) +static int sparc_i8042_remove(struct platform_device *op) { of_iounmap(kbd_res, kbd_iobase, 8); @@ -102,7 +102,7 @@ static struct platform_driver sparc_i8042_driver = { .of_match_table = sparc_i8042_match, }, .probe = sparc_i8042_probe, - .remove = __devexit_p(sparc_i8042_remove), + .remove = sparc_i8042_remove, }; static int __init i8042_platform_init(void) diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index d6cc77a53c7e..5f306f79da0c 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h @@ -921,6 +921,7 @@ static int __init i8042_platform_init(void) int retval; #ifdef CONFIG_X86 + u8 a20_on = 0xdf; /* Just return if pre-detection shows no i8042 controller exist */ if (!x86_platform.i8042_detect()) return -ENODEV; @@ -960,6 +961,14 @@ static int __init i8042_platform_init(void) if (dmi_check_system(i8042_dmi_dritek_table)) i8042_dritek = true; + + /* + * A20 was already enabled during early kernel init. But some buggy + * BIOSes (in MSI Laptops) require A20 to be enabled using 8042 to + * resume from S3. So we do it here and hope that nothing breaks. + */ + i8042_command(&a20_on, 0x10d1); + i8042_command(NULL, 0x00ff); /* Null command for SMM firmware */ #endif /* CONFIG_X86 */ return retval; diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 86564414b75a..78e4de42efaa 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c @@ -1284,7 +1284,7 @@ static void __init i8042_register_ports(void) } } -static void __devexit i8042_unregister_ports(void) +static void i8042_unregister_ports(void) { int i; @@ -1437,7 +1437,7 @@ static int __init i8042_probe(struct platform_device *dev) return error; } -static int __devexit i8042_remove(struct platform_device *dev) +static int i8042_remove(struct platform_device *dev) { i8042_unregister_ports(); i8042_free_irqs(); @@ -1455,7 +1455,7 @@ static struct platform_driver i8042_driver = { .pm = &i8042_pm_ops, #endif }, - .remove = __devexit_p(i8042_remove), + .remove = i8042_remove, .shutdown = i8042_shutdown, }; diff --git a/drivers/input/serio/maceps2.c b/drivers/input/serio/maceps2.c index 61da763b1209..bc85e1cc66d8 100644 --- a/drivers/input/serio/maceps2.c +++ b/drivers/input/serio/maceps2.c @@ -116,7 +116,7 @@ static void maceps2_close(struct serio *dev) } -static struct serio * __devinit maceps2_allocate_port(int idx) +static struct serio *maceps2_allocate_port(int idx) { struct serio *serio; @@ -135,7 +135,7 @@ static struct serio * __devinit maceps2_allocate_port(int idx) return serio; } -static int __devinit maceps2_probe(struct platform_device *dev) +static int maceps2_probe(struct platform_device *dev) { maceps2_port[0] = maceps2_allocate_port(0); maceps2_port[1] = maceps2_allocate_port(1); @@ -151,7 +151,7 @@ static int __devinit maceps2_probe(struct platform_device *dev) return 0; } -static int __devexit maceps2_remove(struct platform_device *dev) +static int maceps2_remove(struct platform_device *dev) { serio_unregister_port(maceps2_port[0]); serio_unregister_port(maceps2_port[1]); @@ -165,7 +165,7 @@ static struct platform_driver maceps2_driver = { .owner = THIS_MODULE, }, .probe = maceps2_probe, - .remove = __devexit_p(maceps2_remove), + .remove = maceps2_remove, }; static int __init maceps2_init(void) diff --git a/drivers/input/serio/pcips2.c b/drivers/input/serio/pcips2.c index 0c42497aaaf4..76f83836fd5a 100644 --- a/drivers/input/serio/pcips2.c +++ b/drivers/input/serio/pcips2.c @@ -127,7 +127,7 @@ static void pcips2_close(struct serio *io) free_irq(ps2if->dev->irq, ps2if); } -static int __devinit pcips2_probe(struct pci_dev *dev, const struct pci_device_id *id) +static int pcips2_probe(struct pci_dev *dev, const struct pci_device_id *id) { struct pcips2_data *ps2if; struct serio *serio; @@ -176,7 +176,7 @@ static int __devinit pcips2_probe(struct pci_dev *dev, const struct pci_device_i return ret; } -static void __devexit pcips2_remove(struct pci_dev *dev) +static void pcips2_remove(struct pci_dev *dev) { struct pcips2_data *ps2if = pci_get_drvdata(dev); @@ -212,7 +212,7 @@ static struct pci_driver pcips2_driver = { .name = "pcips2", .id_table = pcips2_ids, .probe = pcips2_probe, - .remove = __devexit_p(pcips2_remove), + .remove = pcips2_remove, }; module_pci_driver(pcips2_driver); diff --git a/drivers/input/serio/q40kbd.c b/drivers/input/serio/q40kbd.c index 0c0df7f73802..70fe542839fb 100644 --- a/drivers/input/serio/q40kbd.c +++ b/drivers/input/serio/q40kbd.c @@ -122,7 +122,7 @@ static void q40kbd_close(struct serio *port) q40kbd_flush(q40kbd); } -static int __devinit q40kbd_probe(struct platform_device *pdev) +static int q40kbd_probe(struct platform_device *pdev) { struct q40kbd *q40kbd; struct serio *port; @@ -168,7 +168,7 @@ err_free_mem: return error; } -static int __devexit q40kbd_remove(struct platform_device *pdev) +static int q40kbd_remove(struct platform_device *pdev) { struct q40kbd *q40kbd = platform_get_drvdata(pdev); @@ -190,7 +190,7 @@ static struct platform_driver q40kbd_driver = { .name = "q40kbd", .owner = THIS_MODULE, }, - .remove = __devexit_p(q40kbd_remove), + .remove = q40kbd_remove, }; static int __init q40kbd_init(void) diff --git a/drivers/input/serio/rpckbd.c b/drivers/input/serio/rpckbd.c index 2af5df6a8fba..567566ae0dae 100644 --- a/drivers/input/serio/rpckbd.c +++ b/drivers/input/serio/rpckbd.c @@ -114,7 +114,7 @@ static void rpckbd_close(struct serio *port) * Allocate and initialize serio structure for subsequent registration * with serio core. */ -static int __devinit rpckbd_probe(struct platform_device *dev) +static int rpckbd_probe(struct platform_device *dev) { struct rpckbd_data *rpckbd; struct serio *serio; @@ -153,7 +153,7 @@ static int __devinit rpckbd_probe(struct platform_device *dev) return 0; } -static int __devexit rpckbd_remove(struct platform_device *dev) +static int rpckbd_remove(struct platform_device *dev) { struct serio *serio = platform_get_drvdata(dev); struct rpckbd_data *rpckbd = serio->port_data; @@ -166,7 +166,7 @@ static int __devexit rpckbd_remove(struct platform_device *dev) static struct platform_driver rpckbd_driver = { .probe = rpckbd_probe, - .remove = __devexit_p(rpckbd_remove), + .remove = rpckbd_remove, .driver = { .name = "kart", .owner = THIS_MODULE, diff --git a/drivers/input/serio/sa1111ps2.c b/drivers/input/serio/sa1111ps2.c index 389766707534..b3e688911fd9 100644 --- a/drivers/input/serio/sa1111ps2.c +++ b/drivers/input/serio/sa1111ps2.c @@ -193,7 +193,7 @@ static void ps2_close(struct serio *io) /* * Clear the input buffer. */ -static void __devinit ps2_clear_input(struct ps2if *ps2if) +static void ps2_clear_input(struct ps2if *ps2if) { int maxread = 100; @@ -203,7 +203,7 @@ static void __devinit ps2_clear_input(struct ps2if *ps2if) } } -static unsigned int __devinit ps2_test_one(struct ps2if *ps2if, +static unsigned int ps2_test_one(struct ps2if *ps2if, unsigned int mask) { unsigned int val; @@ -220,7 +220,7 @@ static unsigned int __devinit ps2_test_one(struct ps2if *ps2if, * Test the keyboard interface. We basically check to make sure that * we can drive each line to the keyboard independently of each other. */ -static int __devinit ps2_test(struct ps2if *ps2if) +static int ps2_test(struct ps2if *ps2if) { unsigned int stat; int ret = 0; @@ -251,7 +251,7 @@ static int __devinit ps2_test(struct ps2if *ps2if) /* * Add one device to this driver. */ -static int __devinit ps2_probe(struct sa1111_dev *dev) +static int ps2_probe(struct sa1111_dev *dev) { struct ps2if *ps2if; struct serio *serio; @@ -334,7 +334,7 @@ static int __devinit ps2_probe(struct sa1111_dev *dev) /* * Remove one device from this driver. */ -static int __devexit ps2_remove(struct sa1111_dev *dev) +static int ps2_remove(struct sa1111_dev *dev) { struct ps2if *ps2if = sa1111_get_drvdata(dev); @@ -357,7 +357,7 @@ static struct sa1111_driver ps2_driver = { }, .devid = SA1111_DEVID_PS2, .probe = ps2_probe, - .remove = __devexit_p(ps2_remove), + .remove = ps2_remove, }; static int __init ps2_init(void) diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c index d0f7533dbf88..25fc5971f426 100644 --- a/drivers/input/serio/serio.c +++ b/drivers/input/serio/serio.c @@ -891,8 +891,6 @@ static int serio_bus_match(struct device *dev, struct device_driver *drv) return serio_match_port(serio_drv->id_table, serio); } -#ifdef CONFIG_HOTPLUG - #define SERIO_ADD_UEVENT_VAR(fmt, val...) \ do { \ int err = add_uevent_var(env, fmt, val); \ @@ -920,15 +918,6 @@ static int serio_uevent(struct device *dev, struct kobj_uevent_env *env) } #undef SERIO_ADD_UEVENT_VAR -#else - -static int serio_uevent(struct device *dev, struct kobj_uevent_env *env) -{ - return -ENODEV; -} - -#endif /* CONFIG_HOTPLUG */ - #ifdef CONFIG_PM static int serio_suspend(struct device *dev) { diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c index 1e983bec7d86..17be85948ffd 100644 --- a/drivers/input/serio/xilinx_ps2.c +++ b/drivers/input/serio/xilinx_ps2.c @@ -233,7 +233,7 @@ static void sxps2_close(struct serio *pserio) * It returns 0, if the driver is bound to the PS/2 device, or a negative * value if there is an error. */ -static int __devinit xps2_of_probe(struct platform_device *ofdev) +static int xps2_of_probe(struct platform_device *ofdev) { struct resource r_irq; /* Interrupt resources */ struct resource r_mem; /* IO mem resources */ @@ -333,7 +333,7 @@ failed1: * if the driver module is being unloaded. It frees any resources allocated to * the device. */ -static int __devexit xps2_of_remove(struct platform_device *of_dev) +static int xps2_of_remove(struct platform_device *of_dev) { struct xps2data *drvdata = platform_get_drvdata(of_dev); struct resource r_mem; /* IO mem resources */ @@ -355,7 +355,7 @@ static int __devexit xps2_of_remove(struct platform_device *of_dev) } /* Match table for of_platform binding */ -static const struct of_device_id xps2_of_match[] __devinitconst = { +static const struct of_device_id xps2_of_match[] = { { .compatible = "xlnx,xps-ps2-1.00.a", }, { /* end of list */ }, }; @@ -368,7 +368,7 @@ static struct platform_driver xps2_of_driver = { .of_match_table = xps2_of_match, }, .probe = xps2_of_probe, - .remove = __devexit_p(xps2_of_remove), + .remove = xps2_of_remove, }; module_platform_driver(xps2_of_driver); |