Skip to content

Commit 65f15e4

Browse files
Minghao Chilag-linaro
authored andcommitted
mfd: fsl-imx25-tsadc: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Minghao Chi <[email protected]> Signed-off-by: ye xingchen <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 1ca8a01 commit 65f15e4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/mfd/fsl-imx25-tsadc.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,14 @@ static int mx25_tsadc_probe(struct platform_device *pdev)
137137
{
138138
struct device *dev = &pdev->dev;
139139
struct mx25_tsadc *tsadc;
140-
struct resource *res;
141140
int ret;
142141
void __iomem *iomem;
143142

144143
tsadc = devm_kzalloc(dev, sizeof(*tsadc), GFP_KERNEL);
145144
if (!tsadc)
146145
return -ENOMEM;
147146

148-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
149-
iomem = devm_ioremap_resource(dev, res);
147+
iomem = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
150148
if (IS_ERR(iomem))
151149
return PTR_ERR(iomem);
152150

0 commit comments

Comments
 (0)