Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134912
b: refs/heads/master
c: 9b02f41
h: refs/heads/master
v: v3
  • Loading branch information
Dan Williams authored and John W. Linville committed Feb 27, 2009
1 parent f503982 commit 847d5d8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 25d3ef59a2112d50e145500e1bc764f9e8fd4896
refs/heads/master: 9b02f419a7dbd956b2c293e5cb1790b6b687f367
14 changes: 9 additions & 5 deletions trunk/drivers/net/wireless/libertas/if_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ struct if_sdio_card {

spinlock_t lock;
struct if_sdio_packet *packets;

struct workqueue_struct *workqueue;
struct work_struct packet_worker;
};

Expand Down Expand Up @@ -746,7 +748,7 @@ static int if_sdio_host_to_card(struct lbs_private *priv,

spin_unlock_irqrestore(&card->lock, flags);

schedule_work(&card->packet_worker);
queue_work(card->workqueue, &card->packet_worker);

ret = 0;

Expand Down Expand Up @@ -836,6 +838,7 @@ static int if_sdio_probe(struct sdio_func *func,
card->func = func;
card->model = model;
spin_lock_init(&card->lock);
card->workqueue = create_workqueue("libertas_sdio");
INIT_WORK(&card->packet_worker, if_sdio_host_to_card_worker);

for (i = 0;i < ARRAY_SIZE(if_sdio_models);i++) {
Expand Down Expand Up @@ -933,9 +936,8 @@ static int if_sdio_probe(struct sdio_func *func,
return ret;

err_activate_card:
flush_scheduled_work();
free_netdev(priv->dev);
kfree(priv);
flush_workqueue(card->workqueue);
lbs_remove_card(priv);
reclaim:
sdio_claim_host(func);
release_int:
Expand All @@ -945,6 +947,7 @@ static int if_sdio_probe(struct sdio_func *func,
release:
sdio_release_host(func);
free:
destroy_workqueue(card->workqueue);
while (card->packets) {
packet = card->packets;
card->packets = card->packets->next;
Expand All @@ -971,7 +974,8 @@ static void if_sdio_remove(struct sdio_func *func)
lbs_stop_card(card->priv);
lbs_remove_card(card->priv);

flush_scheduled_work();
flush_workqueue(card->workqueue);
destroy_workqueue(card->workqueue);

sdio_claim_host(func);
sdio_release_irq(func);
Expand Down

0 comments on commit 847d5d8

Please sign in to comment.