Commit bf17b0cb authored by Pavel Machek's avatar Pavel Machek Committed by Linus Torvalds

[PATCH] mark older power managment as deprecated

Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3f3078b6
...@@ -28,44 +28,28 @@ ...@@ -28,44 +28,28 @@
#include <asm/atomic.h> #include <asm/atomic.h>
/* /*
* Power management requests * Power management requests... these are passed to pm_send_all() and friends.
*
* these functions are old and deprecated, see below.
*/ */
enum typedef int __bitwise pm_request_t;
{
PM_SUSPEND, /* enter D1-D3 */
PM_RESUME, /* enter D0 */
PM_SAVE_STATE, /* save device's state */
/* enable wake-on */ #define PM_SUSPEND ((__force pm_request_t) 1) /* enter D1-D3 */
PM_SET_WAKEUP, #define PM_RESUME ((__force pm_request_t) 2) /* enter D0 */
/* bus resource management */
PM_GET_RESOURCES,
PM_SET_RESOURCES,
/* base station management */
PM_EJECT,
PM_LOCK,
};
typedef int pm_request_t;
/* /*
* Device types * Device types... these are passed to pm_register
*/ */
enum typedef int __bitwise pm_dev_t;
{
PM_UNKNOWN_DEV = 0, /* generic */
PM_SYS_DEV, /* system device (fan, KB controller, ...) */
PM_PCI_DEV, /* PCI device */
PM_USB_DEV, /* USB device */
PM_SCSI_DEV, /* SCSI device */
PM_ISA_DEV, /* ISA device */
PM_MTD_DEV, /* Memory Technology Device */
};
typedef int pm_dev_t; #define PM_UNKNOWN_DEV ((__force pm_dev_t) 0) /* generic */
#define PM_SYS_DEV ((__force pm_dev_t) 1) /* system device (fan, KB controller, ...) */
#define PM_PCI_DEV ((__force pm_dev_t) 2) /* PCI device */
#define PM_USB_DEV ((__force pm_dev_t) 3) /* USB device */
#define PM_SCSI_DEV ((__force pm_dev_t) 4) /* SCSI device */
#define PM_ISA_DEV ((__force pm_dev_t) 5) /* ISA device */
#define PM_MTD_DEV ((__force pm_dev_t) 6) /* Memory Technology Device */
/* /*
* System device hardware ID (PnP) values * System device hardware ID (PnP) values
...@@ -119,32 +103,27 @@ extern int pm_active; ...@@ -119,32 +103,27 @@ extern int pm_active;
/* /*
* Register a device with power management * Register a device with power management
*/ */
struct pm_dev *pm_register(pm_dev_t type, struct pm_dev __deprecated *pm_register(pm_dev_t type, unsigned long id, pm_callback callback);
unsigned long id,
pm_callback callback);
/* /*
* Unregister a device with power management * Unregister a device with power management
*/ */
void pm_unregister(struct pm_dev *dev); void __deprecated pm_unregister(struct pm_dev *dev);
/* /*
* Unregister all devices with matching callback * Unregister all devices with matching callback
*/ */
void pm_unregister_all(pm_callback callback); void __deprecated pm_unregister_all(pm_callback callback);
/* /*
* Send a request to a single device * Send a request to a single device
*/ */
int pm_send(struct pm_dev *dev, pm_request_t rqst, void *data); int __deprecated pm_send(struct pm_dev *dev, pm_request_t rqst, void *data);
/* /*
* Send a request to all devices * Send a request to all devices
*/ */
int pm_send_all(pm_request_t rqst, void *data); int __deprecated pm_send_all(pm_request_t rqst, void *data);
static inline void pm_access(struct pm_dev *dev) {}
static inline void pm_dev_idle(struct pm_dev *dev) {}
#else /* CONFIG_PM */ #else /* CONFIG_PM */
...@@ -171,16 +150,10 @@ static inline int pm_send_all(pm_request_t rqst, void *data) ...@@ -171,16 +150,10 @@ static inline int pm_send_all(pm_request_t rqst, void *data)
return 0; return 0;
} }
static inline struct pm_dev *pm_find(pm_dev_t type, struct pm_dev *from)
{
return 0;
}
static inline void pm_access(struct pm_dev *dev) {}
static inline void pm_dev_idle(struct pm_dev *dev) {}
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */
/* Functions above this comment are list-based old-style power
* managment. Please avoid using them. */
/* /*
* Callbacks for platform drivers to implement. * Callbacks for platform drivers to implement.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment