pinctrl: tangier: Join tng_pinctrl_probe() in its wrapper
PATCH 1/1 pinctrl: tangier: Join tng_pinctrl_probe() in its wrapper
There is no clear sign why we have tng_pinctrl_probe() in the first place when it has already been using managed calls. Join the function to its devm_tng_pinctrl_probe() wrapper.
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/pinctrl/intel/pinctrl-tangier.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-)
drivers/pinctrl/intel/pinctrl-tangier.c +6 -13
@@ -518,15 +518,19 @@ static const struct pinctrl_desc tng_pinctrl_desc = { .owner = THIS_MODULE, }; -static int tng_pinctrl_probe (struct platform_device *pdev, -const struct tng_pinctrl *data) +int devm_tng_pinctrl_probe (struct platform_device *pdev) {struct device *dev = &pdev->dev; +const struct tng_pinctrl *data;struct tng_family *families;struct tng_pinctrl *tp;void __iomem *regs;unsigned int i; + data =device_get_match_data (dev); +if (!data) +return -ENODATA ; + tp =devm_kmemdup (dev, data,sizeof (*data),GFP_KERNEL );if (!tp)return -ENOMEM ;
@@ -566,17 +570,6 @@ static int tng_pinctrl_probe(struct platform_device *pdev,return 0 ; } - -int devm_tng_pinctrl_probe (struct platform_device *pdev) -{ -const struct tng_pinctrl *data; - - data =device_get_match_data (&pdev->dev); -if (!data) -return -ENODATA ; - -return tng_pinctrl_probe (pdev, data); -}EXPORT_SYMBOL_NS_GPL (devm_tng_pinctrl_probe,"PINCTRL_TANGIER" );MODULE_AUTHOR ("Andy Shevchenko <[email protected]>" );
Signature · 1 line
2.50.1
Quoted 5 lines · Andy Shevchenko
There is no clear sign why we have
tng_pinctrl_probe()in the first place when it has already been using managed calls. Join the function to itsdevm_tng_pinctrl_probe()wrapper.Signed-off-by Andy Shevchenko <[email protected]>
Acked-by Mika Westerberg <[email protected]>
Quoted 8 lines · Mika Westerberg
Quoted 5 lines · Andy Shevchenko
There is no clear sign why we have
tng_pinctrl_probe()in the first place when it has already been using managed calls. Join the function to itsdevm_tng_pinctrl_probe()wrapper.Signed-off-by Andy Shevchenko <[email protected]>Acked-by Mika Westerberg <[email protected]>
Pushed to my review and testing queue, thanks!
Signature · 2 lines
With Best Regards, Andy Shevchenko