ACPI: ec: Style changes.

Signed-off-by: Len Brown <len.brown@intel.com>

authored by Alexey Starikovskiy and committed by Len Brown 78d0af33 523953b4

+6 -10
+6 -10
drivers/acpi/ec.c
··· 135 outb(data, ec->data_addr); 136 } 137 138 - static int acpi_ec_check_status(struct acpi_ec *ec, u8 event) 139 { 140 u8 status = acpi_ec_read_status(ec); 141 - switch (event) { 142 - case ACPI_EC_EVENT_OBF_1: 143 if (status & ACPI_EC_FLAG_OBF) 144 return 1; 145 - break; 146 - case ACPI_EC_EVENT_IBF_0: 147 if (!(status & ACPI_EC_FLAG_IBF)) 148 return 1; 149 - break; 150 - default: 151 - break; 152 } 153 154 return 0; ··· 234 235 acpi_ec_write_cmd(ec, command); 236 237 - for (; wdata_len > 0; wdata_len --) { 238 result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0); 239 if (result) { 240 printk(KERN_ERR PREFIX "write_cmd timeout, command = %d\n", ··· 255 atomic_set(&ec->query_pending, 0); 256 } 257 258 - for (; rdata_len > 0; rdata_len --) { 259 result = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF_1); 260 if (result) { 261 printk(KERN_ERR PREFIX "read timeout, command = %d\n",
··· 135 outb(data, ec->data_addr); 136 } 137 138 + static inline int acpi_ec_check_status(struct acpi_ec *ec, u8 event) 139 { 140 u8 status = acpi_ec_read_status(ec); 141 + 142 + if (event == ACPI_EC_EVENT_OBF_1) { 143 if (status & ACPI_EC_FLAG_OBF) 144 return 1; 145 + } else if (event == ACPI_EC_EVENT_IBF_0) { 146 if (!(status & ACPI_EC_FLAG_IBF)) 147 return 1; 148 } 149 150 return 0; ··· 238 239 acpi_ec_write_cmd(ec, command); 240 241 + for (; wdata_len > 0; --wdata_len) { 242 result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0); 243 if (result) { 244 printk(KERN_ERR PREFIX "write_cmd timeout, command = %d\n", ··· 259 atomic_set(&ec->query_pending, 0); 260 } 261 262 + for (; rdata_len > 0; --rdata_len) { 263 result = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF_1); 264 if (result) { 265 printk(KERN_ERR PREFIX "read timeout, command = %d\n",