From: Aisheng Dong <b29396@freescale.com>
To: <hjk@hansjkoch.de>, <greg@kroah.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCH V2 1/1] uio: clean uioinfo when uninstall uio driver
Date: Wed, 6 Apr 2011 14:42:40 +0800 [thread overview]
Message-ID: <1302072160-6483-1-git-send-email-b29396@freescale.com> (raw)
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
next reply other threads:[~2011-04-06 6:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-06 6:42 Aisheng Dong [this message]
2011-04-06 21:12 ` Hans J. Koch
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=1302072160-6483-1-git-send-email-b29396@freescale.com \
--to=b29396@freescale.com \
--cc=greg@kroah.com \
--cc=hjk@hansjkoch.de \
--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®