aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/gameport
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-23 17:24:33 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-25 17:56:34 -0400
commit5e9e4911a5b3c6ae0fed6b3d23a9deff7825d86c (patch)
treefa4e04076fb7e179b1b3cd66b0a993d359d3fa9d /drivers/input/gameport
parent14adbe5307a4110af7d1e95fb604a1abcdaa6cce (diff)
Input: gameport: convert bus code to use drv_groups
The drv_attrs field of struct bus_type is going away soon, drv_groups should be used instead. This converts the gameport bus code to use the correct field. Acked: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/input/gameport')
-rw-r--r--drivers/input/gameport/gameport.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c
index da739d9d1905..922a7fea2ce6 100644
--- a/drivers/input/gameport/gameport.c
+++ b/drivers/input/gameport/gameport.c
@@ -639,16 +639,18 @@ EXPORT_SYMBOL(gameport_unregister_port);
639 * Gameport driver operations 639 * Gameport driver operations
640 */ 640 */
641 641
642static ssize_t gameport_driver_show_description(struct device_driver *drv, char *buf) 642static ssize_t description_show(struct device_driver *drv, char *buf)
643{ 643{
644 struct gameport_driver *driver = to_gameport_driver(drv); 644 struct gameport_driver *driver = to_gameport_driver(drv);
645 return sprintf(buf, "%s\n", driver->description ? driver->description : "(none)"); 645 return sprintf(buf, "%s\n", driver->description ? driver->description : "(none)");
646} 646}
647static DRIVER_ATTR_RO(description);
647 648
648static struct driver_attribute gameport_driver_attrs[] = { 649static struct attribute *gameport_driver_attrs[] = {
649 __ATTR(description, S_IRUGO, gameport_driver_show_description, NULL), 650 &driver_attr_description.attr,
650 __ATTR_NULL 651 NULL
651}; 652};
653ATTRIBUTE_GROUPS(gameport_driver);
652 654
653static int gameport_driver_probe(struct device *dev) 655static int gameport_driver_probe(struct device *dev)
654{ 656{
@@ -749,7 +751,7 @@ static int gameport_bus_match(struct device *dev, struct device_driver *drv)
749static struct bus_type gameport_bus = { 751static struct bus_type gameport_bus = {
750 .name = "gameport", 752 .name = "gameport",
751 .dev_attrs = gameport_device_attrs, 753 .dev_attrs = gameport_device_attrs,
752 .drv_attrs = gameport_driver_attrs, 754 .drv_groups = gameport_driver_groups,
753 .match = gameport_bus_match, 755 .match = gameport_bus_match,
754 .probe = gameport_driver_probe, 756 .probe = gameport_driver_probe,
755 .remove = gameport_driver_remove, 757 .remove = gameport_driver_remove,