change prefix for kernelpatchbase 2.6.26
[openwrt/svn-archive/archive.git] / target / linux / s3c24xx / patches-2.6.26 / 1221-fix-pcf50633-remove-charger-curlim-and-enable-apis-f.patch
1 From 7492337c1344eb0d51a4f60f687d1aebc3670468 Mon Sep 17 00:00:00 2001
2 From: Andy Green <andy@openmoko.com>
3 Date: Fri, 25 Jul 2008 23:06:21 +0100
4 Subject: [PATCH] fix-pcf50633-remove-charger-curlim-and-enable-apis-from-export.patch
5
6 Setting the current limit directly and enabling the charger
7 isn't anyone's business except pcf50633 driver itself, so these
8 two functions should not be exported and become static.
9
10 Signed-off-by: Andy Green <andy@openmoko.com>
11 ---
12 drivers/i2c/chips/pcf50633.c | 10 ++++++----
13 include/linux/pcf50633.h | 6 ------
14 2 files changed, 6 insertions(+), 10 deletions(-)
15
16 diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c
17 index 4c73a9d..a5efb4e 100644
18 --- a/drivers/i2c/chips/pcf50633.c
19 +++ b/drivers/i2c/chips/pcf50633.c
20 @@ -194,6 +194,10 @@ EXPORT_SYMBOL_GPL(pcf50633_global);
21
22 static struct platform_device *pcf50633_pdev;
23
24 +static void pcf50633_usb_curlim_set(struct pcf50633_data *pcf, int ma);
25 +static void pcf50633_charge_enable(struct pcf50633_data *pcf, int on);
26 +
27 +
28 /***********************************************************************
29 * Low-Level routines
30 ***********************************************************************/
31 @@ -1384,7 +1388,7 @@ static DEVICE_ATTR(voltage_hcldo, S_IRUGO | S_IWUSR, show_vreg, set_vreg);
32 ***********************************************************************/
33
34 /* Set maximum USB current limit */
35 -void pcf50633_usb_curlim_set(struct pcf50633_data *pcf, int ma)
36 +static void pcf50633_usb_curlim_set(struct pcf50633_data *pcf, int ma)
37 {
38 u_int8_t bits;
39
40 @@ -1437,7 +1441,6 @@ set_it:
41 PCF50633_MBCC1_AUTORES);
42
43 }
44 -EXPORT_SYMBOL_GPL(pcf50633_usb_curlim_set);
45
46 static ssize_t show_usblim(struct device *dev, struct device_attribute *attr,
47 char *buf)
48 @@ -1462,7 +1465,7 @@ static ssize_t show_usblim(struct device *dev, struct device_attribute *attr,
49 static DEVICE_ATTR(usb_curlim, S_IRUGO | S_IWUSR, show_usblim, NULL);
50
51 /* Enable/disable charging */
52 -void pcf50633_charge_enable(struct pcf50633_data *pcf, int on)
53 +static void pcf50633_charge_enable(struct pcf50633_data *pcf, int on)
54 {
55 u_int8_t bits;
56 u_int8_t usblim;
57 @@ -1499,7 +1502,6 @@ void pcf50633_charge_enable(struct pcf50633_data *pcf, int on)
58 reg_set_bit_mask(pcf, PCF50633_REG_MBCC1, PCF50633_MBCC1_CHGENA,
59 bits);
60 }
61 -EXPORT_SYMBOL_GPL(pcf50633_charge_enable);
62
63 #if 0
64 #define ONE 1000000
65 diff --git a/include/linux/pcf50633.h b/include/linux/pcf50633.h
66 index b4d65dc..c11a637 100644
67 --- a/include/linux/pcf50633.h
68 +++ b/include/linux/pcf50633.h
69 @@ -111,12 +111,6 @@ pcf50633_onoff_set(struct pcf50633_data *pcf,
70 enum pcf50633_regulator_id reg, int on);
71
72 extern void
73 -pcf50633_usb_curlim_set(struct pcf50633_data *pcf, int ma);
74 -
75 -extern void
76 -pcf50633_charge_enable(struct pcf50633_data *pcf, int on);
77 -
78 -extern void
79 pcf50633_backlight_resume(struct pcf50633_data *pcf);
80
81 extern u_int16_t
82 --
83 1.5.6.3
84