aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTim Niemeyer <reddog@mastersword.de>2009-03-26 01:19:15 -0300
committerWerner Almesberger <werner@openmoko.org>2009-03-26 01:24:28 -0300
commit1350d5dfaac7dadf6cab9e812f0acfabcce60e58 (patch)
tree9f086e6c44278f637ec13f1a4ef065b77d4442ca /drivers
parent629942d4dd76d60d1fbf8c650721a6ac0c14bbf8 (diff)
extend work around boot-time ordering on GTA01
[ Werner: Documentation/CodingStyle lines 166 and 448, put blank line after local variables. ] Signed-off-by: Tim Niemeyer <reddog@mastersword.de> Signed-off-by: Werner Almesberger <werner@openmoko.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/power/pcf50606-charger.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/power/pcf50606-charger.c b/drivers/power/pcf50606-charger.c
index 0f2aedabec3..fb02a798903 100644
--- a/drivers/power/pcf50606-charger.c
+++ b/drivers/power/pcf50606-charger.c
@@ -36,6 +36,13 @@ struct pcf50606_mbc {
void pcf50606_charge_fast(struct pcf50606 *pcf, int on)
{
struct pcf50606_mbc *mbc = platform_get_drvdata(pcf->mbc_pdev);
+ /* this is a fix to work around boot-time ordering problems if
+ * the s3c2410_udc is initialized before the pcf50606 mbc is
+ * ready */
+ if (!mbc)
+ {
+ return;
+ }
if (on) {
pcf50606_reg_set_bit_mask(pcf, PCF50606_REG_MBCC1,