aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/ec.c
diff options
context:
space:
mode:
authorAlexey Starikovskiy <alexey.y.starikovskiy@intel.com>2006-12-07 10:42:17 -0500
committerLen Brown <len.brown@intel.com>2006-12-08 02:56:07 -0500
commit78d0af3392cba6dfdd1dc1eab5a86ba8e4af8fff (patch)
tree7c8b317749ceaaca55767e725af09611552c3160 /drivers/acpi/ec.c
parent523953b41e52952347d7d50dcc4bfc27bc001dc8 (diff)
ACPI: ec: Style changes.
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r--drivers/acpi/ec.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 4d17777110ed..17a98aa734b8 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -135,20 +135,16 @@ static inline void acpi_ec_write_data(struct acpi_ec *ec, u8 data)
135 outb(data, ec->data_addr); 135 outb(data, ec->data_addr);
136} 136}
137 137
138static int acpi_ec_check_status(struct acpi_ec *ec, u8 event) 138static inline int acpi_ec_check_status(struct acpi_ec *ec, u8 event)
139{ 139{
140 u8 status = acpi_ec_read_status(ec); 140 u8 status = acpi_ec_read_status(ec);
141 switch (event) { 141
142 case ACPI_EC_EVENT_OBF_1: 142 if (event == ACPI_EC_EVENT_OBF_1) {
143 if (status & ACPI_EC_FLAG_OBF) 143 if (status & ACPI_EC_FLAG_OBF)
144 return 1; 144 return 1;
145 break; 145 } else if (event == ACPI_EC_EVENT_IBF_0) {
146 case ACPI_EC_EVENT_IBF_0:
147 if (!(status & ACPI_EC_FLAG_IBF)) 146 if (!(status & ACPI_EC_FLAG_IBF))
148 return 1; 147 return 1;
149 break;
150 default:
151 break;
152 } 148 }
153 149
154 return 0; 150 return 0;
@@ -238,7 +234,7 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, u8 command,
238 234
239 acpi_ec_write_cmd(ec, command); 235 acpi_ec_write_cmd(ec, command);
240 236
241 for (; wdata_len > 0; wdata_len --) { 237 for (; wdata_len > 0; --wdata_len) {
242 result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0); 238 result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0);
243 if (result) { 239 if (result) {
244 printk(KERN_ERR PREFIX "write_cmd timeout, command = %d\n", 240 printk(KERN_ERR PREFIX "write_cmd timeout, command = %d\n",
@@ -259,7 +255,7 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, u8 command,
259 atomic_set(&ec->query_pending, 0); 255 atomic_set(&ec->query_pending, 0);
260 } 256 }
261 257
262 for (; rdata_len > 0; rdata_len --) { 258 for (; rdata_len > 0; --rdata_len) {
263 result = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF_1); 259 result = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF_1);
264 if (result) { 260 if (result) {
265 printk(KERN_ERR PREFIX "read timeout, command = %d\n", 261 printk(KERN_ERR PREFIX "read timeout, command = %d\n",