patch-2.3.41 linux/include/linux/acpi.h

Next file: linux/include/linux/auto_fs.h
Previous file: linux/include/asm-sparc64/unistd.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.40/linux/include/linux/acpi.h linux/include/linux/acpi.h
@@ -24,7 +24,6 @@
 #include <linux/types.h>
 #include <linux/ioctl.h>
 #ifdef __KERNEL__
-#include <linux/config.h>
 #include <linux/sched.h>
 #include <linux/wait.h>
 #endif /* __KERNEL__ */
@@ -57,138 +56,9 @@
 
 typedef int acpi_dstate_t;
 
-/*
- * HID (PnP) values
- */
-enum
-{
-	ACPI_UNKNOWN_HID =  0x00000000, /* generic */
-	ACPI_KBC_HID =	    0x41d00303, /* keyboard controller */
-	ACPI_COM_HID =	    0x41d00500, /* serial port */
-	ACPI_FDC_HID =	    0x41d00700, /* floppy controller */
-	ACPI_VGA_HID =	    0x41d00900, /* VGA controller */
-	ACPI_ISA_HID =	    0x41d00a00, /* ISA bus */
-	ACPI_EISA_HID =	    0x41d00a01, /* EISA bus */
-	ACPI_PCI_HID =	    0x41d00a03, /* PCI bus */
-};
-
-typedef int acpi_hid_t;
-
 #ifdef __KERNEL__
 
-/*
- * Device types
- */
-enum
-{
-	ACPI_SYS_DEV,	/* system device (fan, KB controller, ...) */
-	ACPI_PCI_DEV,	/* generic PCI device */
-	ACPI_PCI_BUS,	/* PCI bus */
-	ACPI_ISA_DEV,	/* generic ISA device */
-	ACPI_ISA_BUS,	/* ISA bus */
-	ACPI_USB_DEV,	/* generic USB device */
-	ACPI_USB_HUB,	/* USB hub device */
-	ACPI_USB_CTRL,	/* USB controller */
-	ACPI_SCSI_DEV,	/* generic SCSI device */
-	ACPI_SCSI_CTRL, /* SCSI controller */
-};
-
-typedef int acpi_dev_t;
-
-/*
- * Device addresses
- */
-#define ACPI_PCI_ADR(dev) ((dev)->bus->number << 16 | (dev)->devfn)
-
-struct acpi_dev;
-
-/*
- * Device state transition function
- */
-typedef int (*acpi_transition)(struct acpi_dev *dev, acpi_dstate_t state);
-
-/*
- * Static device information
- */
-struct acpi_dev_info
-{
-	acpi_dev_t	 type;	     /* device type */
-	acpi_hid_t	 hid;	     /* PnP identifier */
-	acpi_transition	 transition; /* state transition callback */
-
-	/* other information like D-states supported,
-	 * D-state latencies, and in-rush current needs
-	 * will go here
-	 */
-};
-
-/*
- * Dynamic device information
- */
-struct acpi_dev
-{
-	struct acpi_dev_info info;     /* static device info */
-	unsigned long	     adr;      /* bus address or unique id */
-	acpi_dstate_t	     state;    /* current D-state */
-	unsigned long	     accessed; /* last access time */
-	unsigned long	     idle;     /* last idle time */
-	struct list_head     entry;    /* linked list entry */
-};
-
-#ifdef CONFIG_ACPI
-
-extern wait_queue_head_t acpi_control_wait;
-
-/*
- * Register a device with the ACPI subsystem
- */
-struct acpi_dev *acpi_register(struct acpi_dev_info *info, unsigned long adr);
-
-/*
- * Unregister a device with ACPI
- */
-void acpi_unregister(struct acpi_dev *dev);
-
-/*
- * Update device access time and wake up device, if necessary
- */
-extern inline void acpi_access(struct acpi_dev *dev)
-{
-	extern void acpi_wakeup(struct acpi_dev*);
-	if (dev) {
-		if (dev->state != ACPI_D0)
-			acpi_wakeup(dev);
-		dev->accessed = jiffies;
-	}
-}
-
-/*
- * Identify device as currently being idle
- */
-extern inline void acpi_dev_idle(struct acpi_dev *dev)
-{
-	if (dev) {
-		dev->idle = jiffies;
-		if (waitqueue_active(&acpi_control_wait))
-			wake_up(&acpi_control_wait);
-	}
-}
-
 extern int acpi_active;
-
-#else /* CONFIG_ACPI */
-
-extern inline struct acpi_dev*
-acpi_register(struct acpi_dev_info *info, unsigned long adr)
-{
-	return 0;
-}
-
-extern inline void acpi_unregister(struct acpi_dev *dev) {}
-extern inline void acpi_access(struct acpi_dev *dev) {}
-extern inline void acpi_dev_idle(struct acpi_dev *dev) {}
-
-#endif /* CONFIG_ACPI */
 
 extern void (*acpi_idle)(void);
 extern void (*acpi_power_off)(void);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)