Переглянути джерело

uio: clean uioinfo when uninstall uio driver

The uioinfo should be cleaned up when uninstall, otherwise re-install
failure of uio_pdrv_genirq.ko will happen.

Signed-off-by: Jie Zhou <b30303@freescale.com>
Signed-off-by: Aisheng Dong <b29396@freescale.com>
Signed-off-by: Hans J. Koch <hjk@hansjkoch.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jie Zhou 14 роки тому
батько
коміт
47296b1962
1 змінених файлів з 4 додано та 0 видалено
  1. 4 0
      drivers/uio/uio_pdrv_genirq.c

+ 4 - 0
drivers/uio/uio_pdrv_genirq.c

@@ -189,6 +189,10 @@ static int uio_pdrv_genirq_remove(struct platform_device *pdev)
 
 	uio_unregister_device(priv->uioinfo);
 	pm_runtime_disable(&pdev->dev);
+
+	priv->uioinfo->handler = NULL;
+	priv->uioinfo->irqcontrol = NULL;
+
 	kfree(priv);
 	return 0;
 }