mirror of https://gitee.com/openkylin/linux.git
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: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
5d4b45a1dd
commit
9d41cbe23d
|
@ -503,7 +503,6 @@ static int mx25_tcq_probe(struct platform_device *pdev)
|
|||
struct input_dev *idev;
|
||||
struct mx25_tcq_priv *priv;
|
||||
struct mx25_tsadc *tsadc = dev_get_drvdata(dev->parent);
|
||||
struct resource *res;
|
||||
void __iomem *mem;
|
||||
int error;
|
||||
|
||||
|
@ -512,8 +511,7 @@ static int mx25_tcq_probe(struct platform_device *pdev)
|
|||
return -ENOMEM;
|
||||
priv->dev = dev;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
mem = devm_ioremap_resource(dev, res);
|
||||
mem = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(mem))
|
||||
return PTR_ERR(mem);
|
||||
|
||||
|
|
Loading…
Reference in New Issue