We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 77e536a commit 0a2cd16Copy full SHA for 0a2cd16
ayaneo-platform.c
@@ -218,8 +218,13 @@ static int write_to_ec(u8 reg, u8 val)
218
return ret;
219
}
220
221
-static void write_ec_ram(u8 index, u8 val)
+static int write_ec_ram(u8 index, u8 val)
222
{
223
+ int ret;
224
+
225
+ if (!lock_global_acpi_lock())
226
+ return -EBUSY;
227
228
outb(0x2e, AYANEO_ADDR_PORT);
229
outb(0x11, AYANEO_DATA_PORT);
230
outb(0x2f, AYANEO_ADDR_PORT);
@@ -232,6 +237,11 @@ static void write_ec_ram(u8 index, u8 val)
232
237
outb(0x12, AYANEO_DATA_PORT);
233
238
234
239
outb(val, AYANEO_DATA_PORT);
240
241
+ if (!unlock_global_acpi_lock())
242
243
244
+ return ret;
235
245
236
246
247
/* Newer AIR Plus methods */
0 commit comments