projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-2.6.29' of git://linux-nfs.org/~bfields/linux
[deliverable/linux.git]
/
drivers
/
firewire
/
fw-card.c
diff --git
a/drivers/firewire/fw-card.c
b/drivers/firewire/fw-card.c
index 418c18f07e9d30af996bd4e01eada238e0318113..799f94424c8a5f0ebedf185059d94a0c64ecb893 100644
(file)
--- a/
drivers/firewire/fw-card.c
+++ b/
drivers/firewire/fw-card.c
@@
-75,7
+75,7
@@
generate_config_rom(struct fw_card *card, size_t *config_rom_length)
* controller, block reads to the config rom accesses the host
* memory, but quadlet read access the hardware bus info block
* registers. That's just crack, but it means we should make
* controller, block reads to the config rom accesses the host
* memory, but quadlet read access the hardware bus info block
* registers. That's just crack, but it means we should make
- * sure the contents of bus info block in host memory mat
hc
es
+ * sure the contents of bus info block in host memory mat
ch
es
* the version stored in the OHCI registers.
*/
* the version stored in the OHCI registers.
*/
@@
-189,6
+189,17
@@
static const char gap_count_table[] = {
63, 5, 7, 8, 10, 13, 16, 18, 21, 24, 26, 29, 32, 35, 37, 40
};
63, 5, 7, 8, 10, 13, 16, 18, 21, 24, 26, 29, 32, 35, 37, 40
};
+void
+fw_schedule_bm_work(struct fw_card *card, unsigned long delay)
+{
+ int scheduled;
+
+ fw_card_get(card);
+ scheduled = schedule_delayed_work(&card->work, delay);
+ if (!scheduled)
+ fw_card_put(card);
+}
+
static void
fw_card_bm_work(struct work_struct *work)
{
static void
fw_card_bm_work(struct work_struct *work)
{
@@
-206,7
+217,7
@@
fw_card_bm_work(struct work_struct *work)
if (local_node == NULL) {
spin_unlock_irqrestore(&card->lock, flags);
if (local_node == NULL) {
spin_unlock_irqrestore(&card->lock, flags);
-
return
;
+
goto out_put_card
;
}
fw_node_get(local_node);
fw_node_get(root_node);
}
fw_node_get(local_node);
fw_node_get(root_node);
@@
-280,7
+291,7
@@
fw_card_bm_work(struct work_struct *work)
* this task 100ms from now.
*/
spin_unlock_irqrestore(&card->lock, flags);
* this task 100ms from now.
*/
spin_unlock_irqrestore(&card->lock, flags);
-
schedule_delayed_work(&card->work
, DIV_ROUND_UP(HZ, 10));
+
fw_schedule_bm_work(card
, DIV_ROUND_UP(HZ, 10));
goto out;
}
goto out;
}
@@
-355,6
+366,8
@@
fw_card_bm_work(struct work_struct *work)
fw_device_put(root_device);
fw_node_put(root_node);
fw_node_put(local_node);
fw_device_put(root_device);
fw_node_put(root_node);
fw_node_put(local_node);
+ out_put_card:
+ fw_card_put(card);
}
static void
}
static void
@@
-510,7
+523,6
@@
fw_core_remove_card(struct fw_card *card)
fw_card_put(card);
wait_for_completion(&card->done);
fw_card_put(card);
wait_for_completion(&card->done);
- cancel_delayed_work_sync(&card->work);
WARN_ON(!list_empty(&card->transaction_list));
del_timer_sync(&card->flush_timer);
}
WARN_ON(!list_empty(&card->transaction_list));
del_timer_sync(&card->flush_timer);
}
This page took
0.024688 seconds
and
5
git commands to generate.