Re: 2.6.15-mm3
From: Dominik Brodowski
Date: Wed Jan 11 2006 - 14:54:33 EST
Hi,
On Wed, Jan 11, 2006 at 02:07:13PM -0500, Brice Goglin wrote:
> >git-pcmcia . I'll look at what's broken. Thanks for reporting this.
> >
> >
> Confirmed, works after reverting it.
Could you check whether this patch helps, please?
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c
index c4f7dfb..5f815bf 100644
--- a/drivers/pcmcia/pcmcia_ioctl.c
+++ b/drivers/pcmcia/pcmcia_ioctl.c
@@ -69,25 +69,26 @@ extern int ds_pc_debug;
#define ds_dbg(lvl, fmt, arg...) do { } while (0)
#endif
-static struct pcmcia_device * get_pcmcia_device (struct pcmcia_socket *s,
- unsigned int function)
+static struct pcmcia_device *get_pcmcia_device(struct pcmcia_socket *s,
+ unsigned int function)
{
struct pcmcia_device *p_dev = NULL;
-
unsigned long flags;
+
spin_lock_irqsave(&pcmcia_dev_list_lock, flags);
- list_for_each_entry(p_dev, &s->devices_list, socket_device_list) {
+ list_for_each_entry(p_dev, &s->devices_list, socket_device_list) {
if (p_dev->func == function) {
p_dev = pcmcia_get_dev(p_dev);
break;
}
}
+ spin_unlock_irqrestore(&pcmcia_dev_list_lock, flags);
return p_dev;
}
/* backwards-compatible accessing of driver --- by name! */
-static struct pcmcia_driver * get_pcmcia_driver (dev_info_t *dev_info)
+static struct pcmcia_driver *get_pcmcia_driver(dev_info_t *dev_info)
{
struct device_driver *drv;
struct pcmcia_driver *p_drv;
@@ -625,15 +626,15 @@ static int ds_ioctl(struct inode * inode
ret = pccard_reset_card(s);
break;
case DS_GET_STATUS:
- if (buf->status.Function &&
- (buf->status.Function >= s->functions))
- ret = CS_BAD_ARGS;
- else {
- struct pcmcia_device *p_dev = get_pcmcia_device(s, buf->status.Function);
- ret = pccard_get_status(s, p_dev, &buf->status);
- pcmcia_put_dev(p_dev);
- }
- break;
+ if (buf->status.Function &&
+ (buf->status.Function >= s->functions))
+ ret = CS_BAD_ARGS;
+ else {
+ struct pcmcia_device *p_dev = get_pcmcia_device(s, buf->status.Function);
+ ret = pccard_get_status(s, p_dev, &buf->status);
+ pcmcia_put_dev(p_dev);
+ }
+ break;
case DS_VALIDATE_CIS:
mutex_lock(&s->skt_mutex);
pcmcia_validate_mem(s);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/