diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-01-06 01:56:04 (GMT) |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-01-06 08:22:00 (GMT) |
commit | ddf1ffbd40c92ff1e58c45fa96d309788f7beb60 (patch) | |
tree | 4386c23fb68c55a7574ede5264c58f5412364efc /drivers | |
parent | 386d8772980be01b94bd463ea1e745732d7eb502 (diff) | |
download | linux-ddf1ffbd40c92ff1e58c45fa96d309788f7beb60.tar.xz |
Input: serio - let device core tell us if device was registered
No need to keep track of it by ourselves.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/serio/serio.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c index 0a278f9..d898804 100644 --- a/drivers/input/serio/serio.c +++ b/drivers/input/serio/serio.c @@ -577,8 +577,6 @@ static void serio_add_port(struct serio *serio) printk(KERN_ERR "serio: device_add() failed for %s (%s), error: %d\n", serio->phys, serio->name, error); - else - serio->registered = true; } /* @@ -605,10 +603,8 @@ static void serio_destroy_port(struct serio *serio) serio->parent = NULL; } - if (serio->registered) { + if (device_is_registered(&serio->dev)) device_del(&serio->dev); - serio->registered = false; - } list_del_init(&serio->node); serio_remove_pending_events(serio); @@ -995,7 +991,7 @@ irqreturn_t serio_interrupt(struct serio *serio, if (likely(serio->drv)) { ret = serio->drv->interrupt(serio, data, dfl); - } else if (!dfl && serio->registered) { + } else if (!dfl && device_is_registered(&serio->dev)) { serio_rescan(serio); ret = IRQ_HANDLED; } |