soc: mediatek: PMIC wrap: split SoC specific init into callback
authorJohn Crispin <blogic@openwrt.org>
Fri, 19 Feb 2016 08:44:08 +0000 (09:44 +0100)
committerMatthias Brugger <matthias.bgg@gmail.com>
Wed, 20 Apr 2016 11:03:01 +0000 (13:03 +0200)
commit41c11f32d86ac1b64c78b827f977432df4934147
tree5878cd0c1a0e1715bcaec8246da706b0fdb9fa64
parenta397845338af260658f55b2ba73834940244cf6d
soc: mediatek: PMIC wrap: split SoC specific init into callback

This patch moves the SoC specific wrapper init code into separate callback
to avoid pwrap_init() getting too large. This is done by adding a new
element called init_special to pmic_wrapper_type. Each currently supported
SoC gets its own version of the callback and we copy the code that was
previously inside pwrap_init() to these new callbacks. Finally we point the
2 instances of pmic_wrapper_type at the 2 new functions.

Signed-off-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
drivers/soc/mediatek/mtk-pmic-wrap.c