media: rc: ir-hix5hd2: Make use of the helper function devm_platform_ioremap_resource()
Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
b619c2ea32
commit
890418523f
|
@ -249,7 +249,6 @@ static int hix5hd2_ir_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct rc_dev *rdev;
|
struct rc_dev *rdev;
|
||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
struct resource *res;
|
|
||||||
struct hix5hd2_ir_priv *priv;
|
struct hix5hd2_ir_priv *priv;
|
||||||
struct device_node *node = pdev->dev.of_node;
|
struct device_node *node = pdev->dev.of_node;
|
||||||
const struct of_device_id *of_id;
|
const struct of_device_id *of_id;
|
||||||
|
@ -274,8 +273,7 @@ static int hix5hd2_ir_probe(struct platform_device *pdev)
|
||||||
priv->regmap = NULL;
|
priv->regmap = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
priv->base = devm_platform_ioremap_resource(pdev, 0);
|
||||||
priv->base = devm_ioremap_resource(dev, res);
|
|
||||||
if (IS_ERR(priv->base))
|
if (IS_ERR(priv->base))
|
||||||
return PTR_ERR(priv->base);
|
return PTR_ERR(priv->base);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue