[ar71xx] preliminary support for the Ubiquiti RouterStation Pro
[openwrt.git] / target / linux / s3c24xx / patches-2.6.24 / 1225-From-cede5c6c9b06ecbb0f7f2df7b7070092b87ddaf8-Mon-Se.patch
1 From e4b81c966e03ee280492e75cdd569f8495cb2a06 Mon Sep 17 00:00:00 2001
2 From: Holger Freyther <zecke@openmoko.org>
3 Date: Tue, 8 Jul 2008 18:38:16 +0100
4 Subject: [PATCH] From cede5c6c9b06ecbb0f7f2df7b7070092b87ddaf8 Mon Sep 17 00:00:00 2001
5 Subject: [PATCH] [pcf50633] Avoid ooops on start with inserted usb cable
6 The pcf50633_global might not be initialized when we get the first
7 usb interrupt. We would oops inside the dev_err because we made up
8 a struct device.
9
10 Signed-Off-By: Holger Freyther <zecke@openmoko.org>
11 ---
12 arch/arm/mach-s3c2440/mach-gta02.c | 3 +++
13 drivers/i2c/chips/pcf50633.c | 4 +---
14 2 files changed, 4 insertions(+), 3 deletions(-)
15
16 diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
17 index 7118332..b3d3797 100644
18 --- a/arch/arm/mach-s3c2440/mach-gta02.c
19 +++ b/arch/arm/mach-s3c2440/mach-gta02.c
20 @@ -883,6 +883,9 @@ static void gta02_udc_command(enum s3c2410_udc_cmd_e cmd)
21
22 static void gta02_udc_vbus_draw(unsigned int ma)
23 {
24 + if (!pcf50633_global)
25 + return;
26 +
27 pcf50633_notify_usb_current_limit_change(pcf50633_global, ma);
28 }
29
30 diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c
31 index 10934f7..64de9bf 100644
32 --- a/drivers/i2c/chips/pcf50633.c
33 +++ b/drivers/i2c/chips/pcf50633.c
34 @@ -690,9 +690,7 @@ int pcf50633_notify_usb_current_limit_change(struct pcf50633_data *pcf,
35 * have to bail with error since we can't even schedule the work
36 */
37 if (!pcf) {
38 - dev_err(&pcf->client.dev,
39 - "pcf50633_notify_usb_current_limit_change "
40 - "called with NULL pcf\n");
41 + printk(KERN_ERR "pcf50633_notify_usb_current_limit called with NULL pcf\n");
42 return -EBUSY;
43 }
44
45 --
46 1.5.6.5
47
This page took 0.058732 seconds and 5 git commands to generate.