aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2011-03-31 07:36:38 -0400
committerLen Brown <len.brown@intel.com>2011-04-01 02:24:31 -0400
commit1cb7b1e0de6a1f8f071f4a146e3d10f3a662f707 (patch)
tree8a66774191480f2ba893c0b9391c66d60b6ba6d1
parent521cb40b0c44418a4fd36dc633f575813d59a43d (diff)
ACPI EC: remove dead code
static void acpi_ec_gpe_query(void *ec_cxt); -> The function is right above this declaration -> not needed. poll_force is also not used, cleaned up in ec.c and its users: compal-laptop and msi-laptop. Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--drivers/acpi/ec.c6
-rw-r--r--drivers/platform/x86/compal-laptop.c12
-rw-r--r--drivers/platform/x86/msi-laptop.c12
-rw-r--r--include/linux/acpi.h3
4 files changed, 14 insertions, 19 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index fa848c4116a8..b3f1d6f52a89 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -69,7 +69,6 @@ enum ec_command {
69 69
70#define ACPI_EC_DELAY 500 /* Wait 500ms max. during EC ops */ 70#define ACPI_EC_DELAY 500 /* Wait 500ms max. during EC ops */
71#define ACPI_EC_UDELAY_GLK 1000 /* Wait 1ms max. to get global lock */ 71#define ACPI_EC_UDELAY_GLK 1000 /* Wait 1ms max. to get global lock */
72#define ACPI_EC_CDELAY 10 /* Wait 10us before polling EC */
73#define ACPI_EC_MSI_UDELAY 550 /* Wait 550us for MSI EC */ 72#define ACPI_EC_MSI_UDELAY 550 /* Wait 550us for MSI EC */
74 73
75#define ACPI_EC_STORM_THRESHOLD 8 /* number of false interrupts 74#define ACPI_EC_STORM_THRESHOLD 8 /* number of false interrupts
@@ -433,8 +432,7 @@ EXPORT_SYMBOL(ec_write);
433 432
434int ec_transaction(u8 command, 433int ec_transaction(u8 command,
435 const u8 * wdata, unsigned wdata_len, 434 const u8 * wdata, unsigned wdata_len,
436 u8 * rdata, unsigned rdata_len, 435 u8 * rdata, unsigned rdata_len)
437 int force_poll)
438{ 436{
439 struct transaction t = {.command = command, 437 struct transaction t = {.command = command,
440 .wdata = wdata, .rdata = rdata, 438 .wdata = wdata, .rdata = rdata,
@@ -592,8 +590,6 @@ static void acpi_ec_gpe_query(void *ec_cxt)
592 mutex_unlock(&ec->lock); 590 mutex_unlock(&ec->lock);
593} 591}
594 592
595static void acpi_ec_gpe_query(void *ec_cxt);
596
597static int ec_check_sci(struct acpi_ec *ec, u8 state) 593static int ec_check_sci(struct acpi_ec *ec, u8 state)
598{ 594{
599 if (state & ACPI_EC_FLAG_SCI) { 595 if (state & ACPI_EC_FLAG_SCI) {
diff --git a/drivers/platform/x86/compal-laptop.c b/drivers/platform/x86/compal-laptop.c
index 034572b980c9..f4f43e65475f 100644
--- a/drivers/platform/x86/compal-laptop.c
+++ b/drivers/platform/x86/compal-laptop.c
@@ -200,7 +200,7 @@ static bool extra_features;
200 * watching the output of address 0x4F (do an ec_transaction writing 0x33 200 * watching the output of address 0x4F (do an ec_transaction writing 0x33
201 * into 0x4F and read a few bytes from the output, like so: 201 * into 0x4F and read a few bytes from the output, like so:
202 * u8 writeData = 0x33; 202 * u8 writeData = 0x33;
203 * ec_transaction(0x4F, &writeData, 1, buffer, 32, 0); 203 * ec_transaction(0x4F, &writeData, 1, buffer, 32);
204 * That address is labled "fan1 table information" in the service manual. 204 * That address is labled "fan1 table information" in the service manual.
205 * It should be clear which value in 'buffer' changes). This seems to be 205 * It should be clear which value in 'buffer' changes). This seems to be
206 * related to fan speed. It isn't a proper 'realtime' fan speed value 206 * related to fan speed. It isn't a proper 'realtime' fan speed value
@@ -286,7 +286,7 @@ static int get_backlight_level(void)
286static void set_backlight_state(bool on) 286static void set_backlight_state(bool on)
287{ 287{
288 u8 data = on ? BACKLIGHT_STATE_ON_DATA : BACKLIGHT_STATE_OFF_DATA; 288 u8 data = on ? BACKLIGHT_STATE_ON_DATA : BACKLIGHT_STATE_OFF_DATA;
289 ec_transaction(BACKLIGHT_STATE_ADDR, &data, 1, NULL, 0, 0); 289 ec_transaction(BACKLIGHT_STATE_ADDR, &data, 1, NULL, 0);
290} 290}
291 291
292 292
@@ -294,24 +294,24 @@ static void set_backlight_state(bool on)
294static void pwm_enable_control(void) 294static void pwm_enable_control(void)
295{ 295{
296 unsigned char writeData = PWM_ENABLE_DATA; 296 unsigned char writeData = PWM_ENABLE_DATA;
297 ec_transaction(PWM_ENABLE_ADDR, &writeData, 1, NULL, 0, 0); 297 ec_transaction(PWM_ENABLE_ADDR, &writeData, 1, NULL, 0);
298} 298}
299 299
300static void pwm_disable_control(void) 300static void pwm_disable_control(void)
301{ 301{
302 unsigned char writeData = PWM_DISABLE_DATA; 302 unsigned char writeData = PWM_DISABLE_DATA;
303 ec_transaction(PWM_DISABLE_ADDR, &writeData, 1, NULL, 0, 0); 303 ec_transaction(PWM_DISABLE_ADDR, &writeData, 1, NULL, 0);
304} 304}
305 305
306static void set_pwm(int pwm) 306static void set_pwm(int pwm)
307{ 307{
308 ec_transaction(PWM_ADDRESS, &pwm_lookup_table[pwm], 1, NULL, 0, 0); 308 ec_transaction(PWM_ADDRESS, &pwm_lookup_table[pwm], 1, NULL, 0);
309} 309}
310 310
311static int get_fan_rpm(void) 311static int get_fan_rpm(void)
312{ 312{
313 u8 value, data = FAN_DATA; 313 u8 value, data = FAN_DATA;
314 ec_transaction(FAN_ADDRESS, &data, 1, &value, 1, 0); 314 ec_transaction(FAN_ADDRESS, &data, 1, &value, 1);
315 return 100 * (int)value; 315 return 100 * (int)value;
316} 316}
317 317
diff --git a/drivers/platform/x86/msi-laptop.c b/drivers/platform/x86/msi-laptop.c
index 7e9bb6df9d39..918a65dd2ab3 100644
--- a/drivers/platform/x86/msi-laptop.c
+++ b/drivers/platform/x86/msi-laptop.c
@@ -120,7 +120,7 @@ static int set_lcd_level(int level)
120 buf[1] = (u8) (level*31); 120 buf[1] = (u8) (level*31);
121 121
122 return ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, buf, sizeof(buf), 122 return ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, buf, sizeof(buf),
123 NULL, 0, 1); 123 NULL, 0);
124} 124}
125 125
126static int get_lcd_level(void) 126static int get_lcd_level(void)
@@ -129,7 +129,7 @@ static int get_lcd_level(void)
129 int result; 129 int result;
130 130
131 result = ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, &wdata, 1, 131 result = ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, &wdata, 1,
132 &rdata, 1, 1); 132 &rdata, 1);
133 if (result < 0) 133 if (result < 0)
134 return result; 134 return result;
135 135
@@ -142,7 +142,7 @@ static int get_auto_brightness(void)
142 int result; 142 int result;
143 143
144 result = ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, &wdata, 1, 144 result = ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, &wdata, 1,
145 &rdata, 1, 1); 145 &rdata, 1);
146 if (result < 0) 146 if (result < 0)
147 return result; 147 return result;
148 148
@@ -157,7 +157,7 @@ static int set_auto_brightness(int enable)
157 wdata[0] = 4; 157 wdata[0] = 4;
158 158
159 result = ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, wdata, 1, 159 result = ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, wdata, 1,
160 &rdata, 1, 1); 160 &rdata, 1);
161 if (result < 0) 161 if (result < 0)
162 return result; 162 return result;
163 163
@@ -165,7 +165,7 @@ static int set_auto_brightness(int enable)
165 wdata[1] = (rdata & 0xF7) | (enable ? 8 : 0); 165 wdata[1] = (rdata & 0xF7) | (enable ? 8 : 0);
166 166
167 return ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, wdata, 2, 167 return ec_transaction(MSI_EC_COMMAND_LCD_LEVEL, wdata, 2,
168 NULL, 0, 1); 168 NULL, 0);
169} 169}
170 170
171static ssize_t set_device_state(const char *buf, size_t count, u8 mask) 171static ssize_t set_device_state(const char *buf, size_t count, u8 mask)
@@ -202,7 +202,7 @@ static int get_wireless_state(int *wlan, int *bluetooth)
202 u8 wdata = 0, rdata; 202 u8 wdata = 0, rdata;
203 int result; 203 int result;
204 204
205 result = ec_transaction(MSI_EC_COMMAND_WIRELESS, &wdata, 1, &rdata, 1, 1); 205 result = ec_transaction(MSI_EC_COMMAND_WIRELESS, &wdata, 1, &rdata, 1);
206 if (result < 0) 206 if (result < 0)
207 return -1; 207 return -1;
208 208
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index a2e910e01293..1deb2a73c2da 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -150,8 +150,7 @@ extern int ec_read(u8 addr, u8 *val);
150extern int ec_write(u8 addr, u8 val); 150extern int ec_write(u8 addr, u8 val);
151extern int ec_transaction(u8 command, 151extern int ec_transaction(u8 command,
152 const u8 *wdata, unsigned wdata_len, 152 const u8 *wdata, unsigned wdata_len,
153 u8 *rdata, unsigned rdata_len, 153 u8 *rdata, unsigned rdata_len);
154 int force_poll);
155 154
156#if defined(CONFIG_ACPI_WMI) || defined(CONFIG_ACPI_WMI_MODULE) 155#if defined(CONFIG_ACPI_WMI) || defined(CONFIG_ACPI_WMI_MODULE)
157 156