Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95664
b: refs/heads/master
c: 12d1e75
h: refs/heads/master
v: v3
  • Loading branch information
Matthias Kaehlcke authored and Linus Torvalds committed May 1, 2008
1 parent 9d218c6 commit bd69343
Show file tree
Hide file tree
Showing 2 changed files with 7 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: e772d782a6b0f14d491a95445f0ec6767d66fb29
refs/heads/master: 12d1e75d3d4d2748f5db308d9b5d5b873435c308
11 changes: 6 additions & 5 deletions trunk/drivers/pcmcia/au1000_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include <linux/notifier.h>
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>

#include <asm/io.h>
Expand Down Expand Up @@ -71,7 +72,7 @@ extern struct au1000_pcmcia_socket au1000_pcmcia_socket[];
u32 *pcmcia_base_vaddrs[2];
extern const unsigned long mips_io_port_base;

DECLARE_MUTEX(pcmcia_sockets_lock);
static DEFINE_MUTEX(pcmcia_sockets_lock);

static int (*au1x00_pcmcia_hw_init[])(struct device *dev) = {
au1x_board_init,
Expand Down Expand Up @@ -472,7 +473,7 @@ int au1x00_drv_pcmcia_remove(struct device *dev)
struct skt_dev_info *sinfo = dev_get_drvdata(dev);
int i;

down(&pcmcia_sockets_lock);
mutex_lock(&pcmcia_sockets_lock);
dev_set_drvdata(dev, NULL);

for (i = 0; i < sinfo->nskt; i++) {
Expand All @@ -488,7 +489,7 @@ int au1x00_drv_pcmcia_remove(struct device *dev)
}

kfree(sinfo);
up(&pcmcia_sockets_lock);
mutex_unlock(&pcmcia_sockets_lock);
return 0;
}

Expand All @@ -501,13 +502,13 @@ static int au1x00_drv_pcmcia_probe(struct device *dev)
{
int i, ret = -ENODEV;

down(&pcmcia_sockets_lock);
mutex_lock(&pcmcia_sockets_lock);
for (i=0; i < ARRAY_SIZE(au1x00_pcmcia_hw_init); i++) {
ret = au1x00_pcmcia_hw_init[i](dev);
if (ret == 0)
break;
}
up(&pcmcia_sockets_lock);
mutex_unlock(&pcmcia_sockets_lock);
return ret;
}

Expand Down

0 comments on commit bd69343

Please sign in to comment.