Message ID | 20220917024634.1021861-2-yangyingliang@huawei.com |
---|---|
State | New |
Headers | show |
Series | [-next,v2,1/2] pinctrl: ocelot: add missing destroy_workqueue() in error path in ocelot_pinctrl_probe() | expand |
Sat, Sep 17, 2022 at 10:46:34AM +0800, Yang Yingliang kirjoitti: > Switch to use devm_platform_get_and_ioremap_resource() to simplify code. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> > Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> > --- > drivers/pinctrl/pinctrl-ocelot.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c > index c672bc2a4df5..d2c144611d4b 100644 > --- a/drivers/pinctrl/pinctrl-ocelot.c > +++ b/drivers/pinctrl/pinctrl-ocelot.c > @@ -2073,8 +2073,7 @@ static int ocelot_pinctrl_probe(struct platform_device *pdev) > "Failed to get reset\n"); > reset_control_reset(reset); > > - base = devm_ioremap_resource(dev, > - platform_get_resource(pdev, IORESOURCE_MEM, 0)); > + base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); > if (IS_ERR(base)) > return PTR_ERR(base); > > -- > 2.25.1 > >
diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c index c672bc2a4df5..d2c144611d4b 100644 --- a/drivers/pinctrl/pinctrl-ocelot.c +++ b/drivers/pinctrl/pinctrl-ocelot.c @@ -2073,8 +2073,7 @@ static int ocelot_pinctrl_probe(struct platform_device *pdev) "Failed to get reset\n"); reset_control_reset(reset); - base = devm_ioremap_resource(dev, - platform_get_resource(pdev, IORESOURCE_MEM, 0)); + base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(base)) return PTR_ERR(base);
Switch to use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- drivers/pinctrl/pinctrl-ocelot.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)