diff options
-rw-r--r-- | Documentation/driver-model/bus.txt | 2 | ||||
-rw-r--r-- | Documentation/driver-model/driver.txt | 4 | ||||
-rw-r--r-- | arch/i386/kernel/apic.c | 2 | ||||
-rw-r--r-- | arch/i386/kernel/i8259.c | 2 | ||||
-rw-r--r-- | arch/i386/kernel/io_apic.c | 2 | ||||
-rw-r--r-- | arch/i386/kernel/nmi.c | 2 | ||||
-rw-r--r-- | arch/i386/kernel/time.c | 2 | ||||
-rw-r--r-- | arch/i386/oprofile/nmi_int.c | 2 | ||||
-rw-r--r-- | drivers/base/sys.c | 3 | ||||
-rw-r--r-- | include/linux/pci.h | 5 | ||||
-rw-r--r-- | include/linux/sysdev.h | 5 |
11 files changed, 17 insertions, 14 deletions
diff --git a/Documentation/driver-model/bus.txt b/Documentation/driver-model/bus.txt index dd62c7b80b3f..5001b7511626 100644 --- a/Documentation/driver-model/bus.txt +++ b/Documentation/driver-model/bus.txt | |||
@@ -18,7 +18,7 @@ struct bus_type { | |||
18 | int (*match)(struct device * dev, struct device_driver * drv); | 18 | int (*match)(struct device * dev, struct device_driver * drv); |
19 | int (*hotplug) (struct device *dev, char **envp, | 19 | int (*hotplug) (struct device *dev, char **envp, |
20 | int num_envp, char *buffer, int buffer_size); | 20 | int num_envp, char *buffer, int buffer_size); |
21 | int (*suspend)(struct device * dev, u32 state); | 21 | int (*suspend)(struct device * dev, pm_message_t state); |
22 | int (*resume)(struct device * dev); | 22 | int (*resume)(struct device * dev); |
23 | }; | 23 | }; |
24 | 24 | ||
diff --git a/Documentation/driver-model/driver.txt b/Documentation/driver-model/driver.txt index 12447787d329..6031a68dd3f5 100644 --- a/Documentation/driver-model/driver.txt +++ b/Documentation/driver-model/driver.txt | |||
@@ -16,7 +16,7 @@ struct device_driver { | |||
16 | int (*probe) (struct device * dev); | 16 | int (*probe) (struct device * dev); |
17 | int (*remove) (struct device * dev); | 17 | int (*remove) (struct device * dev); |
18 | 18 | ||
19 | int (*suspend) (struct device * dev, u32 state, u32 level); | 19 | int (*suspend) (struct device * dev, pm_message_t state, u32 level); |
20 | int (*resume) (struct device * dev, u32 level); | 20 | int (*resume) (struct device * dev, u32 level); |
21 | 21 | ||
22 | void (*release) (struct device_driver * drv); | 22 | void (*release) (struct device_driver * drv); |
@@ -195,7 +195,7 @@ device; i.e. anything in the device's driver_data field. | |||
195 | If the device is still present, it should quiesce the device and place | 195 | If the device is still present, it should quiesce the device and place |
196 | it into a supported low-power state. | 196 | it into a supported low-power state. |
197 | 197 | ||
198 | int (*suspend) (struct device * dev, u32 state, u32 level); | 198 | int (*suspend) (struct device * dev, pm_message_t state, u32 level); |
199 | 199 | ||
200 | suspend is called to put the device in a low power state. There are | 200 | suspend is called to put the device in a low power state. There are |
201 | several stages to successfully suspending a device, which is denoted in | 201 | several stages to successfully suspending a device, which is denoted in |
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index 35c1751ea0b0..e3879f7625c2 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c | |||
@@ -548,7 +548,7 @@ static struct { | |||
548 | unsigned int apic_thmr; | 548 | unsigned int apic_thmr; |
549 | } apic_pm_state; | 549 | } apic_pm_state; |
550 | 550 | ||
551 | static int lapic_suspend(struct sys_device *dev, u32 state) | 551 | static int lapic_suspend(struct sys_device *dev, pm_message_t state) |
552 | { | 552 | { |
553 | unsigned long flags; | 553 | unsigned long flags; |
554 | 554 | ||
diff --git a/arch/i386/kernel/i8259.c b/arch/i386/kernel/i8259.c index 560bef1afb3b..2c4813b47e57 100644 --- a/arch/i386/kernel/i8259.c +++ b/arch/i386/kernel/i8259.c | |||
@@ -262,7 +262,7 @@ static int i8259A_resume(struct sys_device *dev) | |||
262 | return 0; | 262 | return 0; |
263 | } | 263 | } |
264 | 264 | ||
265 | static int i8259A_suspend(struct sys_device *dev, u32 state) | 265 | static int i8259A_suspend(struct sys_device *dev, pm_message_t state) |
266 | { | 266 | { |
267 | save_ELCR(irq_trigger); | 267 | save_ELCR(irq_trigger); |
268 | return 0; | 268 | return 0; |
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index 9c1350e811d0..5e0d55be5435 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c | |||
@@ -2299,7 +2299,7 @@ struct sysfs_ioapic_data { | |||
2299 | }; | 2299 | }; |
2300 | static struct sysfs_ioapic_data * mp_ioapic_data[MAX_IO_APICS]; | 2300 | static struct sysfs_ioapic_data * mp_ioapic_data[MAX_IO_APICS]; |
2301 | 2301 | ||
2302 | static int ioapic_suspend(struct sys_device *dev, u32 state) | 2302 | static int ioapic_suspend(struct sys_device *dev, pm_message_t state) |
2303 | { | 2303 | { |
2304 | struct IO_APIC_route_entry *entry; | 2304 | struct IO_APIC_route_entry *entry; |
2305 | struct sysfs_ioapic_data *data; | 2305 | struct sysfs_ioapic_data *data; |
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index f5b0c5081bd6..2f89d000f954 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c | |||
@@ -265,7 +265,7 @@ void enable_timer_nmi_watchdog(void) | |||
265 | 265 | ||
266 | static int nmi_pm_active; /* nmi_active before suspend */ | 266 | static int nmi_pm_active; /* nmi_active before suspend */ |
267 | 267 | ||
268 | static int lapic_nmi_suspend(struct sys_device *dev, u32 state) | 268 | static int lapic_nmi_suspend(struct sys_device *dev, pm_message_t state) |
269 | { | 269 | { |
270 | nmi_pm_active = nmi_active; | 270 | nmi_pm_active = nmi_active; |
271 | disable_lapic_nmi_watchdog(); | 271 | disable_lapic_nmi_watchdog(); |
diff --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c index 9b55e30e4490..4d75b373f90e 100644 --- a/arch/i386/kernel/time.c +++ b/arch/i386/kernel/time.c | |||
@@ -376,7 +376,7 @@ void notify_arch_cmos_timer(void) | |||
376 | 376 | ||
377 | static long clock_cmos_diff, sleep_start; | 377 | static long clock_cmos_diff, sleep_start; |
378 | 378 | ||
379 | static int timer_suspend(struct sys_device *dev, u32 state) | 379 | static int timer_suspend(struct sys_device *dev, pm_message_t state) |
380 | { | 380 | { |
381 | /* | 381 | /* |
382 | * Estimate time zone so that set_time can update the clock | 382 | * Estimate time zone so that set_time can update the clock |
diff --git a/arch/i386/oprofile/nmi_int.c b/arch/i386/oprofile/nmi_int.c index 3492d961d3f1..255e4702d185 100644 --- a/arch/i386/oprofile/nmi_int.c +++ b/arch/i386/oprofile/nmi_int.c | |||
@@ -32,7 +32,7 @@ static int nmi_enabled = 0; | |||
32 | 32 | ||
33 | #ifdef CONFIG_PM | 33 | #ifdef CONFIG_PM |
34 | 34 | ||
35 | static int nmi_suspend(struct sys_device *dev, u32 state) | 35 | static int nmi_suspend(struct sys_device *dev, pm_message_t state) |
36 | { | 36 | { |
37 | if (nmi_enabled == 1) | 37 | if (nmi_enabled == 1) |
38 | nmi_stop(); | 38 | nmi_stop(); |
diff --git a/drivers/base/sys.c b/drivers/base/sys.c index cff5a6a2c784..9102e3756f95 100644 --- a/drivers/base/sys.c +++ b/drivers/base/sys.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/string.h> | 22 | #include <linux/string.h> |
23 | #include <linux/pm.h> | ||
23 | 24 | ||
24 | 25 | ||
25 | extern struct subsystem devices_subsys; | 26 | extern struct subsystem devices_subsys; |
@@ -302,7 +303,7 @@ void sysdev_shutdown(void) | |||
302 | * all synchronization. | 303 | * all synchronization. |
303 | */ | 304 | */ |
304 | 305 | ||
305 | int sysdev_suspend(u32 state) | 306 | int sysdev_suspend(pm_message_t state) |
306 | { | 307 | { |
307 | struct sysdev_class * cls; | 308 | struct sysdev_class * cls; |
308 | 309 | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index bea13a99e6fb..3c89148ae28a 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -501,6 +501,7 @@ typedef int __bitwise pci_power_t; | |||
501 | #define PCI_D2 ((pci_power_t __force) 2) | 501 | #define PCI_D2 ((pci_power_t __force) 2) |
502 | #define PCI_D3hot ((pci_power_t __force) 3) | 502 | #define PCI_D3hot ((pci_power_t __force) 3) |
503 | #define PCI_D3cold ((pci_power_t __force) 4) | 503 | #define PCI_D3cold ((pci_power_t __force) 4) |
504 | #define PCI_POWER_ERROR ((pci_power_t __force) -1) | ||
504 | 505 | ||
505 | /* | 506 | /* |
506 | * The pci_dev structure is used to describe PCI devices. | 507 | * The pci_dev structure is used to describe PCI devices. |
@@ -669,7 +670,7 @@ struct pci_driver { | |||
669 | void (*remove) (struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */ | 670 | void (*remove) (struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */ |
670 | int (*suspend) (struct pci_dev *dev, pm_message_t state); /* Device suspended */ | 671 | int (*suspend) (struct pci_dev *dev, pm_message_t state); /* Device suspended */ |
671 | int (*resume) (struct pci_dev *dev); /* Device woken up */ | 672 | int (*resume) (struct pci_dev *dev); /* Device woken up */ |
672 | int (*enable_wake) (struct pci_dev *dev, u32 state, int enable); /* Enable wake event */ | 673 | int (*enable_wake) (struct pci_dev *dev, pci_power_t state, int enable); /* Enable wake event */ |
673 | 674 | ||
674 | struct device_driver driver; | 675 | struct device_driver driver; |
675 | struct pci_dynids dynids; | 676 | struct pci_dynids dynids; |
@@ -952,7 +953,7 @@ static inline const struct pci_device_id *pci_match_device(const struct pci_devi | |||
952 | static inline int pci_save_state(struct pci_dev *dev) { return 0; } | 953 | static inline int pci_save_state(struct pci_dev *dev) { return 0; } |
953 | static inline int pci_restore_state(struct pci_dev *dev) { return 0; } | 954 | static inline int pci_restore_state(struct pci_dev *dev) { return 0; } |
954 | static inline int pci_set_power_state(struct pci_dev *dev, pci_power_t state) { return 0; } | 955 | static inline int pci_set_power_state(struct pci_dev *dev, pci_power_t state) { return 0; } |
955 | static inline pci_power_t pci_choose_state(struct pci_dev *dev, u32 state) { return PCI_D0; } | 956 | static inline pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) { return PCI_D0; } |
956 | static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable) { return 0; } | 957 | static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable) { return 0; } |
957 | 958 | ||
958 | #define isa_bridge ((struct pci_dev *)NULL) | 959 | #define isa_bridge ((struct pci_dev *)NULL) |
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index 635db1df656f..2a4b432e1176 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #define _SYSDEV_H_ | 22 | #define _SYSDEV_H_ |
23 | 23 | ||
24 | #include <linux/kobject.h> | 24 | #include <linux/kobject.h> |
25 | #include <linux/pm.h> | ||
25 | 26 | ||
26 | 27 | ||
27 | struct sys_device; | 28 | struct sys_device; |
@@ -31,7 +32,7 @@ struct sysdev_class { | |||
31 | 32 | ||
32 | /* Default operations for these types of devices */ | 33 | /* Default operations for these types of devices */ |
33 | int (*shutdown)(struct sys_device *); | 34 | int (*shutdown)(struct sys_device *); |
34 | int (*suspend)(struct sys_device *, u32 state); | 35 | int (*suspend)(struct sys_device *, pm_message_t state); |
35 | int (*resume)(struct sys_device *); | 36 | int (*resume)(struct sys_device *); |
36 | struct kset kset; | 37 | struct kset kset; |
37 | }; | 38 | }; |
@@ -50,7 +51,7 @@ struct sysdev_driver { | |||
50 | int (*add)(struct sys_device *); | 51 | int (*add)(struct sys_device *); |
51 | int (*remove)(struct sys_device *); | 52 | int (*remove)(struct sys_device *); |
52 | int (*shutdown)(struct sys_device *); | 53 | int (*shutdown)(struct sys_device *); |
53 | int (*suspend)(struct sys_device *, u32 state); | 54 | int (*suspend)(struct sys_device *, pm_message_t state); |
54 | int (*resume)(struct sys_device *); | 55 | int (*resume)(struct sys_device *); |
55 | }; | 56 | }; |
56 | 57 | ||