]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mfd: lpc_sch: Accomodate partial population of the MFD devices
authorDarren Hart <dvhart@linux.intel.com>
Fri, 8 Feb 2013 23:20:36 +0000 (15:20 -0800)
committerSamuel Ortiz <sameo@linux.intel.com>
Wed, 13 Feb 2013 23:26:45 +0000 (00:26 +0100)
commit5829e9b64e657560e840dc0ecfee177cb002cd69
tree282ef54b0edf1c087abe14374ac69132cfdbc612
parentc3e9e6b67db23ae678550f861b5679880481cfa3
mfd: lpc_sch: Accomodate partial population of the MFD devices

The current probe aborts if any of the 3 base address registers are
disabled. On a TunnelCreek system I am working on, this resulted in the
SMBIOS and GPIO devices being removed when it couldn't read the base
address for the watchdog timer.

This patch accommodates partial population of the lpc_sch_cells array and
only aborts if all the base address registers are disabled. A max size
array is allocated and the individual device cells are added to it after
their base addresses are successfully determined. This simplifies the
code a bit by removing the need for the separate tunnelcreek cells array
and combining some of the add/remove logic.

Cc: Grant Likely <grant.likely@secretlab.ca>,
Cc: Denis Turischev <denis@compulab.co.il>,
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/lpc_sch.c