From: Jingoo Han <jg1.han@samsung.com>
To: "'Vinod Koul'" <vinod.koul@intel.com>
Cc: "'Dan Williams'" <djbw@fb.com>,
linux-kernel@vger.kernel.org,
"'Simon Horman'" <horms+renesas@verge.net.au>,
"'Guennadi Liakhovetski'" <g.liakhovetski@gmx.de>,
"'Jingoo Han'" <jg1.han@samsung.com>
Subject: [PATCH] dma: sh: remove unnecessary platform_set_drvdata()
Date: Wed, 21 Aug 2013 18:45:35 +0900 [thread overview]
Message-ID: <002801ce9e53$2f63b1e0$8e2b15a0$%han@samsung.com> (raw)
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/dma/sh/shdma.c | 3 ---
drivers/dma/sh/sudmac.c | 2 --
2 files changed, 5 deletions(-)
diff --git a/drivers/dma/sh/shdma.c b/drivers/dma/sh/shdma.c
index 211e2f1..208de0f 100644
--- a/drivers/dma/sh/shdma.c
+++ b/drivers/dma/sh/shdma.c
@@ -873,7 +873,6 @@ rst_err:
pm_runtime_put(&pdev->dev);
pm_runtime_disable(&pdev->dev);
- platform_set_drvdata(pdev, NULL);
shdma_cleanup(&shdev->shdma_dev);
eshdma:
if (dmars)
@@ -917,8 +916,6 @@ static int sh_dmae_remove(struct platform_device *pdev)
iounmap(shdev->dmars);
iounmap(shdev->chan_reg);
- platform_set_drvdata(pdev, NULL);
-
synchronize_rcu();
kfree(shdev);
diff --git a/drivers/dma/sh/sudmac.c b/drivers/dma/sh/sudmac.c
index c494417..23fffc8 100644
--- a/drivers/dma/sh/sudmac.c
+++ b/drivers/dma/sh/sudmac.c
@@ -393,7 +393,6 @@ static int sudmac_probe(struct platform_device *pdev)
chan_probe_err:
sudmac_chan_remove(su_dev);
- platform_set_drvdata(pdev, NULL);
shdma_cleanup(&su_dev->shdma_dev);
return err;
@@ -407,7 +406,6 @@ static int sudmac_remove(struct platform_device *pdev)
dma_async_device_unregister(dma_dev);
sudmac_chan_remove(su_dev);
shdma_cleanup(&su_dev->shdma_dev);
- platform_set_drvdata(pdev, NULL);
return 0;
}
--
1.7.10.4
next reply other threads:[~2013-08-21 9:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-21 9:45 Jingoo Han [this message]
2013-08-22 0:31 ` Simon Horman
2013-08-26 12:38 ` Guennadi Liakhovetski
2013-08-26 13:50 ` Vinod Koul
2013-08-21 9:51 Jingoo Han
2013-08-25 8:36 ` Vinod Koul
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='002801ce9e53$2f63b1e0$8e2b15a0$%han@samsung.com' \
--to=jg1.han@samsung.com \
--cc=djbw@fb.com \
--cc=g.liakhovetski@gmx.de \
--cc=horms+renesas@verge.net.au \
--cc=linux-kernel@vger.kernel.org \
--cc=vinod.koul@intel.com \
/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®