diff --git a/drivers/battery/battc/battc.c b/drivers/battery/battc/battc.c index 33cbc438475..1d90b30f399 100644 --- a/drivers/battery/battc/battc.c +++ b/drivers/battery/battc/battc.c @@ -292,8 +292,13 @@ BatteryClassIoctl(PVOID ClassData, &BattNotify); if (!NT_SUCCESS(Status)) { - DPRINT1("SetStatusNotify failed (0x%x)\n", Status); - break; + DPRINT("SetStatusNotify failed (0x%x)\n", Status); + // HACK: Continue anyway; the non-zero timeout will limit polling rate. + // FIXME: Hardcoded (wait for 5 seconds) because ACPI notifications don't work... + BattWait.Timeout = 5000; + // FIXME 2: All these IOCTLs handled in BatteryClassIoctl() should actually + // be queued and be serviced by a worker thread that also handles the slow + // battery polling, in case the battery doesn't support status notifications. } ExAcquireFastMutex(&BattClass->Mutex); diff --git a/drivers/battery/compbatt/compbatt.c b/drivers/battery/compbatt/compbatt.c index 3edb3fb78a8..2b138492912 100644 --- a/drivers/battery/compbatt/compbatt.c +++ b/drivers/battery/compbatt/compbatt.c @@ -80,7 +80,7 @@ CompBattSystemControl( * location which contains the data of the individual battery. * * @param[in] Context - * An aribtrary pointer that points to context data, this paramater + * An arbitrary pointer that points to context data, this parameter * is unused. * * @return @@ -355,7 +355,7 @@ CompBattMonitorIrpCompleteWorker( /* Setup the necessary data to read battery status */ BatteryData->WaitStatus.BatteryTag = BatteryData->Tag; - BatteryData->WaitStatus.Timeout = 3000; // FIXME: Hardcoded (wait for 3 seconds) because we do not have ACPI notifications implemented yet... + BatteryData->WaitStatus.Timeout = -1; RtlCopyMemory(&BatteryData->WorkerBuffer.WorkerWaitStatus, &BatteryData->WaitStatus,