Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d4294d1 authored by Thierry Reding's avatar Thierry Reding Committed by Greg Kroah-Hartman
Browse files

pwm: Convert to devm_ioremap_resource()



Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.

Signed-off-by: default avatarThierry Reding <thierry.reding@avionic-design.de>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9e0c1fb2
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -274,9 +274,9 @@ static int imx_pwm_probe(struct platform_device *pdev)
		return -ENODEV;
	}

	imx->mmio_base = devm_request_and_ioremap(&pdev->dev, r);
	if (imx->mmio_base == NULL)
		return -EADDRNOTAVAIL;
	imx->mmio_base = devm_ioremap_resource(&pdev->dev, r);
	if (IS_ERR(imx->mmio_base))
		return PTR_ERR(imx->mmio_base);

	data = of_id->data;
	imx->config = data->config;
+3 −3
Original line number Diff line number Diff line
@@ -110,9 +110,9 @@ static int lpc32xx_pwm_probe(struct platform_device *pdev)
	if (!res)
		return -EINVAL;

	lpc32xx->base = devm_request_and_ioremap(&pdev->dev, res);
	if (!lpc32xx->base)
		return -EADDRNOTAVAIL;
	lpc32xx->base = devm_ioremap_resource(&pdev->dev, res);
	if (IS_ERR(lpc32xx->base))
		return PTR_ERR(lpc32xx->base);

	lpc32xx->clk = devm_clk_get(&pdev->dev, NULL);
	if (IS_ERR(lpc32xx->clk))
+3 −3
Original line number Diff line number Diff line
@@ -139,9 +139,9 @@ static int mxs_pwm_probe(struct platform_device *pdev)
		return -ENOMEM;

	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	mxs->base = devm_request_and_ioremap(&pdev->dev, res);
	if (!mxs->base)
		return -EADDRNOTAVAIL;
	mxs->base = devm_ioremap_resource(&pdev->dev, res);
	if (IS_ERR(mxs->base))
		return PTR_ERR(mxs->base);

	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
	if (IS_ERR(pinctrl))
+3 −3
Original line number Diff line number Diff line
@@ -123,9 +123,9 @@ static int pwm_probe(struct platform_device *pdev)
		return -ENODEV;
	}

	puv3->base = devm_request_and_ioremap(&pdev->dev, r);
	if (puv3->base == NULL)
		return -EADDRNOTAVAIL;
	puv3->base = devm_ioremap_resource(&pdev->dev, r);
	if (IS_ERR(puv3->base))
		return PTR_ERR(puv3->base);

	puv3->chip.dev = &pdev->dev;
	puv3->chip.ops = &puv3_pwm_ops;
+3 −3
Original line number Diff line number Diff line
@@ -165,9 +165,9 @@ static int pwm_probe(struct platform_device *pdev)
		return -ENODEV;
	}

	pwm->mmio_base = devm_request_and_ioremap(&pdev->dev, r);
	if (pwm->mmio_base == NULL)
		return -EADDRNOTAVAIL;
	pwm->mmio_base = devm_ioremap_resource(&pdev->dev, r);
	if (IS_ERR(pwm->mmio_base))
		return PTR_ERR(pwm->mmio_base);

	ret = pwmchip_add(&pwm->chip);
	if (ret < 0) {
Loading