https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2ff683fa334290dac838f…
commit 2ff683fa334290dac838fc92074e3de26b2f8111
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Wed Feb 14 22:24:22 2024 +0100
Commit: Hervé Poussineau <hpoussin(a)reactos.org>
CommitDate: Mon Aug 12 11:56:18 2024 +0200
[CMBATT] Remove useless fields in device extension
Information is already present in BifData, and those fields were never filled.
---
drivers/bus/acpi/cmbatt/cmbatt.c | 12 ++++++------
drivers/bus/acpi/cmbatt/cmbatt.h | 6 ------
2 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/bus/acpi/cmbatt/cmbatt.c b/drivers/bus/acpi/cmbatt/cmbatt.c
index 9d3a459525e..f0e7b04a39e 100644
--- a/drivers/bus/acpi/cmbatt/cmbatt.c
+++ b/drivers/bus/acpi/cmbatt/cmbatt.c
@@ -1120,7 +1120,7 @@ CmBattQueryInformation(IN PCMBATT_DEVICE_EXTENSION FdoExtension,
case BatteryDeviceName:
/* Build the model number string */
- RtlInitAnsiString(&TempString, FdoExtension->ModelNumber);
+ RtlInitAnsiString(&TempString, FdoExtension->BifData.ModelNumber);
/* Convert it to Unicode */
InfoString.Buffer = InfoBuffer;
@@ -1142,7 +1142,7 @@ CmBattQueryInformation(IN PCMBATT_DEVICE_EXTENSION FdoExtension,
case BatteryManufactureName:
/* Build the OEM info string */
- RtlInitAnsiString(&TempString, FdoExtension->OemInfo);
+ RtlInitAnsiString(&TempString, FdoExtension->BifData.OemInfo);
/* Convert it to Unicode */
InfoString.Buffer = InfoBuffer;
@@ -1157,7 +1157,7 @@ CmBattQueryInformation(IN PCMBATT_DEVICE_EXTENSION FdoExtension,
case BatteryUniqueID:
/* Build the serial number string */
- RtlInitAnsiString(&TempString, FdoExtension->SerialNumber);
+ RtlInitAnsiString(&TempString, FdoExtension->BifData.SerialNumber);
/* Convert it to Unicode */
InfoString.Buffer = InfoBuffer;
@@ -1169,10 +1169,10 @@ CmBattQueryInformation(IN PCMBATT_DEVICE_EXTENSION FdoExtension,
TempString2.MaximumLength = sizeof(TempBuffer);
/* Check if there's an OEM string */
- if (FdoExtension->OemInfo[0])
+ if (FdoExtension->BifData.OemInfo[0])
{
/* Build the OEM info string */
- RtlInitAnsiString(&TempString, FdoExtension->OemInfo);
+ RtlInitAnsiString(&TempString, FdoExtension->BifData.OemInfo);
/* Convert it to Unicode and append it */
RtlAnsiStringToUnicodeString(&TempString2, &TempString, 0);
@@ -1180,7 +1180,7 @@ CmBattQueryInformation(IN PCMBATT_DEVICE_EXTENSION FdoExtension,
}
/* Build the model number string */
- RtlInitAnsiString(&TempString, FdoExtension->ModelNumber);
+ RtlInitAnsiString(&TempString, FdoExtension->BifData.ModelNumber);
/* Convert it to Unicode and append it */
RtlAnsiStringToUnicodeString(&TempString2, &TempString, 0);
diff --git a/drivers/bus/acpi/cmbatt/cmbatt.h b/drivers/bus/acpi/cmbatt/cmbatt.h
index feec959fb42..bb130208763 100644
--- a/drivers/bus/acpi/cmbatt/cmbatt.h
+++ b/drivers/bus/acpi/cmbatt/cmbatt.h
@@ -124,12 +124,6 @@ typedef struct _CMBATT_DEVICE_EXTENSION
LONG ArLockValue;
ULONG TagData;
ULONG Tag;
- ULONG ModelNumberLength;
- PCHAR ModelNumber;
- ULONG SerialNumberLength;
- PCHAR SerialNumber;
- ULONG OemInfoLength;
- PCHAR OemInfo;
ACPI_BST_DATA BstData;
ACPI_BIF_DATA BifData;
ULONG Id;