aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2005-01-10 17:12:03 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-10 17:12:03 -0800
commit3f3078b6fd65b26f1fbfca470d5e85479b48a64e (patch)
treec9c6fe40a54788f027e815a10acd6f8d8a510e69 /drivers
parentbff12f371c164b6530c3d911454102c655909fe2 (diff)
downloadhistory-3f3078b6fd65b26f1fbfca470d5e85479b48a64e.tar.gz
[PATCH] pm: introduce pm_message_t
This introduces pm_message_t. For now, it is only good for type-safety and sparse checking, but plan is to turn pm_message_t into structure soon. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/platform.c2
-rw-r--r--drivers/base/power/power.h6
-rw-r--r--drivers/base/power/runtime.c4
-rw-r--r--drivers/base/power/suspend.c8
-rw-r--r--drivers/ide/ide.c2
-rw-r--r--drivers/pci/pci-driver.c2
6 files changed, 12 insertions, 12 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 81251fde251657..c8c87cebcbc127 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -276,7 +276,7 @@ static int platform_match(struct device * dev, struct device_driver * drv)
return (strncmp(pdev->name, drv->name, BUS_ID_SIZE) == 0);
}
-static int platform_suspend(struct device * dev, u32 state)
+static int platform_suspend(struct device * dev, pm_message_t state)
{
int ret = 0;
diff --git a/drivers/base/power/power.h b/drivers/base/power/power.h
index 66cb431b14337a..e5eda746f2a6d1 100644
--- a/drivers/base/power/power.h
+++ b/drivers/base/power/power.h
@@ -71,14 +71,14 @@ extern int resume_device(struct device *);
/*
* suspend.c
*/
-extern int suspend_device(struct device *, u32);
+extern int suspend_device(struct device *, pm_message_t);
/*
* runtime.c
*/
-extern int dpm_runtime_suspend(struct device *, u32);
+extern int dpm_runtime_suspend(struct device *, pm_message_t);
extern void dpm_runtime_resume(struct device *);
#else /* CONFIG_PM */
@@ -93,7 +93,7 @@ static inline void device_pm_remove(struct device * dev)
}
-static inline int dpm_runtime_suspend(struct device * dev, u32 state)
+static inline int dpm_runtime_suspend(struct device * dev, pm_message_t state)
{
return 0;
}
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
index 5e58f68363afe3..325962d8019153 100644
--- a/drivers/base/power/runtime.c
+++ b/drivers/base/power/runtime.c
@@ -44,7 +44,7 @@ void dpm_runtime_resume(struct device * dev)
* @state: State to enter.
*/
-int dpm_runtime_suspend(struct device * dev, u32 state)
+int dpm_runtime_suspend(struct device * dev, pm_message_t state)
{
int error = 0;
@@ -73,7 +73,7 @@ int dpm_runtime_suspend(struct device * dev, u32 state)
* always be able to tell, but we need accurate information to
* work reliably.
*/
-void dpm_set_power_state(struct device * dev, u32 state)
+void dpm_set_power_state(struct device * dev, pm_message_t state)
{
down(&dpm_sem);
dev->power.power_state = state;
diff --git a/drivers/base/power/suspend.c b/drivers/base/power/suspend.c
index 94c1311ee26bcb..8e1ace2d817e2f 100644
--- a/drivers/base/power/suspend.c
+++ b/drivers/base/power/suspend.c
@@ -11,7 +11,7 @@
#include <linux/device.h>
#include "power.h"
-extern int sysdev_suspend(u32 state);
+extern int sysdev_suspend(pm_message_t state);
/*
* The entries in the dpm_active list are in a depth first order, simply
@@ -35,7 +35,7 @@ extern int sysdev_suspend(u32 state);
* @state: Power state device is entering.
*/
-int suspend_device(struct device * dev, u32 state)
+int suspend_device(struct device * dev, pm_message_t state)
{
int error = 0;
@@ -65,7 +65,7 @@ int suspend_device(struct device * dev, u32 state)
*
*/
-int device_suspend(u32 state)
+int device_suspend(pm_message_t state)
{
int error = 0;
@@ -118,7 +118,7 @@ EXPORT_SYMBOL_GPL(device_suspend);
* done, power down system devices.
*/
-int device_power_down(u32 state)
+int device_power_down(pm_message_t state)
{
int error = 0;
struct device * dev;
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 2e50f8597b8338..7f867df01a5603 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -1380,7 +1380,7 @@ int ata_attach(ide_drive_t *drive)
return 1;
}
-static int generic_ide_suspend(struct device *dev, u32 state)
+static int generic_ide_suspend(struct device *dev, pm_message_t state)
{
ide_drive_t *drive = dev->driver_data;
struct request rq;
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 7ce952cd99f67e..7371987cf1836b 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -284,7 +284,7 @@ static int pci_device_remove(struct device * dev)
return 0;
}
-static int pci_device_suspend(struct device * dev, u32 state)
+static int pci_device_suspend(struct device * dev, pm_message_t state)
{
struct pci_dev * pci_dev = to_pci_dev(dev);
struct pci_driver * drv = pci_dev->driver;