diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 05:09:16 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-22 14:41:57 -0500 |
commit | 6d4294d1634543853febc4287ecf02998fd234e1 (patch) | |
tree | 1614d14d3879557860ae9d78169e555f67c70170 /drivers/pwm | |
parent | 9e0c1fb29a7c257a31c321c2437617b6b4d66168 (diff) |
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: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pwm')
-rw-r--r-- | drivers/pwm/pwm-imx.c | 6 | ||||
-rw-r--r-- | drivers/pwm/pwm-lpc32xx.c | 6 | ||||
-rw-r--r-- | drivers/pwm/pwm-mxs.c | 6 | ||||
-rw-r--r-- | drivers/pwm/pwm-puv3.c | 6 | ||||
-rw-r--r-- | drivers/pwm/pwm-pxa.c | 6 | ||||
-rw-r--r-- | drivers/pwm/pwm-spear.c | 6 | ||||
-rw-r--r-- | drivers/pwm/pwm-tegra.c | 6 | ||||
-rw-r--r-- | drivers/pwm/pwm-tiecap.c | 6 | ||||
-rw-r--r-- | drivers/pwm/pwm-tiehrpwm.c | 6 | ||||
-rw-r--r-- | drivers/pwm/pwm-tipwmss.c | 6 | ||||
-rw-r--r-- | drivers/pwm/pwm-vt8500.c | 6 |
11 files changed, 33 insertions, 33 deletions
diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c index 65a86bdeabed..3f5677b7690e 100644 --- a/drivers/pwm/pwm-imx.c +++ b/drivers/pwm/pwm-imx.c | |||
@@ -274,9 +274,9 @@ static int imx_pwm_probe(struct platform_device *pdev) | |||
274 | return -ENODEV; | 274 | return -ENODEV; |
275 | } | 275 | } |
276 | 276 | ||
277 | imx->mmio_base = devm_request_and_ioremap(&pdev->dev, r); | 277 | imx->mmio_base = devm_ioremap_resource(&pdev->dev, r); |
278 | if (imx->mmio_base == NULL) | 278 | if (IS_ERR(imx->mmio_base)) |
279 | return -EADDRNOTAVAIL; | 279 | return PTR_ERR(imx->mmio_base); |
280 | 280 | ||
281 | data = of_id->data; | 281 | data = of_id->data; |
282 | imx->config = data->config; | 282 | imx->config = data->config; |
diff --git a/drivers/pwm/pwm-lpc32xx.c b/drivers/pwm/pwm-lpc32xx.c index 14106440294f..b3f0d0dfd748 100644 --- a/drivers/pwm/pwm-lpc32xx.c +++ b/drivers/pwm/pwm-lpc32xx.c | |||
@@ -110,9 +110,9 @@ static int lpc32xx_pwm_probe(struct platform_device *pdev) | |||
110 | if (!res) | 110 | if (!res) |
111 | return -EINVAL; | 111 | return -EINVAL; |
112 | 112 | ||
113 | lpc32xx->base = devm_request_and_ioremap(&pdev->dev, res); | 113 | lpc32xx->base = devm_ioremap_resource(&pdev->dev, res); |
114 | if (!lpc32xx->base) | 114 | if (IS_ERR(lpc32xx->base)) |
115 | return -EADDRNOTAVAIL; | 115 | return PTR_ERR(lpc32xx->base); |
116 | 116 | ||
117 | lpc32xx->clk = devm_clk_get(&pdev->dev, NULL); | 117 | lpc32xx->clk = devm_clk_get(&pdev->dev, NULL); |
118 | if (IS_ERR(lpc32xx->clk)) | 118 | if (IS_ERR(lpc32xx->clk)) |
diff --git a/drivers/pwm/pwm-mxs.c b/drivers/pwm/pwm-mxs.c index 7ec345f01831..a53d3094b75a 100644 --- a/drivers/pwm/pwm-mxs.c +++ b/drivers/pwm/pwm-mxs.c | |||
@@ -139,9 +139,9 @@ static int mxs_pwm_probe(struct platform_device *pdev) | |||
139 | return -ENOMEM; | 139 | return -ENOMEM; |
140 | 140 | ||
141 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 141 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
142 | mxs->base = devm_request_and_ioremap(&pdev->dev, res); | 142 | mxs->base = devm_ioremap_resource(&pdev->dev, res); |
143 | if (!mxs->base) | 143 | if (IS_ERR(mxs->base)) |
144 | return -EADDRNOTAVAIL; | 144 | return PTR_ERR(mxs->base); |
145 | 145 | ||
146 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); | 146 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); |
147 | if (IS_ERR(pinctrl)) | 147 | if (IS_ERR(pinctrl)) |
diff --git a/drivers/pwm/pwm-puv3.c b/drivers/pwm/pwm-puv3.c index b882f6032fee..db964e6ecf5c 100644 --- a/drivers/pwm/pwm-puv3.c +++ b/drivers/pwm/pwm-puv3.c | |||
@@ -123,9 +123,9 @@ static int pwm_probe(struct platform_device *pdev) | |||
123 | return -ENODEV; | 123 | return -ENODEV; |
124 | } | 124 | } |
125 | 125 | ||
126 | puv3->base = devm_request_and_ioremap(&pdev->dev, r); | 126 | puv3->base = devm_ioremap_resource(&pdev->dev, r); |
127 | if (puv3->base == NULL) | 127 | if (IS_ERR(puv3->base)) |
128 | return -EADDRNOTAVAIL; | 128 | return PTR_ERR(puv3->base); |
129 | 129 | ||
130 | puv3->chip.dev = &pdev->dev; | 130 | puv3->chip.dev = &pdev->dev; |
131 | puv3->chip.ops = &puv3_pwm_ops; | 131 | puv3->chip.ops = &puv3_pwm_ops; |
diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c index f32fc4e66e0c..20370e61de5a 100644 --- a/drivers/pwm/pwm-pxa.c +++ b/drivers/pwm/pwm-pxa.c | |||
@@ -165,9 +165,9 @@ static int pwm_probe(struct platform_device *pdev) | |||
165 | return -ENODEV; | 165 | return -ENODEV; |
166 | } | 166 | } |
167 | 167 | ||
168 | pwm->mmio_base = devm_request_and_ioremap(&pdev->dev, r); | 168 | pwm->mmio_base = devm_ioremap_resource(&pdev->dev, r); |
169 | if (pwm->mmio_base == NULL) | 169 | if (IS_ERR(pwm->mmio_base)) |
170 | return -EADDRNOTAVAIL; | 170 | return PTR_ERR(pwm->mmio_base); |
171 | 171 | ||
172 | ret = pwmchip_add(&pwm->chip); | 172 | ret = pwmchip_add(&pwm->chip); |
173 | if (ret < 0) { | 173 | if (ret < 0) { |
diff --git a/drivers/pwm/pwm-spear.c b/drivers/pwm/pwm-spear.c index 83b21d9d5cf9..69a2d9eb34db 100644 --- a/drivers/pwm/pwm-spear.c +++ b/drivers/pwm/pwm-spear.c | |||
@@ -192,9 +192,9 @@ static int spear_pwm_probe(struct platform_device *pdev) | |||
192 | return -ENOMEM; | 192 | return -ENOMEM; |
193 | } | 193 | } |
194 | 194 | ||
195 | pc->mmio_base = devm_request_and_ioremap(&pdev->dev, r); | 195 | pc->mmio_base = devm_ioremap_resource(&pdev->dev, r); |
196 | if (!pc->mmio_base) | 196 | if (IS_ERR(pc->mmio_base)) |
197 | return -EADDRNOTAVAIL; | 197 | return PTR_ERR(pc->mmio_base); |
198 | 198 | ||
199 | pc->clk = devm_clk_get(&pdev->dev, NULL); | 199 | pc->clk = devm_clk_get(&pdev->dev, NULL); |
200 | if (IS_ERR(pc->clk)) | 200 | if (IS_ERR(pc->clk)) |
diff --git a/drivers/pwm/pwm-tegra.c b/drivers/pwm/pwm-tegra.c index 30c0e2b70ce8..71900e8cd3d1 100644 --- a/drivers/pwm/pwm-tegra.c +++ b/drivers/pwm/pwm-tegra.c | |||
@@ -186,9 +186,9 @@ static int tegra_pwm_probe(struct platform_device *pdev) | |||
186 | return -ENODEV; | 186 | return -ENODEV; |
187 | } | 187 | } |
188 | 188 | ||
189 | pwm->mmio_base = devm_request_and_ioremap(&pdev->dev, r); | 189 | pwm->mmio_base = devm_ioremap_resource(&pdev->dev, r); |
190 | if (!pwm->mmio_base) | 190 | if (IS_ERR(pwm->mmio_base)) |
191 | return -EADDRNOTAVAIL; | 191 | return PTR_ERR(pwm->mmio_base); |
192 | 192 | ||
193 | platform_set_drvdata(pdev, pwm); | 193 | platform_set_drvdata(pdev, pwm); |
194 | 194 | ||
diff --git a/drivers/pwm/pwm-tiecap.c b/drivers/pwm/pwm-tiecap.c index 5cf016dd9822..27a67d6b27c1 100644 --- a/drivers/pwm/pwm-tiecap.c +++ b/drivers/pwm/pwm-tiecap.c | |||
@@ -238,9 +238,9 @@ static int ecap_pwm_probe(struct platform_device *pdev) | |||
238 | return -ENODEV; | 238 | return -ENODEV; |
239 | } | 239 | } |
240 | 240 | ||
241 | pc->mmio_base = devm_request_and_ioremap(&pdev->dev, r); | 241 | pc->mmio_base = devm_ioremap_resource(&pdev->dev, r); |
242 | if (!pc->mmio_base) | 242 | if (IS_ERR(pc->mmio_base)) |
243 | return -EADDRNOTAVAIL; | 243 | return PTR_ERR(pc->mmio_base); |
244 | 244 | ||
245 | ret = pwmchip_add(&pc->chip); | 245 | ret = pwmchip_add(&pc->chip); |
246 | if (ret < 0) { | 246 | if (ret < 0) { |
diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c index 72a6dd40c9ec..5a1399580533 100644 --- a/drivers/pwm/pwm-tiehrpwm.c +++ b/drivers/pwm/pwm-tiehrpwm.c | |||
@@ -453,9 +453,9 @@ static int ehrpwm_pwm_probe(struct platform_device *pdev) | |||
453 | return -ENODEV; | 453 | return -ENODEV; |
454 | } | 454 | } |
455 | 455 | ||
456 | pc->mmio_base = devm_request_and_ioremap(&pdev->dev, r); | 456 | pc->mmio_base = devm_ioremap_resource(&pdev->dev, r); |
457 | if (!pc->mmio_base) | 457 | if (IS_ERR(pc->mmio_base)) |
458 | return -EADDRNOTAVAIL; | 458 | return PTR_ERR(pc->mmio_base); |
459 | 459 | ||
460 | /* Acquire tbclk for Time Base EHRPWM submodule */ | 460 | /* Acquire tbclk for Time Base EHRPWM submodule */ |
461 | pc->tbclk = devm_clk_get(&pdev->dev, "tbclk"); | 461 | pc->tbclk = devm_clk_get(&pdev->dev, "tbclk"); |
diff --git a/drivers/pwm/pwm-tipwmss.c b/drivers/pwm/pwm-tipwmss.c index 3448a1c88590..17cbc59660ec 100644 --- a/drivers/pwm/pwm-tipwmss.c +++ b/drivers/pwm/pwm-tipwmss.c | |||
@@ -75,9 +75,9 @@ static int pwmss_probe(struct platform_device *pdev) | |||
75 | return -ENODEV; | 75 | return -ENODEV; |
76 | } | 76 | } |
77 | 77 | ||
78 | info->mmio_base = devm_request_and_ioremap(&pdev->dev, r); | 78 | info->mmio_base = devm_ioremap_resource(&pdev->dev, r); |
79 | if (!info->mmio_base) | 79 | if (IS_ERR(info->mmio_base)) |
80 | return -EADDRNOTAVAIL; | 80 | return PTR_ERR(info->mmio_base); |
81 | 81 | ||
82 | pm_runtime_enable(&pdev->dev); | 82 | pm_runtime_enable(&pdev->dev); |
83 | pm_runtime_get_sync(&pdev->dev); | 83 | pm_runtime_get_sync(&pdev->dev); |
diff --git a/drivers/pwm/pwm-vt8500.c b/drivers/pwm/pwm-vt8500.c index b0ba2d403439..f9de9b28e46e 100644 --- a/drivers/pwm/pwm-vt8500.c +++ b/drivers/pwm/pwm-vt8500.c | |||
@@ -178,9 +178,9 @@ static int vt8500_pwm_probe(struct platform_device *pdev) | |||
178 | return -ENODEV; | 178 | return -ENODEV; |
179 | } | 179 | } |
180 | 180 | ||
181 | chip->base = devm_request_and_ioremap(&pdev->dev, r); | 181 | chip->base = devm_ioremap_resource(&pdev->dev, r); |
182 | if (!chip->base) | 182 | if (IS_ERR(chip->base)) |
183 | return -EADDRNOTAVAIL; | 183 | return PTR_ERR(chip->base); |
184 | 184 | ||
185 | ret = clk_prepare(chip->clk); | 185 | ret = clk_prepare(chip->clk); |
186 | if (ret < 0) { | 186 | if (ret < 0) { |