aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/vrc4171_card.c
diff options
context:
space:
mode:
authorYoichi Yuasa <yuasa@linux-mips.org>2010-03-10 01:57:56 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2010-03-15 09:50:12 -0400
commit7a410e8d4d97457c8c381e2de9cdc7bd3306badc (patch)
treeeaf71bdf1e8ca804301d409e6cfd70c0e27a8d68 /drivers/pcmcia/vrc4171_card.c
parenta3d3203e4bb40f253b1541e310dc0f9305be7c84 (diff)
pcmcia/vrc4171: use local spinlock for device local lock.
struct pcmcia_socket lock had been used before. Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/vrc4171_card.c')
-rw-r--r--drivers/pcmcia/vrc4171_card.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pcmcia/vrc4171_card.c b/drivers/pcmcia/vrc4171_card.c
index c9fcbdc164e..aaccdb9f4ba 100644
--- a/drivers/pcmcia/vrc4171_card.c
+++ b/drivers/pcmcia/vrc4171_card.c
@@ -105,6 +105,7 @@ typedef struct vrc4171_socket {
105 char name[24]; 105 char name[24];
106 int csc_irq; 106 int csc_irq;
107 int io_irq; 107 int io_irq;
108 spinlock_t lock;
108} vrc4171_socket_t; 109} vrc4171_socket_t;
109 110
110static vrc4171_socket_t vrc4171_sockets[CARD_MAX_SLOTS]; 111static vrc4171_socket_t vrc4171_sockets[CARD_MAX_SLOTS];
@@ -327,7 +328,7 @@ static int pccard_set_socket(struct pcmcia_socket *sock, socket_state_t *state)
327 slot = sock->sock; 328 slot = sock->sock;
328 socket = &vrc4171_sockets[slot]; 329 socket = &vrc4171_sockets[slot];
329 330
330 spin_lock_irq(&sock->lock); 331 spin_lock_irq(&socket->lock);
331 332
332 voltage = set_Vcc_value(state->Vcc); 333 voltage = set_Vcc_value(state->Vcc);
333 exca_write_byte(slot, CARD_VOLTAGE_SELECT, voltage); 334 exca_write_byte(slot, CARD_VOLTAGE_SELECT, voltage);
@@ -370,7 +371,7 @@ static int pccard_set_socket(struct pcmcia_socket *sock, socket_state_t *state)
370 cscint |= I365_CSC_DETECT; 371 cscint |= I365_CSC_DETECT;
371 exca_write_byte(slot, I365_CSCINT, cscint); 372 exca_write_byte(slot, I365_CSCINT, cscint);
372 373
373 spin_unlock_irq(&sock->lock); 374 spin_unlock_irq(&socket->lock);
374 375
375 return 0; 376 return 0;
376} 377}