diff options
Diffstat (limited to 'drivers/firewire/fw-device.c')
-rw-r--r-- | drivers/firewire/fw-device.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/firewire/fw-device.c b/drivers/firewire/fw-device.c index d9c8daf7ae7d..0855fb5568e8 100644 --- a/drivers/firewire/fw-device.c +++ b/drivers/firewire/fw-device.c | |||
@@ -168,7 +168,7 @@ static void fw_device_release(struct device *dev) | |||
168 | fw_node_put(device->node); | 168 | fw_node_put(device->node); |
169 | kfree(device->config_rom); | 169 | kfree(device->config_rom); |
170 | kfree(device); | 170 | kfree(device); |
171 | atomic_dec(&card->device_count); | 171 | fw_card_put(card); |
172 | } | 172 | } |
173 | 173 | ||
174 | int fw_device_enable_phys_dma(struct fw_device *device) | 174 | int fw_device_enable_phys_dma(struct fw_device *device) |
@@ -946,8 +946,7 @@ void fw_node_event(struct fw_card *card, struct fw_node *node, int event) | |||
946 | */ | 946 | */ |
947 | device_initialize(&device->device); | 947 | device_initialize(&device->device); |
948 | atomic_set(&device->state, FW_DEVICE_INITIALIZING); | 948 | atomic_set(&device->state, FW_DEVICE_INITIALIZING); |
949 | atomic_inc(&card->device_count); | 949 | device->card = fw_card_get(card); |
950 | device->card = card; | ||
951 | device->node = fw_node_get(node); | 950 | device->node = fw_node_get(node); |
952 | device->node_id = node->node_id; | 951 | device->node_id = node->node_id; |
953 | device->generation = card->generation; | 952 | device->generation = card->generation; |