]> rtime.felk.cvut.cz Git - linux-imx.git/commit
ACPI / scan: Simplify ACPI driver probing
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 10 Jun 2013 11:00:50 +0000 (13:00 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 15 Jun 2013 22:36:06 +0000 (00:36 +0200)
commitd9e455f53f6fb93c764de2399c3894bbdfd2caa7
tree196ede4eac46fb8bab03791f0a12f1e7802ac95d
parent7d132055814ef17a6c7b69f342244c410a5e000f
ACPI / scan: Simplify ACPI driver probing

There is no particular reason why acpi_bus_driver_init() needs to be
a separate function and its location with respect to its only caller,
acpi_device_probe(), makes the code a bit difficult to follow.

Besides, it doesn't really make sense to check if 'device' is not
NULL in acpi_bus_driver_init(), because we've already dereferenced
dev->driver in acpi_device_probe() at that point and, moreover,
'device' cannot be NULL then, because acpi_device_probe() is called
via really_probe() (which also sets dev->driver for that matter).

For these reasons, drop acpi_bus_driver_init() altogether and move
the remaining code from it directly into acpi_device_probe().

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