lkml.org 
[lkml]   [2011]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/1] uio: clean uioinfo when uninstall uio driver
Date
From: Jie Zhou <b30303@freescale.com>

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>
---
drivers/uio/uio_pdrv_genirq.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c
index 7174d51..e669a2c 100644
--- a/drivers/uio/uio_pdrv_genirq.c
+++ b/drivers/uio/uio_pdrv_genirq.c
@@ -189,6 +189,12 @@ static int uio_pdrv_genirq_remove(struct platform_device *pdev)

uio_unregister_device(priv->uioinfo);
pm_runtime_disable(&pdev->dev);
+
+ priv->uioinfo->irq_flags = 0;
+ priv->uioinfo->handler = NULL;
+ priv->uioinfo->irqcontrol = NULL;
+ priv->uioinfo->priv = NULL;
+
kfree(priv);
return 0;
}
--
1.7.0.4



\
 
 \ /
  Last update: 2011-04-02 10:55    [W:0.091 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site