Commit 361b7b5b authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: gameport - let device core tell us if device was registered

No need to keep track of it by ourselves.
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent cac9169b
......@@ -561,8 +561,6 @@ static void gameport_add_port(struct gameport *gameport)
printk(KERN_ERR
"gameport: device_add() failed for %s (%s), error: %d\n",
gameport->phys, gameport->name, error);
else
gameport->registered = 1;
}
/*
......@@ -584,10 +582,8 @@ static void gameport_destroy_port(struct gameport *gameport)
gameport->parent = NULL;
}
if (gameport->registered) {
if (device_is_registered(&gameport->dev))
device_del(&gameport->dev);
gameport->registered = 0;
}
list_del_init(&gameport->node);
......
......@@ -46,7 +46,6 @@ struct gameport {
struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */
struct device dev;
unsigned int registered; /* port has been fully registered with driver core */
struct list_head node;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment