From 2ff683fa334290dac838fc92074e3de26b2f8111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Wed, 14 Feb 2024 22:24:22 +0100 Subject: [PATCH] [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;