提交 632fefaf 编写于 作者: A Aaro Koskinen 提交者: Greg Kroah-Hartman

uio: fix devm_request_irq usage

Commit e6789cd3 (uio: Simplify uio error
path by using devres functions) converted uio to use devm_request_irq().
This introduced a change in behaviour since the IRQ is associated with
the parent device instead of the created UIO device. The IRQ will remain
active after uio_unregister_device() is called, and some drivers will
crash because of this. The patch fixes this.
Signed-off-by: NAaro Koskinen <aaro.koskinen@nsn.com>
Cc: stable <stable@vger.kernel.org> # 3.13
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 65861ab4
...@@ -847,7 +847,7 @@ int __uio_register_device(struct module *owner, ...@@ -847,7 +847,7 @@ int __uio_register_device(struct module *owner,
info->uio_dev = idev; info->uio_dev = idev;
if (info->irq && (info->irq != UIO_IRQ_CUSTOM)) { if (info->irq && (info->irq != UIO_IRQ_CUSTOM)) {
ret = devm_request_irq(parent, info->irq, uio_interrupt, ret = devm_request_irq(idev->dev, info->irq, uio_interrupt,
info->irq_flags, info->name, idev); info->irq_flags, info->name, idev);
if (ret) if (ret)
goto err_request_irq; goto err_request_irq;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册