ACPI: ec: Acquire Global Lock under EC mutex.

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

authored by Alexey Starikovskiy and committed by Len Brown 523953b4 50c1e113

+2 -2
+2 -2
drivers/acpi/ec.c
··· 286 if (rdata) 287 memset(rdata, 0, rdata_len); 288 289 if (ec->global_lock) { 290 status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); 291 if (ACPI_FAILURE(status)) 292 return -ENODEV; 293 } 294 - mutex_lock(&ec->lock); 295 296 /* Make sure GPE is enabled before doing transaction */ 297 acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR); ··· 307 rdata, rdata_len); 308 309 end: 310 - mutex_unlock(&ec->lock); 311 312 if (ec->global_lock) 313 acpi_release_global_lock(glk); 314 315 return status; 316 }
··· 286 if (rdata) 287 memset(rdata, 0, rdata_len); 288 289 + mutex_lock(&ec->lock); 290 if (ec->global_lock) { 291 status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); 292 if (ACPI_FAILURE(status)) 293 return -ENODEV; 294 } 295 296 /* Make sure GPE is enabled before doing transaction */ 297 acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR); ··· 307 rdata, rdata_len); 308 309 end: 310 311 if (ec->global_lock) 312 acpi_release_global_lock(glk); 313 + mutex_unlock(&ec->lock); 314 315 return status; 316 }