[CMBATT] Remove useless fields in device extension

Information is already present in BifData, and those fields were never filled.
This commit is contained in:
Hervé Poussineau 2024-02-14 22:24:22 +01:00
parent 359e73d055
commit 2ff683fa33
2 changed files with 6 additions and 12 deletions

View file

@ -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);

View file

@ -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;