Skip to content

Commit

Permalink
Input: gameport: convert bus code to use drv_groups
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gregkh committed Aug 25, 2013
1 parent 14adbe5 commit 5e9e491
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions drivers/input/gameport/gameport.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,16 +639,18 @@ EXPORT_SYMBOL(gameport_unregister_port);
* Gameport driver operations
*/

static ssize_t gameport_driver_show_description(struct device_driver *drv, char *buf)
static ssize_t description_show(struct device_driver *drv, char *buf)
{
struct gameport_driver *driver = to_gameport_driver(drv);
return sprintf(buf, "%s\n", driver->description ? driver->description : "(none)");
}
static DRIVER_ATTR_RO(description);

static struct driver_attribute gameport_driver_attrs[] = {
__ATTR(description, S_IRUGO, gameport_driver_show_description, NULL),
__ATTR_NULL
static struct attribute *gameport_driver_attrs[] = {
&driver_attr_description.attr,
NULL
};
ATTRIBUTE_GROUPS(gameport_driver);

static int gameport_driver_probe(struct device *dev)
{
Expand Down Expand Up @@ -749,7 +751,7 @@ static int gameport_bus_match(struct device *dev, struct device_driver *drv)
static struct bus_type gameport_bus = {
.name = "gameport",
.dev_attrs = gameport_device_attrs,
.drv_attrs = gameport_driver_attrs,
.drv_groups = gameport_driver_groups,
.match = gameport_bus_match,
.probe = gameport_driver_probe,
.remove = gameport_driver_remove,
Expand Down

0 comments on commit 5e9e491

Please sign in to comment.