aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/fw-card.c2
-rw-r--r--drivers/firewire/fw-device.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/firewire/fw-card.c b/drivers/firewire/fw-card.c
index 17a80cecdc14..7be2cf3514e7 100644
--- a/drivers/firewire/fw-card.c
+++ b/drivers/firewire/fw-card.c
@@ -512,7 +512,7 @@ fw_core_remove_card(struct fw_card *card)
512 fw_core_initiate_bus_reset(card, 1); 512 fw_core_initiate_bus_reset(card, 1);
513 513
514 mutex_lock(&card_mutex); 514 mutex_lock(&card_mutex);
515 list_del(&card->link); 515 list_del_init(&card->link);
516 mutex_unlock(&card_mutex); 516 mutex_unlock(&card_mutex);
517 517
518 /* Set up the dummy driver. */ 518 /* Set up the dummy driver. */
diff --git a/drivers/firewire/fw-device.c b/drivers/firewire/fw-device.c
index 0925d91b2610..bf53acb45652 100644
--- a/drivers/firewire/fw-device.c
+++ b/drivers/firewire/fw-device.c
@@ -657,7 +657,8 @@ static void fw_device_shutdown(struct work_struct *work)
657 container_of(work, struct fw_device, work.work); 657 container_of(work, struct fw_device, work.work);
658 int minor = MINOR(device->device.devt); 658 int minor = MINOR(device->device.devt);
659 659
660 if (time_is_after_jiffies(device->card->reset_jiffies + SHUTDOWN_DELAY)) { 660 if (time_is_after_jiffies(device->card->reset_jiffies + SHUTDOWN_DELAY)
661 && !list_empty(&device->card->link)) {
661 schedule_delayed_work(&device->work, SHUTDOWN_DELAY); 662 schedule_delayed_work(&device->work, SHUTDOWN_DELAY);
662 return; 663 return;
663 } 664 }
@@ -1074,7 +1075,8 @@ void fw_node_event(struct fw_card *card, struct fw_node *node, int event)
1074 if (atomic_xchg(&device->state, 1075 if (atomic_xchg(&device->state,
1075 FW_DEVICE_GONE) == FW_DEVICE_RUNNING) { 1076 FW_DEVICE_GONE) == FW_DEVICE_RUNNING) {
1076 PREPARE_DELAYED_WORK(&device->work, fw_device_shutdown); 1077 PREPARE_DELAYED_WORK(&device->work, fw_device_shutdown);
1077 schedule_delayed_work(&device->work, SHUTDOWN_DELAY); 1078 schedule_delayed_work(&device->work,
1079 list_empty(&card->link) ? 0 : SHUTDOWN_DELAY);
1078 } 1080 }
1079 break; 1081 break;
1080 } 1082 }