Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: tz1090 Use devm_pinctrl_register() for pinctrl registration

Use devm_pinctrl_register() for pin control registration and
remove the need of .remove callback.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Laxman Dewangan and committed by
Linus Walleij
265559f7 00b881b0

+2 -11
+2 -11
drivers/pinctrl/pinctrl-tz1090.c
··· 1962 1962 if (IS_ERR(pmx->regs)) 1963 1963 return PTR_ERR(pmx->regs); 1964 1964 1965 - pmx->pctl = pinctrl_register(&tz1090_pinctrl_desc, &pdev->dev, pmx); 1965 + pmx->pctl = devm_pinctrl_register(&pdev->dev, &tz1090_pinctrl_desc, 1966 + pmx); 1966 1967 if (IS_ERR(pmx->pctl)) { 1967 1968 dev_err(&pdev->dev, "Couldn't register pinctrl driver\n"); 1968 1969 return PTR_ERR(pmx->pctl); ··· 1972 1971 platform_set_drvdata(pdev, pmx); 1973 1972 1974 1973 dev_info(&pdev->dev, "TZ1090 pinctrl driver initialised\n"); 1975 - 1976 - return 0; 1977 - } 1978 - 1979 - static int tz1090_pinctrl_remove(struct platform_device *pdev) 1980 - { 1981 - struct tz1090_pmx *pmx = platform_get_drvdata(pdev); 1982 - 1983 - pinctrl_unregister(pmx->pctl); 1984 1974 1985 1975 return 0; 1986 1976 } ··· 1987 1995 .of_match_table = tz1090_pinctrl_of_match, 1988 1996 }, 1989 1997 .probe = tz1090_pinctrl_probe, 1990 - .remove = tz1090_pinctrl_remove, 1991 1998 }; 1992 1999 1993 2000 static int __init tz1090_pinctrl_init(void)