ACPI / dock: Pass ACPI device pointer to acpi_device_is_battery()
Since we already know what the device's PNP IDs are when acpi_device_is_battery() is called, it is not necessary to run acpi_get_object_info() for the device in that function. Instead, if acpi_device_is_battery() is passed a pointer to a struct acpi_device object, it can use the list of PNP IDs from that object, so make that happen and modify the function's header accordingly Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
@@ -97,7 +97,7 @@ void acpi_free_pnp_ids(struct acpi_device_pnp *pnp);
|
||||
int acpi_bind_one(struct device *dev, struct acpi_device *adev);
|
||||
int acpi_unbind_one(struct device *dev);
|
||||
bool acpi_device_is_present(struct acpi_device *adev);
|
||||
bool acpi_device_is_battery(acpi_handle handle);
|
||||
bool acpi_device_is_battery(struct acpi_device *adev);
|
||||
|
||||
/* --------------------------------------------------------------------------
|
||||
Power Resource
|
||||
|
Reference in New Issue
Block a user