diff options
Diffstat (limited to 'include/linux/device.h')
| -rw-r--r-- | include/linux/device.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 66fe271c2544..fb9451599aca 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -370,9 +370,6 @@ int subsys_virtual_register(struct bus_type *subsys, | |||
| 370 | * @devnode: Callback to provide the devtmpfs. | 370 | * @devnode: Callback to provide the devtmpfs. |
| 371 | * @class_release: Called to release this class. | 371 | * @class_release: Called to release this class. |
| 372 | * @dev_release: Called to release the device. | 372 | * @dev_release: Called to release the device. |
| 373 | * @suspend: Used to put the device to sleep mode, usually to a low power | ||
| 374 | * state. | ||
| 375 | * @resume: Used to bring the device from the sleep mode. | ||
| 376 | * @shutdown_pre: Called at shut-down time before driver shutdown. | 373 | * @shutdown_pre: Called at shut-down time before driver shutdown. |
| 377 | * @ns_type: Callbacks so sysfs can detemine namespaces. | 374 | * @ns_type: Callbacks so sysfs can detemine namespaces. |
| 378 | * @namespace: Namespace of the device belongs to this class. | 375 | * @namespace: Namespace of the device belongs to this class. |
| @@ -400,8 +397,6 @@ struct class { | |||
| 400 | void (*class_release)(struct class *class); | 397 | void (*class_release)(struct class *class); |
| 401 | void (*dev_release)(struct device *dev); | 398 | void (*dev_release)(struct device *dev); |
| 402 | 399 | ||
| 403 | int (*suspend)(struct device *dev, pm_message_t state); | ||
| 404 | int (*resume)(struct device *dev); | ||
| 405 | int (*shutdown_pre)(struct device *dev); | 400 | int (*shutdown_pre)(struct device *dev); |
| 406 | 401 | ||
| 407 | const struct kobj_ns_type_operations *ns_type; | 402 | const struct kobj_ns_type_operations *ns_type; |
| @@ -1075,6 +1070,16 @@ static inline void dev_pm_syscore_device(struct device *dev, bool val) | |||
| 1075 | #endif | 1070 | #endif |
| 1076 | } | 1071 | } |
| 1077 | 1072 | ||
| 1073 | static inline void dev_pm_set_driver_flags(struct device *dev, u32 flags) | ||
| 1074 | { | ||
| 1075 | dev->power.driver_flags = flags; | ||
| 1076 | } | ||
| 1077 | |||
| 1078 | static inline bool dev_pm_test_driver_flags(struct device *dev, u32 flags) | ||
| 1079 | { | ||
| 1080 | return !!(dev->power.driver_flags & flags); | ||
| 1081 | } | ||
| 1082 | |||
| 1078 | static inline void device_lock(struct device *dev) | 1083 | static inline void device_lock(struct device *dev) |
| 1079 | { | 1084 | { |
| 1080 | mutex_lock(&dev->mutex); | 1085 | mutex_lock(&dev->mutex); |
