diff options
Diffstat (limited to 'drivers/input/serio/serio.c')
-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 0a278f9f1d3a..d89880450f77 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) | |||
577 | printk(KERN_ERR | 577 | printk(KERN_ERR |
578 | "serio: device_add() failed for %s (%s), error: %d\n", | 578 | "serio: device_add() failed for %s (%s), error: %d\n", |
579 | serio->phys, serio->name, error); | 579 | serio->phys, serio->name, error); |
580 | else | ||
581 | serio->registered = true; | ||
582 | } | 580 | } |
583 | 581 | ||
584 | /* | 582 | /* |
@@ -605,10 +603,8 @@ static void serio_destroy_port(struct serio *serio) | |||
605 | serio->parent = NULL; | 603 | serio->parent = NULL; |
606 | } | 604 | } |
607 | 605 | ||
608 | if (serio->registered) { | 606 | if (device_is_registered(&serio->dev)) |
609 | device_del(&serio->dev); | 607 | device_del(&serio->dev); |
610 | serio->registered = false; | ||
611 | } | ||
612 | 608 | ||
613 | list_del_init(&serio->node); | 609 | list_del_init(&serio->node); |
614 | serio_remove_pending_events(serio); | 610 | serio_remove_pending_events(serio); |
@@ -995,7 +991,7 @@ irqreturn_t serio_interrupt(struct serio *serio, | |||
995 | 991 | ||
996 | if (likely(serio->drv)) { | 992 | if (likely(serio->drv)) { |
997 | ret = serio->drv->interrupt(serio, data, dfl); | 993 | ret = serio->drv->interrupt(serio, data, dfl); |
998 | } else if (!dfl && serio->registered) { | 994 | } else if (!dfl && device_is_registered(&serio->dev)) { |
999 | serio_rescan(serio); | 995 | serio_rescan(serio); |
1000 | ret = IRQ_HANDLED; | 996 | ret = IRQ_HANDLED; |
1001 | } | 997 | } |