From: hariprasad@osuosl.org, Kelam@osuosl.org, hariprasad.kelam@gmail.com
Cc: devel@driverdev.osuosl.org,
Hariprasad Kelam <hariprasad.kelam@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
ac100@lists.launchpad.net
Subject: [PATCH] staging: nvec: make use of devm_platform_ioremap_resource
Date: Sun, 8 Sep 2019 15:11:01 +0530 [thread overview]
Message-ID: <1567935662-8006-1-git-send-email-hariprasad.kelam@gmail.com> (raw)
From: Hariprasad Kelam <hariprasad.kelam@gmail.com>
fix below issue reported by coccicheck
drivers/staging//nvec/nvec.c:794:1-5: WARNING: Use
devm_platform_ioremap_resource for base
Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
drivers/staging/nvec/nvec.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c
index 1cbd7b7..360ec04 100644
--- a/drivers/staging/nvec/nvec.c
+++ b/drivers/staging/nvec/nvec.c
@@ -767,7 +767,6 @@ static int tegra_nvec_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct nvec_chip *nvec;
struct nvec_msg *msg;
- struct resource *res;
void __iomem *base;
char get_firmware_version[] = { NVEC_CNTL, GET_FIRMWARE_VERSION },
unmute_speakers[] = { NVEC_OEM0, 0x10, 0x59, 0x95 },
@@ -790,8 +789,7 @@ static int tegra_nvec_probe(struct platform_device *pdev)
return -ENODEV;
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- base = devm_ioremap_resource(dev, res);
+ base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
return PTR_ERR(base);
--
2.7.4
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
next reply other threads:[~2019-09-08 9:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-08 9:41 hariprasad, Kelam, hariprasad.kelam [this message]
2019-09-09 18:14 ` [PATCH] staging: nvec: make use of devm_platform_ioremap_resource Marc Dietrich
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=1567935662-8006-1-git-send-email-hariprasad.kelam@gmail.com \
--to=hariprasad@osuosl.org \
--cc=Kelam@osuosl.org \
--cc=ac100@lists.launchpad.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hariprasad.kelam@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@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;
as well as URLs for NNTP newsgroup(s).