Commit 0d90b99b authored by Thomas Gleixner's avatar Thomas Gleixner

drivers/net: Convert 3c527 to anon_semaphore

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 1e56243f
......@@ -179,7 +179,7 @@ struct mc32_local
u16 rx_ring_tail; /* index to rx de-queue end */
struct semaphore cmd_mutex; /* Serialises issuing of execute commands */
struct anon_semaphore cmd_mutex; /* Serialises issuing of execute commands */
struct completion execution_cmd; /* Card has completed an execute command */
struct completion xceiver_cmd; /* Card has completed a tx or rx command */
};
......@@ -521,7 +521,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
lp->tx_len = lp->exec_box->data[9]; /* Transmit list count */
lp->rx_len = lp->exec_box->data[11]; /* Receive list count */
semaphore_init_locked(&lp->cmd_mutex);
anon_semaphore_init_locked(&lp->cmd_mutex);
init_completion(&lp->execution_cmd);
init_completion(&lp->xceiver_cmd);
......@@ -580,7 +580,7 @@ static int mc32_command_nowait(struct net_device *dev, u16 cmd, void *data, int
int ioaddr = dev->base_addr;
int ret = -1;
if (down_trylock(&lp->cmd_mutex) == 0)
if (anon_down_trylock(&lp->cmd_mutex) == 0)
{
lp->cmd_nonblocking=1;
lp->exec_box->mbox=0;
......@@ -626,7 +626,7 @@ static int mc32_command(struct net_device *dev, u16 cmd, void *data, int len)
int ioaddr = dev->base_addr;
int ret = 0;
down(&lp->cmd_mutex);
anon_down(&lp->cmd_mutex);
/*
* My Turn
......@@ -646,7 +646,7 @@ static int mc32_command(struct net_device *dev, u16 cmd, void *data, int len)
if(lp->exec_box->mbox&(1<<13))
ret = -1;
up(&lp->cmd_mutex);
anon_up(&lp->cmd_mutex);
/*
* A multicast set got blocked - try it now
......@@ -916,7 +916,7 @@ static int mc32_open(struct net_device *dev)
* Allow ourselves to issue commands
*/
up(&lp->cmd_mutex);
anon_up(&lp->cmd_mutex);
/*
......@@ -1384,7 +1384,7 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id)
*/
if (lp->cmd_nonblocking) {
up(&lp->cmd_mutex);
anon_up(&lp->cmd_mutex);
if (lp->mc_reload_wait)
mc32_reset_multicast_list(dev);
}
......@@ -1461,7 +1461,7 @@ static int mc32_close(struct net_device *dev)
/* Ensure we issue no more commands beyond this point */
down(&lp->cmd_mutex);
anon_down(&lp->cmd_mutex);
/* Ok the card is now stopping */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment