aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/dock.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-02-15 18:09:34 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-02-15 19:51:15 -0500
commitb43109fa466e6e29091b3e62e6a6c8a0bd099beb (patch)
tree539a7f34c0d8c37fe4c400a7dba697b0d98f33a8 /drivers/acpi/dock.c
parent1e2380cd144f6a9619f72f80ad9a93268f63b8dc (diff)
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>
Diffstat (limited to 'drivers/acpi/dock.c')
-rw-r--r--drivers/acpi/dock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index 44c6e6c0d545..edeb72b619fb 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -793,7 +793,7 @@ void acpi_dock_add(struct acpi_device *adev)
793 dock_station->flags |= DOCK_IS_DOCK; 793 dock_station->flags |= DOCK_IS_DOCK;
794 if (acpi_ata_match(handle)) 794 if (acpi_ata_match(handle))
795 dock_station->flags |= DOCK_IS_ATA; 795 dock_station->flags |= DOCK_IS_ATA;
796 if (acpi_device_is_battery(handle)) 796 if (acpi_device_is_battery(adev))
797 dock_station->flags |= DOCK_IS_BAT; 797 dock_station->flags |= DOCK_IS_BAT;
798 798
799 ret = sysfs_create_group(&dd->dev.kobj, &dock_attribute_group); 799 ret = sysfs_create_group(&dd->dev.kobj, &dock_attribute_group);