device core: add device_is_bound()
authorTomeu Vizoso <tomeu.vizoso@collabora.com>
Thu, 7 Jan 2016 15:46:12 +0000 (16:46 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 8 Jan 2016 00:12:06 +0000 (01:12 +0100)
commit6b9cb42752dafba3761dde0002ca58ca518b6311
tree88de15e9d04f0da4de645852675cf13d06275e08
parentc4e4d631feb3be4ddf885e647127fddebb450334
device core: add device_is_bound()

Adds a function that tells whether a device is already bound to a
driver.

This is needed to warn when there is an attempt to change the PM domain
of a device that has finished probing already. The reason why we want to
enforce that is because in the general case that can cause problems and
also that we can simplify code quite a bit if we can always assume that.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/dd.c
include/linux/device.h