]> git.baikalelectronics.ru Git - kernel.git/commit
pinctrl: ingenic: Put ingenic_chip_info pointer in match data
authorPaul Cercueil <paul@crapouillou.net>
Mon, 6 Jan 2020 23:27:08 +0000 (00:27 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 7 Jan 2020 12:57:17 +0000 (13:57 +0100)
commit9adc9e2b3ea4662f4f42d00bb62448cbe19e319b
treee4678f21290116a4f6a4b3fbcaed7edf4dbfef76
parent62db229a1a8cc9de16c91876d877623ea75eab6d
pinctrl: ingenic: Put ingenic_chip_info pointer in match data

Instead of passing a numeric ID as match data, and retrieve a pointer to
the ingenic_chip_info structure in an ugly succession of if/else in the
probe function, get the pointer to the ingenic_chip_info structure
directly from the match data, and store the numeric ID inside the
ingenic_chip_info structure.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/20200106232711.559727-3-paul@crapouillou.net
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-ingenic.c