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