diff options
author | Daniel Walker <dwalker@mvista.com> | 2008-05-22 03:00:03 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-05-30 22:18:37 -0400 |
commit | 2914f3efa7ef80f12ff798cb1aa46af57838f912 (patch) | |
tree | 8946187b774d46ced9256c710cc20a26dd9704ee /drivers | |
parent | 5a2d9af2769c0b4c6ab6d88d31fa3b9a4a432b09 (diff) |
ps3: gelic: updown_lock semaphore to mutex
Signed-off-by: Daniel Walker <dwalker@mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ps3_gelic_net.c | 10 | ||||
-rw-r--r-- | drivers/net/ps3_gelic_net.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c index e365efb3c627..2eb54fd7bed5 100644 --- a/drivers/net/ps3_gelic_net.c +++ b/drivers/net/ps3_gelic_net.c | |||
@@ -110,7 +110,7 @@ static void gelic_card_get_ether_port_status(struct gelic_card *card, | |||
110 | void gelic_card_up(struct gelic_card *card) | 110 | void gelic_card_up(struct gelic_card *card) |
111 | { | 111 | { |
112 | pr_debug("%s: called\n", __func__); | 112 | pr_debug("%s: called\n", __func__); |
113 | down(&card->updown_lock); | 113 | mutex_lock(&card->updown_lock); |
114 | if (atomic_inc_return(&card->users) == 1) { | 114 | if (atomic_inc_return(&card->users) == 1) { |
115 | pr_debug("%s: real do\n", __func__); | 115 | pr_debug("%s: real do\n", __func__); |
116 | /* enable irq */ | 116 | /* enable irq */ |
@@ -120,7 +120,7 @@ void gelic_card_up(struct gelic_card *card) | |||
120 | 120 | ||
121 | napi_enable(&card->napi); | 121 | napi_enable(&card->napi); |
122 | } | 122 | } |
123 | up(&card->updown_lock); | 123 | mutex_unlock(&card->updown_lock); |
124 | pr_debug("%s: done\n", __func__); | 124 | pr_debug("%s: done\n", __func__); |
125 | } | 125 | } |
126 | 126 | ||
@@ -128,7 +128,7 @@ void gelic_card_down(struct gelic_card *card) | |||
128 | { | 128 | { |
129 | u64 mask; | 129 | u64 mask; |
130 | pr_debug("%s: called\n", __func__); | 130 | pr_debug("%s: called\n", __func__); |
131 | down(&card->updown_lock); | 131 | mutex_lock(&card->updown_lock); |
132 | if (atomic_dec_if_positive(&card->users) == 0) { | 132 | if (atomic_dec_if_positive(&card->users) == 0) { |
133 | pr_debug("%s: real do\n", __func__); | 133 | pr_debug("%s: real do\n", __func__); |
134 | napi_disable(&card->napi); | 134 | napi_disable(&card->napi); |
@@ -146,7 +146,7 @@ void gelic_card_down(struct gelic_card *card) | |||
146 | /* stop tx */ | 146 | /* stop tx */ |
147 | gelic_card_disable_txdmac(card); | 147 | gelic_card_disable_txdmac(card); |
148 | } | 148 | } |
149 | up(&card->updown_lock); | 149 | mutex_unlock(&card->updown_lock); |
150 | pr_debug("%s: done\n", __func__); | 150 | pr_debug("%s: done\n", __func__); |
151 | } | 151 | } |
152 | 152 | ||
@@ -1534,7 +1534,7 @@ static struct gelic_card *gelic_alloc_card_net(struct net_device **netdev) | |||
1534 | INIT_WORK(&card->tx_timeout_task, gelic_net_tx_timeout_task); | 1534 | INIT_WORK(&card->tx_timeout_task, gelic_net_tx_timeout_task); |
1535 | init_waitqueue_head(&card->waitq); | 1535 | init_waitqueue_head(&card->waitq); |
1536 | atomic_set(&card->tx_timeout_task_counter, 0); | 1536 | atomic_set(&card->tx_timeout_task_counter, 0); |
1537 | init_MUTEX(&card->updown_lock); | 1537 | mutex_init(&card->updown_lock); |
1538 | atomic_set(&card->users, 0); | 1538 | atomic_set(&card->users, 0); |
1539 | 1539 | ||
1540 | return card; | 1540 | return card; |
diff --git a/drivers/net/ps3_gelic_net.h b/drivers/net/ps3_gelic_net.h index 520f143c2c09..8b413868bbe2 100644 --- a/drivers/net/ps3_gelic_net.h +++ b/drivers/net/ps3_gelic_net.h | |||
@@ -298,7 +298,7 @@ struct gelic_card { | |||
298 | wait_queue_head_t waitq; | 298 | wait_queue_head_t waitq; |
299 | 299 | ||
300 | /* only first user should up the card */ | 300 | /* only first user should up the card */ |
301 | struct semaphore updown_lock; | 301 | struct mutex updown_lock; |
302 | atomic_t users; | 302 | atomic_t users; |
303 | 303 | ||
304 | u64 ether_port_status; | 304 | u64 ether_port_status; |