mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Hans J. Koch" <hjk@hansjkoch.de>
To: Aisheng Dong <b29396@freescale.com>
Cc: hjk@hansjkoch.de, greg@kroah.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2 1/1] uio: clean uioinfo when uninstall uio driver
Date: Wed, 6 Apr 2011 23:12:15 +0200	[thread overview]
Message-ID: <20110406211214.GA2795@local> (raw)
In-Reply-To: <1302072160-6483-1-git-send-email-b29396@freescale.com>

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

      reply	other threads:[~2011-04-06 21:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-06  6:42 Aisheng Dong
2011-04-06 21:12 ` Hans J. Koch [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110406211214.GA2795@local \
    --to=hjk@hansjkoch.de \
    --cc=b29396@freescale.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®