aboutsummaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorHolger Freyther <zecke@openmoko.org>2008-11-19 17:09:55 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2008-11-19 17:09:55 +0000
commit4eb1fe129abda6e6e45746b7cdc8b35c243656ce (patch)
tree5e27a0af7eaeeec27282c43726d49a9de3bc9e07 /arch/arm
parent570ef53eaf82f98c5d0cba9de04fea0ff025f43d (diff)
From cede5c6c9b06ecbb0f7f2df7b7070092b87ddaf8 Mon Sep 17 00:00:00 2001
Subject: [PATCH] [pcf50633] Avoid ooops on start with inserted usb cable The pcf50633_global might not be initialized when we get the first usb interrupt. We would oops inside the dev_err because we made up a struct device. Signed-Off-By: Holger Freyther <zecke@openmoko.org>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-s3c2440/mach-gta02.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
index 71183322fd0..b3d3797e9b2 100644
--- a/arch/arm/mach-s3c2440/mach-gta02.c
+++ b/arch/arm/mach-s3c2440/mach-gta02.c
@@ -883,6 +883,9 @@ static void gta02_udc_command(enum s3c2410_udc_cmd_e cmd)
static void gta02_udc_vbus_draw(unsigned int ma)
{
+ if (!pcf50633_global)
+ return;
+
pcf50633_notify_usb_current_limit_change(pcf50633_global, ma);
}