[PATCH] soundwire: qcom: fix devm_platform_ioremap_resource.cocci warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: kbuild test robot <lkp@xxxxxxxxx>

 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: 4a789cff1848 ("soundwire: qcom: add support for SoundWire controller")
CC: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx>
Signed-off-by: kbuild test robot <lkp@xxxxxxxxx>
Signed-off-by: Julia Lawall <julia.lawall@xxxxxxx>
---

url:    https://github.com/0day-ci/linux/commits/Srinivas-Kandagatla/soundwire-Add-support-to-Qualcomm-SoundWire-master/20191014-063507
:::::: branch date: 9 hours ago
:::::: commit date: 9 hours ago

 qcom.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -784,7 +784,6 @@ static int qcom_swrm_probe(struct platfo
 	struct sdw_master_prop *prop;
 	struct sdw_bus_params *params;
 	struct qcom_swrm_ctrl *ctrl;
-	struct resource *res;
 	int ret;
 	u32 val;

@@ -801,8 +800,7 @@ static int qcom_swrm_probe(struct platfo
 	} else {
 		ctrl->reg_read = qcom_swrm_mmio_reg_read;
 		ctrl->reg_write = qcom_swrm_mmio_reg_write;
-		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-		ctrl->base = devm_ioremap_resource(dev, res);
+		ctrl->base = devm_platform_ioremap_resource(pdev, 0);
 		if (IS_ERR(ctrl->base))
 			return PTR_ERR(ctrl->base);
 	}



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux