]> git.karo-electronics.de Git - linux-beck.git/commitdiff
uio: clean uioinfo when uninstall uio driver
authorJie Zhou <b30303@freescale.com>
Wed, 6 Apr 2011 06:42:40 +0000 (14:42 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 19 Apr 2011 23:59:57 +0000 (16:59 -0700)
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>
drivers/uio/uio_pdrv_genirq.c

index 7174d518b8a659d752033f819a333d6f717b9dda..0f424af7f10934f530f608aa24f4f63ba0438142 100644 (file)
@@ -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;
 }