From 00ce99ff506a17882747a7d6874e3f5206a99043 Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Sat, 16 Jan 2010 09:14:11 +0100 Subject: pcmcia: simplify locking replace pcmcia_socket->lock and pcmcia_dev_list_lock by using the per-socket "ops_mutex", as we do neither need different locks nor a spinlock here. Tested-by: Wolfram Sang Signed-off-by: Dominik Brodowski --- drivers/pcmcia/socket_sysfs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/pcmcia/socket_sysfs.c') diff --git a/drivers/pcmcia/socket_sysfs.c b/drivers/pcmcia/socket_sysfs.c index 1cba9d38d813..e8826df00a36 100644 --- a/drivers/pcmcia/socket_sysfs.c +++ b/drivers/pcmcia/socket_sysfs.c @@ -189,16 +189,15 @@ static ssize_t pccard_store_resource(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { - unsigned long flags; struct pcmcia_socket *s = to_socket(dev); if (!count) return -EINVAL; - spin_lock_irqsave(&s->lock, flags); + mutex_lock(&s->ops_mutex); if (!s->resource_setup_done) s->resource_setup_done = 1; - spin_unlock_irqrestore(&s->lock, flags); + mutex_unlock(&s->ops_mutex); mutex_lock(&s->skt_mutex); if ((s->callback) && -- cgit v1.2.3