[PATCH V3 2/4] pinctrl: Add SPEAr pinctrl drivers

Stephen Warren swarren at wwwdotorg.org
Fri Apr 13 12:08:39 EDT 2012


On 04/11/2012 11:24 PM, Viresh Kumar wrote:
> This adds pinctrl driver for SPEAr platform. It also updates MAINTAINERS file
> for SPEAr pinctrl drivers.

> +int __devinit spear_pinctrl_probe(struct platform_device *pdev,
> +		struct spear_pinctrl_machdata *machdata)
...
> +	pmx->vbase = of_iomap(np, 0);
...
> +}
> +
> +int __devexit spear_pinctrl_remove(struct platform_device *pdev)
> +{
> +	struct spear_pmx *pmx = platform_get_drvdata(pdev);
> +
> +	pinctrl_unregister(pmx->pctl);
> +
> +	return 0;
> +}

of_iomap isn't a devm function, so youo need to unmap in remove(), and
in probe()'s error paths.

Or of course, you could just implement devm_of_iomap(); it's probably
very simple to do.



More information about the linux-arm-kernel mailing list