summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2003-08-23 14:36:05 +1000
committerPaul Mackerras <paulus@samba.org>2003-08-23 14:36:05 +1000
commit2133514e3d07ddc9dd241306d8fb5b46e9ed7f1e (patch)
treed46d685364b640410c0629bd8968c5c323d9595d /include/linux
parent1f068b65e4125ccaad04ddadd14d24743ec08d4b (diff)
parent612344a8d26dfb4a2385f1b94396a428f5964fb2 (diff)
Merge samba.org:/stuff/paulus/kernel/linux-2.5
into samba.org:/stuff/paulus/kernel/for-linus-ppc
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acpi.h12
-rw-r--r--include/linux/device.h5
-rw-r--r--include/linux/ide.h2
-rw-r--r--include/linux/oprofile.h2
-rw-r--r--include/linux/pkt_sched.h2
-rw-r--r--include/linux/pm.h45
-rw-r--r--include/linux/suspend.h31
-rw-r--r--include/linux/sysdev.h4
8 files changed, 58 insertions, 45 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 3fd526160f1a..94a0f27e331c 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -373,6 +373,11 @@ extern int acpi_mp_config;
#define acpi_mp_config 0
+static inline int acpi_boot_init(void)
+{
+ return 0;
+}
+
#endif /*!CONFIG_ACPI_BOOT*/
@@ -423,6 +428,13 @@ int ec_write(u8 addr, u8 val);
int acpi_blacklisted(void);
+#else
+
+static inline int acpi_blacklisted(void)
+{
+ return 0;
+}
+
#endif /*CONFIG_ACPI*/
#endif /*_LINUX_ACPI_H*/
diff --git a/include/linux/device.h b/include/linux/device.h
index 7b49400adf31..8d6266f2e3c3 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -58,7 +58,8 @@ struct bus_type {
struct device * (*add) (struct device * parent, char * bus_id);
int (*hotplug) (struct device *dev, char **envp,
int num_envp, char *buffer, int buffer_size);
-
+ int (*suspend)(struct device * dev, u32 state);
+ int (*resume)(struct device * dev);
};
extern int bus_register(struct bus_type * bus);
@@ -372,8 +373,6 @@ extern struct bus_type platform_bus_type;
extern struct device legacy_bus;
/* drivers/base/power.c */
-extern int device_suspend(u32 state, u32 level);
-extern void device_resume(u32 level);
extern void device_shutdown(void);
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 82ca6da75b3f..a3ee36b438ca 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1241,8 +1241,6 @@ typedef struct ide_driver_s {
#define DRIVER(drive) ((drive)->driver)
extern int generic_ide_ioctl(struct block_device *, unsigned, unsigned long);
-extern int generic_ide_suspend(struct device *dev, u32 state, u32 level);
-extern int generic_ide_resume(struct device *dev, u32 level);
/*
* IDE modules.
diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h
index c2b4fd735f40..9555dd4d69fc 100644
--- a/include/linux/oprofile.h
+++ b/include/linux/oprofile.h
@@ -92,7 +92,7 @@ ssize_t oprofilefs_str_to_user(char const * str, char * buf, size_t count, loff_
* Convert an unsigned long value into ASCII and copy it to the user buffer @buf,
* updating *offset appropriately. Returns bytes written or -EFAULT.
*/
-ssize_t oprofilefs_ulong_to_user(unsigned long * val, char * buf, size_t count, loff_t * offset);
+ssize_t oprofilefs_ulong_to_user(unsigned long val, char * buf, size_t count, loff_t * offset);
/**
* Read an ASCII string for a number from a userspace buffer and fill *val on success.
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
index fec8ad62b567..d97edad0effc 100644
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -45,7 +45,7 @@ struct tc_stats
struct tc_estimator
{
- char interval;
+ signed char interval;
unsigned char ewma_log;
};
diff --git a/include/linux/pm.h b/include/linux/pm.h
index e4c795f71cea..3017bdef5f03 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -186,9 +186,46 @@ static inline void pm_dev_idle(struct pm_dev *dev) {}
#endif /* CONFIG_PM */
+
+/*
+ * Callbacks for platform drivers to implement.
+ */
extern void (*pm_idle)(void);
extern void (*pm_power_off)(void);
+enum {
+ PM_SUSPEND_ON,
+ PM_SUSPEND_STANDBY,
+ PM_SUSPEND_MEM,
+ PM_SUSPEND_DISK,
+ PM_SUSPEND_MAX,
+};
+
+enum {
+ PM_DISK_FIRMWARE = 1,
+ PM_DISK_PLATFORM,
+ PM_DISK_SHUTDOWN,
+ PM_DISK_REBOOT,
+ PM_DISK_MAX,
+};
+
+
+struct pm_ops {
+ u32 pm_disk_mode;
+ int (*prepare)(u32 state);
+ int (*enter)(u32 state);
+ int (*finish)(u32 state);
+};
+
+extern void pm_set_ops(struct pm_ops *);
+
+extern int pm_suspend(u32 state);
+
+
+/*
+ * Device power management
+ */
+
struct device;
struct dev_pm_info {
@@ -203,10 +240,10 @@ struct dev_pm_info {
extern void device_pm_set_parent(struct device * dev, struct device * parent);
-extern int device_pm_suspend(u32 state);
-extern int device_pm_power_down(u32 state);
-extern void device_pm_power_up(void);
-extern void device_pm_resume(void);
+extern int device_suspend(u32 state);
+extern int device_power_down(u32 state);
+extern void device_power_up(void);
+extern void device_resume(void);
#endif /* __KERNEL__ */
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index 28788d8a65ff..132db86c961a 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -8,8 +8,7 @@
#include <linux/notifier.h>
#include <linux/config.h>
#include <linux/init.h>
-
-extern unsigned char software_suspend_enabled;
+#include <linux/pm.h>
#ifdef CONFIG_SOFTWARE_SUSPEND
/* page backup entry */
@@ -46,22 +45,9 @@ extern int shrink_mem(void);
/* mm/page_alloc.c */
extern void drain_local_pages(void);
-/* kernel/suspend.c */
-extern int software_suspend(void);
-
-extern int register_suspend_notifier(struct notifier_block *);
-extern int unregister_suspend_notifier(struct notifier_block *);
-
extern unsigned int nr_copy_pages __nosavedata;
extern suspend_pagedir_t *pagedir_nosave __nosavedata;
-/* Communication between kernel/suspend.c and arch/i386/suspend.c */
-
-extern void do_magic_resume_1(void);
-extern void do_magic_resume_2(void);
-extern void do_magic_suspend_1(void);
-extern void do_magic_suspend_2(void);
-
/* Communication between acpi and arch/i386/suspend.c */
extern void do_suspend_lowlevel(int resume);
@@ -72,32 +58,17 @@ static inline int software_suspend(void)
{
return -EPERM;
}
-#define register_suspend_notifier(a) do { } while(0)
-#define unregister_suspend_notifier(a) do { } while(0)
#endif /* CONFIG_SOFTWARE_SUSPEND */
#ifdef CONFIG_PM
extern void refrigerator(unsigned long);
-extern int freeze_processes(void);
-extern void thaw_processes(void);
-
-extern int pm_prepare_console(void);
-extern void pm_restore_console(void);
#else
static inline void refrigerator(unsigned long flag)
{
}
-static inline int freeze_processes(void)
-{
- return 0;
-}
-static inline void thaw_processes(void)
-{
-
-}
#endif /* CONFIG_PM */
#endif /* _LINUX_SWSUSP_H */
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h
index 4bc3e22b5104..2a90db8d41de 100644
--- a/include/linux/sysdev.h
+++ b/include/linux/sysdev.h
@@ -31,10 +31,8 @@ struct sysdev_class {
/* Default operations for these types of devices */
int (*shutdown)(struct sys_device *);
- int (*save)(struct sys_device *, u32 state);
int (*suspend)(struct sys_device *, u32 state);
int (*resume)(struct sys_device *);
- int (*restore)(struct sys_device *);
struct kset kset;
};
@@ -52,10 +50,8 @@ struct sysdev_driver {
int (*add)(struct sys_device *);
int (*remove)(struct sys_device *);
int (*shutdown)(struct sys_device *);
- int (*save)(struct sys_device *, u32 state);
int (*suspend)(struct sys_device *, u32 state);
int (*resume)(struct sys_device *);
- int (*restore)(struct sys_device *);
};