mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
pinctrl: imx7d: simplify imx7d_pinctrl_probe
Using of_device_get_match_data in imx7d_pinctrl_probe simplifies the function. Also get rid of the void pointer cast since imx_pinctrl_probe now accepts const struct imx_pinctrl_soc_info. Cc: Arvind Yadav <[email protected]> Signed-off-by: Stefan Agner <[email protected]> Acked-by: Dong Aisheng <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
f5843492ec
commit
7372077542
1 changed files with 3 additions and 7 deletions
|
|
@ -378,16 +378,12 @@ static const struct of_device_id imx7d_pinctrl_of_match[] = {
|
|||
|
||||
static int imx7d_pinctrl_probe(struct platform_device *pdev)
|
||||
{
|
||||
const struct of_device_id *match;
|
||||
struct imx_pinctrl_soc_info *pinctrl_info;
|
||||
const struct imx_pinctrl_soc_info *pinctrl_info;
|
||||
|
||||
match = of_match_device(imx7d_pinctrl_of_match, &pdev->dev);
|
||||
|
||||
if (!match)
|
||||
pinctrl_info = of_device_get_match_data(&pdev->dev);
|
||||
if (!pinctrl_info)
|
||||
return -ENODEV;
|
||||
|
||||
pinctrl_info = (struct imx_pinctrl_soc_info *) match->data;
|
||||
|
||||
return imx_pinctrl_probe(pdev, pinctrl_info);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue