summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkbuild test robot <lkp@intel.com>2019-09-03 06:47:52 +0200
committerGuenter Roeck <linux@roeck-us.net>2019-09-03 21:47:17 +0200
commit09fe787051db0cf84cd9fcf041dbdd2ba416c6dc (patch)
treedb5126dfde3785eb61d3548f6ce0dbec5720623d
parenthwmon: (lm75) Add support for writing sampling period on PCT2075 (diff)
downloadlinux-09fe787051db0cf84cd9fcf041dbdd2ba416c6dc.tar.xz
linux-09fe787051db0cf84cd9fcf041dbdd2ba416c6dc.zip
hwmon: (as370-hwmon) fix devm_platform_ioremap_resource.cocci warnings
Use devm_platform_ioremap_resource helper which wraps platform_get_resource() and devm_ioremap_resource() together. Generated by: scripts/coccinelle/api/devm_platform_ioremap_resource.cocci Fixes: 658e687b4218 ("hwmon: Add Synaptics AS370 PVT sensor driver") CC: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Signed-off-by: kbuild test robot <lkp@intel.com> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr> Reviewed-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> Link: https://lore.kernel.org/r/alpine.DEB.2.21.1909030646180.3228@hadrien Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r--drivers/hwmon/as370-hwmon.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/hwmon/as370-hwmon.c b/drivers/hwmon/as370-hwmon.c
index 554f03b91bfe..464244ba8d58 100644
--- a/drivers/hwmon/as370-hwmon.c
+++ b/drivers/hwmon/as370-hwmon.c
@@ -103,7 +103,6 @@ static const struct hwmon_chip_info as370_chip_info = {
static int as370_hwmon_probe(struct platform_device *pdev)
{
- struct resource *res;
struct device *hwmon_dev;
struct as370_hwmon *hwmon;
struct device *dev = &pdev->dev;
@@ -112,8 +111,7 @@ static int as370_hwmon_probe(struct platform_device *pdev)
if (!hwmon)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- hwmon->base = devm_ioremap_resource(&pdev->dev, res);
+ hwmon->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(hwmon->base))
return PTR_ERR(hwmon->base);