summaryrefslogtreecommitdiff
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.com>2016-01-07 18:46:12 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-01-08 03:12:06 +0300
commit6b9cb42752dafba3761dde0002ca58ca518b6311 (patch)
tree88de15e9d04f0da4de645852675cf13d06275e08 /include/linux/device.h
parentc4e4d631feb3be4ddf885e647127fddebb450334 (diff)
downloadlinux-6b9cb42752dafba3761dde0002ca58ca518b6311.tar.xz
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>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index f627ba20a46c..6d6f1fec092f 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -1044,6 +1044,8 @@ extern int __must_check driver_attach(struct device_driver *drv);
extern void device_initial_probe(struct device *dev);
extern int __must_check device_reprobe(struct device *dev);
+extern bool device_is_bound(struct device *dev);
+
/*
* Easy functions for dynamically creating devices on the fly
*/