[RFC v3] PCMCIA locking updates for 2.6.34

Komuro komurojun-mbn at nifty.com
Wed Jan 20 07:03:11 EST 2010


Hi,


The exported function should be locked like below?



size_t pcmcia_get_tuple(struct pcmcia_device *p_dev, cisdata_t code,
                        unsigned char **buf)
{
        struct pcmcia_loop_get get = {
                .len = 0,
                .buf = buf,
        };

+	  mutex_lock(&s->ops_mutex);
        *get.buf = NULL;
        pcmcia_loop_tuple(p_dev, code, pcmcia_do_get_tuple, &get);

+	  mutex_unlock(&s->ops_mutex);

        return get.len;
}
EXPORT_SYMBOL(pcmcia_get_tuple);




More information about the linux-pcmcia mailing list