]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/acpi/scan.c
ACPI / scan: More straightforward preparation of ACPI device objects
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 17 Jan 2013 13:11:05 +0000 (14:11 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 17 Jan 2013 13:11:05 +0000 (14:11 +0100)
commitd43e167db44b37bb284dc72fff2c3b61bb155752
tree7ae48a798412e10a9531932080489e2a57836989
parentbc9b6407bd6df3ab7189e5622816bbc11ae9d2d8
ACPI / scan: More straightforward preparation of ACPI device objects

Simplify the code preparing struct acpi_device objects for
registration by removing useless code, moving different pieces of
code into the functions they belong to and making a couple of int
functions always returning 0 void.

This also fixes a possible memory leak in ACPI device registration
error code path by making acpi_device_register() detach data from
device->handle if device_register() fails and prepares the scanning
code for special-casing ACPI power resources (next patch).

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/scan.c