]> asedeno.scripts.mit.edu Git - linux.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)
commitbaf15647387e82c18933fcf6c9c2dd77e18e950f
treee4678f21290116a4f6a4b3fbcaed7edf4dbfef76
parent5ec008bfac7da212fa0d3dea6d30c372bd7034f2
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