Commit 9d41cbe2 authored by Mukesh Ojha's avatar Mukesh Ojha Committed by Dmitry Torokhov

Input: fsl-imx25-tcq - use devm_platform_ioremap_resource()

devm_platform_ioremap_resource() internally have platform_get_resource()
and devm_ioremap_resource() in it. So instead of calling them separately
use devm_platform_ioremap_resource() directly.
Signed-off-by: default avatarMukesh Ojha <mojha@codeaurora.org>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 5d4b45a1
...@@ -503,7 +503,6 @@ static int mx25_tcq_probe(struct platform_device *pdev) ...@@ -503,7 +503,6 @@ static int mx25_tcq_probe(struct platform_device *pdev)
struct input_dev *idev; struct input_dev *idev;
struct mx25_tcq_priv *priv; struct mx25_tcq_priv *priv;
struct mx25_tsadc *tsadc = dev_get_drvdata(dev->parent); struct mx25_tsadc *tsadc = dev_get_drvdata(dev->parent);
struct resource *res;
void __iomem *mem; void __iomem *mem;
int error; int error;
...@@ -512,8 +511,7 @@ static int mx25_tcq_probe(struct platform_device *pdev) ...@@ -512,8 +511,7 @@ static int mx25_tcq_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
priv->dev = dev; priv->dev = dev;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); mem = devm_platform_ioremap_resource(pdev, 0);
mem = devm_ioremap_resource(dev, res);
if (IS_ERR(mem)) if (IS_ERR(mem))
return PTR_ERR(mem); return PTR_ERR(mem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment