aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/serio
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2013-10-08 11:43:00 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-10-08 11:43:00 -0400
commite3c55d406bd8df1a878546002c93db90c42be10c (patch)
treeefb0ba2707c95fd7166cf1b76887c43c977e37dd /drivers/input/serio
parent4d6e482675f13e33599fc3d18fc723959be0a9b6 (diff)
parentd0e639c9e06d44e713170031fe05fb60ebe680af (diff)
Merge tag 'v3.12-rc4' into next
Merge with mainline to bring in changes to input subsystem that were committed through other trees.
Diffstat (limited to 'drivers/input/serio')
-rw-r--r--drivers/input/serio/Kconfig1
-rw-r--r--drivers/input/serio/altera_ps2.c1
-rw-r--r--drivers/input/serio/serio.c21
3 files changed, 12 insertions, 11 deletions
diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig
index a5f342e7ea91..296cb88d7008 100644
--- a/drivers/input/serio/Kconfig
+++ b/drivers/input/serio/Kconfig
@@ -239,7 +239,6 @@ config SERIO_PS2MULT
239 239
240config SERIO_ARC_PS2 240config SERIO_ARC_PS2
241 tristate "ARC PS/2 support" 241 tristate "ARC PS/2 support"
242 depends on GENERIC_HARDIRQS
243 help 242 help
244 Say Y here if you have an ARC FPGA platform with a PS/2 243 Say Y here if you have an ARC FPGA platform with a PS/2
245 controller in it. 244 controller in it.
diff --git a/drivers/input/serio/altera_ps2.c b/drivers/input/serio/altera_ps2.c
index a0a2657e31ff..4777a73cd390 100644
--- a/drivers/input/serio/altera_ps2.c
+++ b/drivers/input/serio/altera_ps2.c
@@ -176,6 +176,7 @@ static int altera_ps2_remove(struct platform_device *pdev)
176#ifdef CONFIG_OF 176#ifdef CONFIG_OF
177static const struct of_device_id altera_ps2_match[] = { 177static const struct of_device_id altera_ps2_match[] = {
178 { .compatible = "ALTR,ps2-1.0", }, 178 { .compatible = "ALTR,ps2-1.0", },
179 { .compatible = "altr,ps2-1.0", },
179 {}, 180 {},
180}; 181};
181MODULE_DEVICE_TABLE(of, altera_ps2_match); 182MODULE_DEVICE_TABLE(of, altera_ps2_match);
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
index 25fc5971f426..2b56855c2c77 100644
--- a/drivers/input/serio/serio.c
+++ b/drivers/input/serio/serio.c
@@ -732,19 +732,20 @@ EXPORT_SYMBOL(serio_unregister_child_port);
732 * Serio driver operations 732 * Serio driver operations
733 */ 733 */
734 734
735static ssize_t serio_driver_show_description(struct device_driver *drv, char *buf) 735static ssize_t description_show(struct device_driver *drv, char *buf)
736{ 736{
737 struct serio_driver *driver = to_serio_driver(drv); 737 struct serio_driver *driver = to_serio_driver(drv);
738 return sprintf(buf, "%s\n", driver->description ? driver->description : "(none)"); 738 return sprintf(buf, "%s\n", driver->description ? driver->description : "(none)");
739} 739}
740static DRIVER_ATTR_RO(description);
740 741
741static ssize_t serio_driver_show_bind_mode(struct device_driver *drv, char *buf) 742static ssize_t bind_mode_show(struct device_driver *drv, char *buf)
742{ 743{
743 struct serio_driver *serio_drv = to_serio_driver(drv); 744 struct serio_driver *serio_drv = to_serio_driver(drv);
744 return sprintf(buf, "%s\n", serio_drv->manual_bind ? "manual" : "auto"); 745 return sprintf(buf, "%s\n", serio_drv->manual_bind ? "manual" : "auto");
745} 746}
746 747
747static ssize_t serio_driver_set_bind_mode(struct device_driver *drv, const char *buf, size_t count) 748static ssize_t bind_mode_store(struct device_driver *drv, const char *buf, size_t count)
748{ 749{
749 struct serio_driver *serio_drv = to_serio_driver(drv); 750 struct serio_driver *serio_drv = to_serio_driver(drv);
750 int retval; 751 int retval;
@@ -760,14 +761,14 @@ static ssize_t serio_driver_set_bind_mode(struct device_driver *drv, const char
760 761
761 return retval; 762 return retval;
762} 763}
764static DRIVER_ATTR_RW(bind_mode);
763 765
764 766static struct attribute *serio_driver_attrs[] = {
765static struct driver_attribute serio_driver_attrs[] = { 767 &driver_attr_description.attr,
766 __ATTR(description, S_IRUGO, serio_driver_show_description, NULL), 768 &driver_attr_bind_mode.attr,
767 __ATTR(bind_mode, S_IWUSR | S_IRUGO, 769 NULL,
768 serio_driver_show_bind_mode, serio_driver_set_bind_mode),
769 __ATTR_NULL
770}; 770};
771ATTRIBUTE_GROUPS(serio_driver);
771 772
772static int serio_driver_probe(struct device *dev) 773static int serio_driver_probe(struct device *dev)
773{ 774{
@@ -996,7 +997,7 @@ EXPORT_SYMBOL(serio_interrupt);
996static struct bus_type serio_bus = { 997static struct bus_type serio_bus = {
997 .name = "serio", 998 .name = "serio",
998 .dev_attrs = serio_device_attrs, 999 .dev_attrs = serio_device_attrs,
999 .drv_attrs = serio_driver_attrs, 1000 .drv_groups = serio_driver_groups,
1000 .match = serio_bus_match, 1001 .match = serio_bus_match,
1001 .uevent = serio_uevent, 1002 .uevent = serio_uevent,
1002 .probe = serio_driver_probe, 1003 .probe = serio_driver_probe,