[PATCH] pinctrl: Add SPEAr pinctrl drivers

Viresh Kumar viresh.kumar at st.com
Wed Apr 4 00:14:38 EDT 2012


On 4/4/2012 1:03 AM, Arnd Bergmann wrote:
> Maybe I wasn't clear enough. I did not mean that code should be duplicated
> here. Instead, you should keep the probe function and export it, with some
> modifications, and do the same for the other common functions. This works
> well for a lot of other drivers in a similar situation. It would result
> in a function like

No. You were very clear earlier too. :)

> static int __devinit spear320_pinctrl_probe(struct platform_device *pdev)
> {
> 	return spear3xx_pinctrl_init(pdev, &spear320_machdata);
> }
> 
> static struct of_device_id spear_pinctrl_of_match[] __devinitdata = {
>        { .compatible = "st,spear320-pinmux" },
>        {},
> };
> 
> static struct platform_driver spear_pinctrl_driver = {
>        .driver = {
>                .name = DRIVER_NAME,
>                .owner = THIS_MODULE,
>                .of_match_table = spear_pinctrl_of_match,
>        },
>        .probe = spear320_pinctrl_probe,
>        .remove = __devexit_p(spear_pinctrl_remove),
> };

I was worrying about duplicating above code. :)
Anyway, i have already fixed up my code as you suggested.

-- 
viresh



More information about the linux-arm-kernel mailing list