提交 593f010b 编写于 作者: D Dominik Brodowski

pcmcia: do not lock socket driver module in pcmcia_get_socket()

Do not lock the socket driver module in pcmcia_get_socket(), as
the PCMCIA core can handle a socket module removal: In
pcmcia_unregister_socket(), we explicitely wait for the last
put_device() to succeed.
Tested-by: NWolfram Sang <w.sang@pengutronix.de>
Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
上级 3f32b3c0
......@@ -140,19 +140,13 @@ struct pcmcia_socket *pcmcia_get_socket(struct pcmcia_socket *skt)
struct device *dev = get_device(&skt->dev);
if (!dev)
return NULL;
skt = dev_get_drvdata(dev);
if (!try_module_get(skt->owner)) {
put_device(&skt->dev);
return NULL;
}
return skt;
return dev_get_drvdata(dev);
}
EXPORT_SYMBOL(pcmcia_get_socket);
void pcmcia_put_socket(struct pcmcia_socket *skt)
{
module_put(skt->owner);
put_device(&skt->dev);
}
EXPORT_SYMBOL(pcmcia_put_socket);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册