mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH V2 1/1] uio: clean uioinfo when uninstall uio driver
@ 2011-04-06  6:42 Aisheng Dong
  2011-04-06 21:12 ` Hans J. Koch
  0 siblings, 1 reply; 2+ messages in thread
From: Aisheng Dong @ 2011-04-06  6:42 UTC (permalink / raw)
  To: hjk, greg; +Cc: linux-kernel

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>

---
Changes for v2:
 Address the comments from Hans:
   - The uioinfo->irq_flags and uioinfo->priv do not have to be cleaned
---
 drivers/uio/uio_pdrv_genirq.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c
index 7174d51..0f424af 100644
--- a/drivers/uio/uio_pdrv_genirq.c
+++ b/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;
 }
-- 
1.7.0.4



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH V2 1/1] uio: clean uioinfo when uninstall uio driver
  2011-04-06  6:42 [PATCH V2 1/1] uio: clean uioinfo when uninstall uio driver Aisheng Dong
@ 2011-04-06 21:12 ` Hans J. Koch
  0 siblings, 0 replies; 2+ messages in thread
From: Hans J. Koch @ 2011-04-06 21:12 UTC (permalink / raw)
  To: Aisheng Dong; +Cc: hjk, greg, linux-kernel

On Wed, Apr 06, 2011 at 02:42:40PM +0800, Aisheng Dong wrote:
> 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.

Looks good.

Thanks for your help,
Hans

> 
> 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>

> 
> ---
> Changes for v2:
>  Address the comments from Hans:
>    - The uioinfo->irq_flags and uioinfo->priv do not have to be cleaned
> ---
>  drivers/uio/uio_pdrv_genirq.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c
> index 7174d51..0f424af 100644
> --- a/drivers/uio/uio_pdrv_genirq.c
> +++ b/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;
>  }
> -- 
> 1.7.0.4
> 
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-04-06 21:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-06  6:42 [PATCH V2 1/1] uio: clean uioinfo when uninstall uio driver Aisheng Dong
2011-04-06 21:12 ` Hans J. Koch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®