summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/acpi_bus.h21
-rw-r--r--drivers/acpi/acpi_drivers.h4
-rw-r--r--drivers/acpi/battery.c24
-rw-r--r--drivers/acpi/bus.c6
-rw-r--r--drivers/acpi/button.c73
-rw-r--r--drivers/acpi/dispatcher/dsfield.c76
-rw-r--r--drivers/acpi/dispatcher/dsinit.c34
-rw-r--r--drivers/acpi/dispatcher/dsmethod.c60
-rw-r--r--drivers/acpi/dispatcher/dsmthdat.c94
-rw-r--r--drivers/acpi/dispatcher/dsobject.c86
-rw-r--r--drivers/acpi/dispatcher/dsopcode.c128
-rw-r--r--drivers/acpi/dispatcher/dsutils.c64
-rw-r--r--drivers/acpi/dispatcher/dswexec.c34
-rw-r--r--drivers/acpi/dispatcher/dswload.c60
-rw-r--r--drivers/acpi/dispatcher/dswscope.c22
-rw-r--r--drivers/acpi/dispatcher/dswstate.c138
-rw-r--r--drivers/acpi/ec.c24
-rw-r--r--drivers/acpi/events/evevent.c20
-rw-r--r--drivers/acpi/events/evgpe.c84
-rw-r--r--drivers/acpi/events/evmisc.c56
-rw-r--r--drivers/acpi/events/evregion.c86
-rw-r--r--drivers/acpi/events/evrgnini.c92
-rw-r--r--drivers/acpi/events/evsci.c14
-rw-r--r--drivers/acpi/events/evxface.c76
-rw-r--r--drivers/acpi/events/evxfevnt.c40
-rw-r--r--drivers/acpi/events/evxfregn.c42
-rw-r--r--drivers/acpi/executer/exconfig.c72
-rw-r--r--drivers/acpi/executer/exconvrt.c86
-rw-r--r--drivers/acpi/executer/excreate.c100
-rw-r--r--drivers/acpi/executer/exdump.c64
-rw-r--r--drivers/acpi/executer/exfield.c38
-rw-r--r--drivers/acpi/executer/exfldio.c116
-rw-r--r--drivers/acpi/executer/exmisc.c62
-rw-r--r--drivers/acpi/executer/exmutex.c34
-rw-r--r--drivers/acpi/executer/exnames.c44
-rw-r--r--drivers/acpi/executer/exoparg1.c56
-rw-r--r--drivers/acpi/executer/exoparg2.c46
-rw-r--r--drivers/acpi/executer/exoparg3.c26
-rw-r--r--drivers/acpi/executer/exoparg6.c20
-rw-r--r--drivers/acpi/executer/exprep.c42
-rw-r--r--drivers/acpi/executer/exregion.c108
-rw-r--r--drivers/acpi/executer/exresnte.c20
-rw-r--r--drivers/acpi/executer/exresolv.c46
-rw-r--r--drivers/acpi/executer/exresop.c34
-rw-r--r--drivers/acpi/executer/exstore.c44
-rw-r--r--drivers/acpi/executer/exstoren.c24
-rw-r--r--drivers/acpi/executer/exstorob.c18
-rw-r--r--drivers/acpi/executer/exsystem.c44
-rw-r--r--drivers/acpi/executer/exutils.c46
-rw-r--r--drivers/acpi/hardware/hwacpi.c14
-rw-r--r--drivers/acpi/hardware/hwgpe.c72
-rw-r--r--drivers/acpi/hardware/hwregs.c106
-rw-r--r--drivers/acpi/hardware/hwsleep.c32
-rw-r--r--drivers/acpi/hardware/hwtimer.c22
-rw-r--r--drivers/acpi/include/acconfig.h4
-rw-r--r--drivers/acpi/include/acdebug.h222
-rw-r--r--drivers/acpi/include/acdispat.h370
-rw-r--r--drivers/acpi/include/acevents.h102
-rw-r--r--drivers/acpi/include/acexcep.h2
-rw-r--r--drivers/acpi/include/acglobal.h208
-rw-r--r--drivers/acpi/include/achware.h62
-rw-r--r--drivers/acpi/include/acinterp.h546
-rw-r--r--drivers/acpi/include/aclocal.h671
-rw-r--r--drivers/acpi/include/acmacros.h16
-rw-r--r--drivers/acpi/include/acnamesp.h326
-rw-r--r--drivers/acpi/include/acobject.h419
-rw-r--r--drivers/acpi/include/acoutput.h2
-rw-r--r--drivers/acpi/include/acparser.h216
-rw-r--r--drivers/acpi/include/acpi.h2
-rw-r--r--drivers/acpi/include/acpiosxf.h168
-rw-r--r--drivers/acpi/include/acpixf.h258
-rw-r--r--drivers/acpi/include/acresrc.h304
-rw-r--r--drivers/acpi/include/acstruct.h190
-rw-r--r--drivers/acpi/include/actables.h110
-rw-r--r--drivers/acpi/include/actbl.h158
-rw-r--r--drivers/acpi/include/actbl1.h134
-rw-r--r--drivers/acpi/include/actbl2.h197
-rw-r--r--drivers/acpi/include/actbl71.h140
-rw-r--r--drivers/acpi/include/actypes.h668
-rw-r--r--drivers/acpi/include/acutils.h532
-rw-r--r--drivers/acpi/include/amlcode.h2
-rw-r--r--drivers/acpi/include/amlresrc.h351
-rw-r--r--drivers/acpi/include/platform/acenv.h2
-rw-r--r--drivers/acpi/include/platform/acgcc.h2
-rw-r--r--drivers/acpi/include/platform/aclinux.h2
-rw-r--r--drivers/acpi/namespace/nsaccess.c48
-rw-r--r--drivers/acpi/namespace/nsalloc.c74
-rw-r--r--drivers/acpi/namespace/nsdump.c70
-rw-r--r--drivers/acpi/namespace/nsdumpdv.c20
-rw-r--r--drivers/acpi/namespace/nseval.c64
-rw-r--r--drivers/acpi/namespace/nsinit.c48
-rw-r--r--drivers/acpi/namespace/nsload.c36
-rw-r--r--drivers/acpi/namespace/nsnames.c34
-rw-r--r--drivers/acpi/namespace/nsobject.c62
-rw-r--r--drivers/acpi/namespace/nsparse.c18
-rw-r--r--drivers/acpi/namespace/nssearch.c44
-rw-r--r--drivers/acpi/namespace/nsutils.c138
-rw-r--r--drivers/acpi/namespace/nswalk.c38
-rw-r--r--drivers/acpi/namespace/nsxfeval.c112
-rw-r--r--drivers/acpi/namespace/nsxfname.c40
-rw-r--r--drivers/acpi/namespace/nsxfobj.c34
-rw-r--r--drivers/acpi/osl.c163
-rw-r--r--drivers/acpi/parser/psargs.c76
-rw-r--r--drivers/acpi/parser/psopcode.c12
-rw-r--r--drivers/acpi/parser/psparse.c62
-rw-r--r--drivers/acpi/parser/psscope.c38
-rw-r--r--drivers/acpi/parser/pstree.c38
-rw-r--r--drivers/acpi/parser/psutils.c44
-rw-r--r--drivers/acpi/parser/pswalk.c28
-rw-r--r--drivers/acpi/parser/psxface.c18
-rw-r--r--drivers/acpi/pci_bind.c10
-rw-r--r--drivers/acpi/pci_irq.c22
-rw-r--r--drivers/acpi/pci_link.c28
-rw-r--r--drivers/acpi/pci_root.c28
-rw-r--r--drivers/acpi/power.c4
-rw-r--r--drivers/acpi/processor.c85
-rw-r--r--drivers/acpi/resources/rsaddr.c116
-rw-r--r--drivers/acpi/resources/rscalc.c100
-rw-r--r--drivers/acpi/resources/rscreate.c60
-rw-r--r--drivers/acpi/resources/rsdump.c84
-rw-r--r--drivers/acpi/resources/rsio.c96
-rw-r--r--drivers/acpi/resources/rsirq.c78
-rw-r--r--drivers/acpi/resources/rslist.c44
-rw-r--r--drivers/acpi/resources/rsmemory.c92
-rw-r--r--drivers/acpi/resources/rsmisc.c104
-rw-r--r--drivers/acpi/resources/rsutils.c36
-rw-r--r--drivers/acpi/resources/rsxface.c26
-rw-r--r--drivers/acpi/scan.c16
-rw-r--r--drivers/acpi/system.c4
-rw-r--r--drivers/acpi/tables/tbconvrt.c56
-rw-r--r--drivers/acpi/tables/tbget.c68
-rw-r--r--drivers/acpi/tables/tbgetall.c30
-rw-r--r--drivers/acpi/tables/tbinstal.c56
-rw-r--r--drivers/acpi/tables/tbrsdt.c34
-rw-r--r--drivers/acpi/tables/tbutils.c38
-rw-r--r--drivers/acpi/tables/tbxface.c48
-rw-r--r--drivers/acpi/tables/tbxfroot.c72
-rw-r--r--drivers/acpi/thermal.c4
-rw-r--r--drivers/acpi/toshiba_acpi.c12
-rw-r--r--drivers/acpi/utilities/utalloc.c154
-rw-r--r--drivers/acpi/utilities/utcopy.c160
-rw-r--r--drivers/acpi/utilities/utdebug.c84
-rw-r--r--drivers/acpi/utilities/utdelete.c42
-rw-r--r--drivers/acpi/utilities/uteval.c58
-rw-r--r--drivers/acpi/utilities/utglobal.c98
-rw-r--r--drivers/acpi/utilities/utinit.c8
-rw-r--r--drivers/acpi/utilities/utmath.c58
-rw-r--r--drivers/acpi/utilities/utmisc.c206
-rw-r--r--drivers/acpi/utilities/utobject.c84
-rw-r--r--drivers/acpi/utilities/utxface.c30
-rw-r--r--drivers/acpi/utils.c28
-rw-r--r--drivers/hotplug/acpiphp_glue.c46
-rw-r--r--drivers/input/mouse/psmouse.c2
-rw-r--r--drivers/serial/21285.c55
-rw-r--r--drivers/serial/8250.c60
-rw-r--r--drivers/serial/amba.c43
-rw-r--r--drivers/serial/anakin.c33
-rw-r--r--drivers/serial/clps711x.c45
-rw-r--r--drivers/serial/core.c158
-rw-r--r--drivers/serial/mux.c13
-rw-r--r--drivers/serial/nb85e_uart.c14
-rw-r--r--drivers/serial/sa1100.c69
-rw-r--r--drivers/serial/sunsab.c27
-rw-r--r--drivers/serial/sunsu.c36
-rw-r--r--drivers/serial/sunzilog.c149
-rw-r--r--drivers/serial/uart00.c46
-rw-r--r--drivers/usb/class/usblp.c3
-rw-r--r--drivers/usb/core/hcd-pci.c16
-rw-r--r--drivers/usb/core/hcd.c34
-rw-r--r--drivers/usb/core/hub.c70
-rw-r--r--drivers/usb/core/usb-debug.c2
-rw-r--r--drivers/usb/core/usb.c38
-rw-r--r--drivers/usb/host/ehci-dbg.c32
-rw-r--r--drivers/usb/host/ehci-hcd.c11
-rw-r--r--drivers/usb/host/ehci-q.c19
-rw-r--r--drivers/usb/host/ehci.h2
-rw-r--r--drivers/usb/host/ohci-dbg.c35
-rw-r--r--drivers/usb/host/ohci-hcd.c10
-rw-r--r--drivers/usb/host/ohci-hub.c2
-rw-r--r--drivers/usb/host/ohci-mem.c2
-rw-r--r--drivers/usb/host/ohci-q.c4
-rw-r--r--drivers/usb/image/Kconfig4
-rw-r--r--drivers/usb/image/mdc800.c4
-rw-r--r--drivers/usb/image/scanner.c171
-rw-r--r--drivers/usb/image/scanner.h24
-rw-r--r--drivers/usb/input/pid.c45
-rw-r--r--drivers/usb/misc/Makefile6
-rw-r--r--drivers/usb/misc/atmsar.c171
-rw-r--r--drivers/usb/misc/atmsar.h27
-rw-r--r--drivers/usb/misc/auerswald.c7
-rw-r--r--drivers/usb/misc/brlvger.c21
-rw-r--r--drivers/usb/misc/rio500.c5
-rw-r--r--drivers/usb/misc/speedtouch.c80
-rw-r--r--drivers/usb/misc/usbtest.c306
-rw-r--r--drivers/usb/net/kaweth.c8
-rw-r--r--drivers/usb/net/pegasus.c5
-rw-r--r--drivers/usb/net/pegasus.h4
-rw-r--r--drivers/usb/net/rtl8150.c5
-rw-r--r--drivers/usb/net/usbnet.c22
-rw-r--r--drivers/usb/serial/bus.c9
-rw-r--r--drivers/usb/serial/empeg.c12
-rw-r--r--drivers/usb/serial/ezusb.c4
-rw-r--r--drivers/usb/serial/generic.c6
-rw-r--r--drivers/usb/serial/io_edgeport.c38
-rw-r--r--drivers/usb/serial/io_ti.c58
-rw-r--r--drivers/usb/serial/ir-usb.c16
-rw-r--r--drivers/usb/serial/keyspan.c6
-rw-r--r--drivers/usb/serial/pl2303.c18
-rw-r--r--drivers/usb/serial/usb-serial.c38
-rw-r--r--drivers/usb/serial/usb-serial.h2
-rw-r--r--drivers/usb/serial/visor.c48
-rw-r--r--drivers/usb/serial/whiteheat.c4
-rw-r--r--drivers/usb/storage/freecom.c4
-rw-r--r--drivers/usb/storage/transport.c307
-rw-r--r--drivers/usb/storage/transport.h1
-rw-r--r--drivers/usb/storage/unusual_devs.h22
216 files changed, 7789 insertions, 7895 deletions
diff --git a/drivers/acpi/acpi_bus.h b/drivers/acpi/acpi_bus.h
index 50c8374094e6..21d6a65730b9 100644
--- a/drivers/acpi/acpi_bus.h
+++ b/drivers/acpi/acpi_bus.h
@@ -44,9 +44,24 @@ struct acpi_handle_list {
/* acpi_utils.h */
-acpi_status acpi_extract_package (acpi_object *, acpi_buffer *, acpi_buffer *);
-acpi_status acpi_evaluate_integer (acpi_handle, acpi_string, acpi_object_list *, unsigned long *);
-acpi_status acpi_evaluate_reference (acpi_handle, acpi_string, acpi_object_list *, struct acpi_handle_list *);
+acpi_status
+acpi_extract_package (
+ union acpi_object *package,
+ struct acpi_buffer *format,
+ struct acpi_buffer *buffer);
+acpi_status
+acpi_evaluate_integer (
+ acpi_handle handle,
+ acpi_string pathname,
+ struct acpi_object_list *arguments,
+ unsigned long *data);
+acpi_status
+acpi_evaluate_reference (
+ acpi_handle handle,
+ acpi_string pathname,
+ struct acpi_object_list *arguments,
+ struct acpi_handle_list *list);
+
#ifdef CONFIG_ACPI_BUS
diff --git a/drivers/acpi/acpi_drivers.h b/drivers/acpi/acpi_drivers.h
index ae17b0bf16a3..cf179697bb8e 100644
--- a/drivers/acpi/acpi_drivers.h
+++ b/drivers/acpi/acpi_drivers.h
@@ -55,7 +55,7 @@
/* ACPI PCI Root Bridge (pci_root.c) */
-void acpi_pci_get_translations (acpi_pci_id* id, u64* mem_tra, u64* io_tra);
+void acpi_pci_get_translations (struct acpi_pci_id* id, u64* mem_tra, u64* io_tra);
/* ACPI PCI Interrupt Link (pci_link.c) */
@@ -71,7 +71,7 @@ int acpi_pci_irq_add_prt (acpi_handle handle, int segment, int bus);
struct pci_bus;
int acpi_pci_bind (struct acpi_device *device);
-int acpi_pci_bind_root (struct acpi_device *device, acpi_pci_id *id, struct pci_bus *bus);
+int acpi_pci_bind_root (struct acpi_device *device, struct acpi_pci_id *id, struct pci_bus *bus);
#endif /*CONFIG_ACPI_PCI*/
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index c821ef4c35ac..da494066f340 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -127,11 +127,11 @@ acpi_battery_get_info (
{
int result = 0;
acpi_status status = 0;
- acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
- acpi_buffer format = {sizeof(ACPI_BATTERY_FORMAT_BIF),
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ struct acpi_buffer format = {sizeof(ACPI_BATTERY_FORMAT_BIF),
ACPI_BATTERY_FORMAT_BIF};
- acpi_buffer data = {0, NULL};
- acpi_object *package = NULL;
+ struct acpi_buffer data = {0, NULL};
+ union acpi_object *package = NULL;
ACPI_FUNCTION_TRACE("acpi_battery_get_info");
@@ -146,7 +146,7 @@ acpi_battery_get_info (
return_VALUE(-ENODEV);
}
- package = (acpi_object *) buffer.pointer;
+ package = (union acpi_object *) buffer.pointer;
/* Extract Package Data */
@@ -188,11 +188,11 @@ acpi_battery_get_status (
{
int result = 0;
acpi_status status = 0;
- acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
- acpi_buffer format = {sizeof(ACPI_BATTERY_FORMAT_BST),
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ struct acpi_buffer format = {sizeof(ACPI_BATTERY_FORMAT_BST),
ACPI_BATTERY_FORMAT_BST};
- acpi_buffer data = {0, NULL};
- acpi_object *package = NULL;
+ struct acpi_buffer data = {0, NULL};
+ union acpi_object *package = NULL;
ACPI_FUNCTION_TRACE("acpi_battery_get_status");
@@ -207,7 +207,7 @@ acpi_battery_get_status (
return_VALUE(-ENODEV);
}
- package = (acpi_object *) buffer.pointer;
+ package = (union acpi_object *) buffer.pointer;
/* Extract Package Data */
@@ -249,8 +249,8 @@ acpi_battery_set_alarm (
unsigned long alarm)
{
acpi_status status = 0;
- acpi_object arg0 = {ACPI_TYPE_INTEGER};
- acpi_object_list arg_list = {1, &arg0};
+ union acpi_object arg0 = {ACPI_TYPE_INTEGER};
+ struct acpi_object_list arg_list = {1, &arg0};
ACPI_FUNCTION_TRACE("acpi_battery_set_alarm");
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index f03962c634d9..4d0d271a3700 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -540,8 +540,8 @@ static int __init
acpi_bus_init_irq (void)
{
acpi_status status = AE_OK;
- acpi_object arg = {ACPI_TYPE_INTEGER};
- acpi_object_list arg_list = {1, &arg};
+ union acpi_object arg = {ACPI_TYPE_INTEGER};
+ struct acpi_object_list arg_list = {1, &arg};
char *message = NULL;
ACPI_FUNCTION_TRACE("acpi_bus_init_irq");
@@ -585,7 +585,7 @@ acpi_bus_init (void)
{
int result = 0;
acpi_status status = AE_OK;
- acpi_buffer buffer = {sizeof(acpi_fadt), &acpi_fadt};
+ struct acpi_buffer buffer = {sizeof(acpi_fadt), &acpi_fadt};
ACPI_FUNCTION_TRACE("acpi_bus_init");
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index ef82cf991c91..efbbcf365f6d 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -38,6 +38,7 @@
#define ACPI_BUTTON_DRIVER_NAME "ACPI Button Driver"
#define ACPI_BUTTON_CLASS "button"
#define ACPI_BUTTON_FILE_INFO "info"
+#define ACPI_BUTTON_FILE_STATE "state"
#define ACPI_BUTTON_TYPE_UNKNOWN 0x00
#define ACPI_BUTTON_NOTIFY_STATUS 0x80
@@ -68,9 +69,10 @@ MODULE_DESCRIPTION(ACPI_BUTTON_DRIVER_NAME);
MODULE_LICENSE("GPL");
-int acpi_button_add (struct acpi_device *device);
-int acpi_button_remove (struct acpi_device *device, int type);
-static int acpi_button_open_fs(struct inode *inode, struct file *file);
+static int acpi_button_add (struct acpi_device *device);
+static int acpi_button_remove (struct acpi_device *device, int type);
+static int acpi_button_info_open_fs(struct inode *inode, struct file *file);
+static int acpi_button_state_open_fs(struct inode *inode, struct file *file);
static struct acpi_driver acpi_button_driver = {
.name = ACPI_BUTTON_DRIVER_NAME,
@@ -89,24 +91,30 @@ struct acpi_button {
unsigned long pushed;
};
-static struct file_operations acpi_button_fops = {
- .open = acpi_button_open_fs,
+static struct file_operations acpi_button_info_fops = {
+ .open = acpi_button_info_open_fs,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
+static struct file_operations acpi_button_state_fops = {
+ .open = acpi_button_state_open_fs,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
/* --------------------------------------------------------------------------
FS Interface (/proc)
-------------------------------------------------------------------------- */
static struct proc_dir_entry *acpi_button_dir = NULL;
-static int acpi_button_seq_show(struct seq_file *seq, void *offset)
+static int acpi_button_info_seq_show(struct seq_file *seq, void *offset)
{
struct acpi_button *button = (struct acpi_button *) seq->private;
- ACPI_FUNCTION_TRACE("acpi_button_seq_show");
+ ACPI_FUNCTION_TRACE("acpi_button_info_seq_show");
if (!button || !button->device)
return 0;
@@ -117,11 +125,38 @@ static int acpi_button_seq_show(struct seq_file *seq, void *offset)
return 0;
}
-static int acpi_button_open_fs(struct inode *inode, struct file *file)
+static int acpi_button_info_open_fs(struct inode *inode, struct file *file)
{
- return single_open(file, acpi_button_seq_show, PDE(inode)->data);
+ return single_open(file, acpi_button_info_seq_show, PDE(inode)->data);
}
+static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
+{
+ struct acpi_button *button = (struct acpi_button *) seq->private;
+ acpi_status status;
+ unsigned long state;
+
+ ACPI_FUNCTION_TRACE("acpi_button_state_seq_show");
+
+ if (!button || !button->device)
+ return 0;
+
+ status = acpi_evaluate_integer(button->handle,"_LID",NULL,&state);
+ if (ACPI_FAILURE(status)) {
+ seq_printf(seq, "state: unsupported\n");
+ }
+ else{
+ seq_printf(seq, "state: %s\n", (state ? "open" : "closed"));
+ }
+
+ return 0;
+}
+
+static int acpi_button_state_open_fs(struct inode *inode, struct file *file)
+{
+ return single_open(file, acpi_button_state_seq_show, PDE(inode)->data);
+}
+
static int
acpi_button_add_fs (
struct acpi_device *device)
@@ -165,10 +200,24 @@ acpi_button_add_fs (
"Unable to create '%s' fs entry\n",
ACPI_BUTTON_FILE_INFO));
else {
- entry->proc_fops = &acpi_button_fops;
+ entry->proc_fops = &acpi_button_info_fops;
entry->data = acpi_driver_data(device);
}
+ /* show lid state [R] */
+ if (button->type == ACPI_BUTTON_TYPE_LID) {
+ entry = create_proc_entry(ACPI_BUTTON_FILE_STATE,
+ S_IRUGO, acpi_device_dir(device));
+ if (!entry)
+ ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
+ "Unable to create '%s' fs entry\n",
+ ACPI_BUTTON_FILE_INFO));
+ else {
+ entry->proc_fops = &acpi_button_state_fops;
+ entry->data = acpi_driver_data(device);
+ }
+ }
+
return_VALUE(0);
}
@@ -236,7 +285,7 @@ acpi_button_notify_fixed (
}
-int
+static int
acpi_button_add (
struct acpi_device *device)
{
@@ -386,7 +435,7 @@ end:
}
-int
+static int
acpi_button_remove (struct acpi_device *device, int type)
{
acpi_status status = 0;
diff --git a/drivers/acpi/dispatcher/dsfield.c b/drivers/acpi/dispatcher/dsfield.c
index 1aea76688958..ba7460856d7d 100644
--- a/drivers/acpi/dispatcher/dsfield.c
+++ b/drivers/acpi/dispatcher/dsfield.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -57,15 +57,15 @@
acpi_status
acpi_ds_create_buffer_field (
- acpi_parse_object *op,
- acpi_walk_state *walk_state)
+ union acpi_parse_object *op,
+ struct acpi_walk_state *walk_state)
{
- acpi_parse_object *arg;
- acpi_namespace_node *node;
- acpi_status status;
- acpi_operand_object *obj_desc;
- acpi_operand_object *second_desc = NULL;
- u32 flags;
+ union acpi_parse_object *arg;
+ struct acpi_namespace_node *node;
+ acpi_status status;
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object *second_desc = NULL;
+ u32 flags;
ACPI_FUNCTION_TRACE ("ds_create_buffer_field");
@@ -182,12 +182,12 @@ cleanup:
acpi_status
acpi_ds_get_field_names (
- acpi_create_field_info *info,
- acpi_walk_state *walk_state,
- acpi_parse_object *arg)
+ struct acpi_create_field_info *info,
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *arg)
{
- acpi_status status;
- acpi_integer position;
+ acpi_status status;
+ acpi_integer position;
ACPI_FUNCTION_TRACE_PTR ("ds_get_field_names", info);
@@ -309,13 +309,13 @@ acpi_ds_get_field_names (
acpi_status
acpi_ds_create_field (
- acpi_parse_object *op,
- acpi_namespace_node *region_node,
- acpi_walk_state *walk_state)
+ union acpi_parse_object *op,
+ struct acpi_namespace_node *region_node,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_parse_object *arg;
- acpi_create_field_info info;
+ acpi_status status;
+ union acpi_parse_object *arg;
+ struct acpi_create_field_info info;
ACPI_FUNCTION_TRACE_PTR ("ds_create_field", op);
@@ -368,13 +368,13 @@ acpi_ds_create_field (
acpi_status
acpi_ds_init_field_objects (
- acpi_parse_object *op,
- acpi_walk_state *walk_state)
+ union acpi_parse_object *op,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_parse_object *arg = NULL;
- acpi_namespace_node *node;
- u8 type = 0;
+ acpi_status status;
+ union acpi_parse_object *arg = NULL;
+ struct acpi_namespace_node *node;
+ u8 type = 0;
ACPI_FUNCTION_TRACE_PTR ("ds_init_field_objects", op);
@@ -451,13 +451,13 @@ acpi_ds_init_field_objects (
acpi_status
acpi_ds_create_bank_field (
- acpi_parse_object *op,
- acpi_namespace_node *region_node,
- acpi_walk_state *walk_state)
+ union acpi_parse_object *op,
+ struct acpi_namespace_node *region_node,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_parse_object *arg;
- acpi_create_field_info info;
+ acpi_status status;
+ union acpi_parse_object *arg;
+ struct acpi_create_field_info info;
ACPI_FUNCTION_TRACE_PTR ("ds_create_bank_field", op);
@@ -524,13 +524,13 @@ acpi_ds_create_bank_field (
acpi_status
acpi_ds_create_index_field (
- acpi_parse_object *op,
- acpi_namespace_node *region_node,
- acpi_walk_state *walk_state)
+ union acpi_parse_object *op,
+ struct acpi_namespace_node *region_node,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_parse_object *arg;
- acpi_create_field_info info;
+ acpi_status status;
+ union acpi_parse_object *arg;
+ struct acpi_create_field_info info;
ACPI_FUNCTION_TRACE_PTR ("ds_create_index_field", op);
diff --git a/drivers/acpi/dispatcher/dsinit.c b/drivers/acpi/dispatcher/dsinit.c
index a4f58db346c2..951e496988bb 100644
--- a/drivers/acpi/dispatcher/dsinit.c
+++ b/drivers/acpi/dispatcher/dsinit.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -56,14 +56,14 @@
acpi_status
acpi_ds_init_one_object (
- acpi_handle obj_handle,
- u32 level,
- void *context,
- void **return_value)
+ acpi_handle obj_handle,
+ u32 level,
+ void *context,
+ void **return_value)
{
- acpi_object_type type;
- acpi_status status;
- acpi_init_walk_info *info = (acpi_init_walk_info *) context;
+ acpi_object_type type;
+ acpi_status status;
+ struct acpi_init_walk_info *info = (struct acpi_init_walk_info *) context;
ACPI_FUNCTION_NAME ("ds_init_one_object");
@@ -73,7 +73,7 @@ acpi_ds_init_one_object (
* We are only interested in objects owned by the table that
* was just loaded
*/
- if (((acpi_namespace_node *) obj_handle)->owner_id !=
+ if (((struct acpi_namespace_node *) obj_handle)->owner_id !=
info->table_desc->table_id) {
return (AE_OK);
}
@@ -90,7 +90,7 @@ acpi_ds_init_one_object (
status = acpi_ds_initialize_region (obj_handle);
if (ACPI_FAILURE (status)) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Region %p [%4.4s] - Init failure, %s\n",
- obj_handle, ((acpi_namespace_node *) obj_handle)->name.ascii,
+ obj_handle, ((struct acpi_namespace_node *) obj_handle)->name.ascii,
acpi_format_exception (status)));
}
@@ -115,7 +115,7 @@ acpi_ds_init_one_object (
* on a per-table basis. Currently, we just use a global for the width.
*/
if (info->table_desc->pointer->revision == 1) {
- ((acpi_namespace_node *) obj_handle)->flags |= ANOBJ_DATA_WIDTH_32;
+ ((struct acpi_namespace_node *) obj_handle)->flags |= ANOBJ_DATA_WIDTH_32;
}
/*
@@ -125,7 +125,7 @@ acpi_ds_init_one_object (
status = acpi_ds_parse_method (obj_handle);
if (ACPI_FAILURE (status)) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Method %p [%4.4s] - parse failure, %s\n",
- obj_handle, ((acpi_namespace_node *) obj_handle)->name.ascii,
+ obj_handle, ((struct acpi_namespace_node *) obj_handle)->name.ascii,
acpi_format_exception (status)));
/* This parse failed, but we will continue parsing more methods */
@@ -138,7 +138,7 @@ acpi_ds_init_one_object (
* for every execution since there isn't much overhead
*/
acpi_ns_delete_namespace_subtree (obj_handle);
- acpi_ns_delete_namespace_by_owner (((acpi_namespace_node *) obj_handle)->object->method.owning_id);
+ acpi_ns_delete_namespace_by_owner (((struct acpi_namespace_node *) obj_handle)->object->method.owning_id);
break;
@@ -176,11 +176,11 @@ acpi_ds_init_one_object (
acpi_status
acpi_ds_initialize_objects (
- acpi_table_desc *table_desc,
- acpi_namespace_node *start_node)
+ struct acpi_table_desc *table_desc,
+ struct acpi_namespace_node *start_node)
{
- acpi_status status;
- acpi_init_walk_info info;
+ acpi_status status;
+ struct acpi_init_walk_info info;
ACPI_FUNCTION_TRACE ("ds_initialize_objects");
diff --git a/drivers/acpi/dispatcher/dsmethod.c b/drivers/acpi/dispatcher/dsmethod.c
index a4ae2fcd6b11..cb75dd5dd316 100644
--- a/drivers/acpi/dispatcher/dsmethod.c
+++ b/drivers/acpi/dispatcher/dsmethod.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -55,14 +55,14 @@
acpi_status
acpi_ds_parse_method (
- acpi_handle obj_handle)
+ acpi_handle obj_handle)
{
- acpi_status status;
- acpi_operand_object *obj_desc;
- acpi_parse_object *op;
- acpi_namespace_node *node;
- acpi_owner_id owner_id;
- acpi_walk_state *walk_state;
+ acpi_status status;
+ union acpi_operand_object *obj_desc;
+ union acpi_parse_object *op;
+ struct acpi_namespace_node *node;
+ acpi_owner_id owner_id;
+ struct acpi_walk_state *walk_state;
ACPI_FUNCTION_TRACE_PTR ("ds_parse_method", obj_handle);
@@ -75,11 +75,11 @@ acpi_ds_parse_method (
}
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "**** Parsing [%4.4s] **** named_obj=%p\n",
- ((acpi_namespace_node *) obj_handle)->name.ascii, obj_handle));
+ ((struct acpi_namespace_node *) obj_handle)->name.ascii, obj_handle));
/* Extract the method object from the method Node */
- node = (acpi_namespace_node *) obj_handle;
+ node = (struct acpi_namespace_node *) obj_handle;
obj_desc = acpi_ns_get_attached_object (node);
if (!obj_desc) {
return_ACPI_STATUS (AE_NULL_OBJECT);
@@ -150,7 +150,7 @@ acpi_ds_parse_method (
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
"**** [%4.4s] Parsed **** named_obj=%p Op=%p\n",
- ((acpi_namespace_node *) obj_handle)->name.ascii, obj_handle, op));
+ ((struct acpi_namespace_node *) obj_handle)->name.ascii, obj_handle, op));
acpi_ps_delete_parse_tree (op);
return_ACPI_STATUS (status);
@@ -177,11 +177,11 @@ acpi_ds_parse_method (
acpi_status
acpi_ds_begin_method_execution (
- acpi_namespace_node *method_node,
- acpi_operand_object *obj_desc,
- acpi_namespace_node *calling_method_node)
+ struct acpi_namespace_node *method_node,
+ union acpi_operand_object *obj_desc,
+ struct acpi_namespace_node *calling_method_node)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_PTR ("ds_begin_method_execution", method_node);
@@ -242,15 +242,15 @@ acpi_ds_begin_method_execution (
acpi_status
acpi_ds_call_control_method (
- acpi_thread_state *thread,
- acpi_walk_state *this_walk_state,
- acpi_parse_object *op)
+ struct acpi_thread_state *thread,
+ struct acpi_walk_state *this_walk_state,
+ union acpi_parse_object *op)
{
- acpi_status status;
- acpi_namespace_node *method_node;
- acpi_operand_object *obj_desc;
- acpi_walk_state *next_walk_state;
- u32 i;
+ acpi_status status;
+ struct acpi_namespace_node *method_node;
+ union acpi_operand_object *obj_desc;
+ struct acpi_walk_state *next_walk_state;
+ u32 i;
ACPI_FUNCTION_TRACE_PTR ("ds_call_control_method", this_walk_state);
@@ -376,10 +376,10 @@ cleanup:
acpi_status
acpi_ds_restart_control_method (
- acpi_walk_state *walk_state,
- acpi_operand_object *return_desc)
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object *return_desc)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ds_restart_control_method", walk_state);
@@ -431,11 +431,11 @@ acpi_ds_restart_control_method (
acpi_status
acpi_ds_terminate_control_method (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object *obj_desc;
- acpi_namespace_node *method_node;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ struct acpi_namespace_node *method_node;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ds_terminate_control_method", walk_state);
diff --git a/drivers/acpi/dispatcher/dsmthdat.c b/drivers/acpi/dispatcher/dsmthdat.c
index ce568caea3b0..92ceb90bc399 100644
--- a/drivers/acpi/dispatcher/dsmthdat.c
+++ b/drivers/acpi/dispatcher/dsmthdat.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -57,9 +57,9 @@
void
acpi_ds_method_data_init (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- u32 i;
+ u32 i;
ACPI_FUNCTION_TRACE ("ds_method_data_init");
@@ -107,9 +107,9 @@ acpi_ds_method_data_init (
void
acpi_ds_method_data_delete_all (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- u32 index;
+ u32 index;
ACPI_FUNCTION_TRACE ("ds_method_data_delete_all");
@@ -163,12 +163,12 @@ acpi_ds_method_data_delete_all (
acpi_status
acpi_ds_method_data_init_args (
- acpi_operand_object **params,
- u32 max_param_count,
- acpi_walk_state *walk_state)
+ union acpi_operand_object **params,
+ u32 max_param_count,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- u32 index = 0;
+ acpi_status status;
+ u32 index = 0;
ACPI_FUNCTION_TRACE_PTR ("ds_method_data_init_args", params);
@@ -215,10 +215,10 @@ acpi_ds_method_data_init_args (
acpi_status
acpi_ds_method_data_get_node (
- u16 opcode,
- u32 index,
- acpi_walk_state *walk_state,
- acpi_namespace_node **node)
+ u16 opcode,
+ u32 index,
+ struct acpi_walk_state *walk_state,
+ struct acpi_namespace_node **node)
{
ACPI_FUNCTION_TRACE ("ds_method_data_get_node");
@@ -280,14 +280,14 @@ acpi_ds_method_data_get_node (
acpi_status
acpi_ds_method_data_set_value (
- u16 opcode,
- u32 index,
- acpi_operand_object *object,
- acpi_walk_state *walk_state)
+ u16 opcode,
+ u32 index,
+ union acpi_operand_object *object,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_namespace_node *node;
- acpi_operand_object *new_desc = object;
+ acpi_status status;
+ struct acpi_namespace_node *node;
+ union acpi_operand_object *new_desc = object;
ACPI_FUNCTION_TRACE ("ds_method_data_set_value");
@@ -347,13 +347,13 @@ acpi_ds_method_data_set_value (
acpi_object_type
acpi_ds_method_data_get_type (
- u16 opcode,
- u32 index,
- acpi_walk_state *walk_state)
+ u16 opcode,
+ u32 index,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_namespace_node *node;
- acpi_operand_object *object;
+ acpi_status status;
+ struct acpi_namespace_node *node;
+ union acpi_operand_object *object;
ACPI_FUNCTION_TRACE ("ds_method_data_get_type");
@@ -401,14 +401,14 @@ acpi_ds_method_data_get_type (
acpi_status
acpi_ds_method_data_get_value (
- u16 opcode,
- u32 index,
- acpi_walk_state *walk_state,
- acpi_operand_object **dest_desc)
+ u16 opcode,
+ u32 index,
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object **dest_desc)
{
- acpi_status status;
- acpi_namespace_node *node;
- acpi_operand_object *object;
+ acpi_status status;
+ struct acpi_namespace_node *node;
+ union acpi_operand_object *object;
ACPI_FUNCTION_TRACE ("ds_method_data_get_value");
@@ -490,13 +490,13 @@ acpi_ds_method_data_get_value (
void
acpi_ds_method_data_delete_value (
- u16 opcode,
- u32 index,
- acpi_walk_state *walk_state)
+ u16 opcode,
+ u32 index,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_namespace_node *node;
- acpi_operand_object *object;
+ acpi_status status;
+ struct acpi_namespace_node *node;
+ union acpi_operand_object *object;
ACPI_FUNCTION_TRACE ("ds_method_data_delete_value");
@@ -553,14 +553,14 @@ acpi_ds_method_data_delete_value (
acpi_status
acpi_ds_store_object_to_local (
- u16 opcode,
- u32 index,
- acpi_operand_object *obj_desc,
- acpi_walk_state *walk_state)
+ u16 opcode,
+ u32 index,
+ union acpi_operand_object *obj_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_namespace_node *node;
- acpi_operand_object *current_obj_desc;
+ acpi_status status;
+ struct acpi_namespace_node *node;
+ union acpi_operand_object *current_obj_desc;
ACPI_FUNCTION_TRACE ("ds_store_object_to_local");
diff --git a/drivers/acpi/dispatcher/dsobject.c b/drivers/acpi/dispatcher/dsobject.c
index a7f20374dd1e..7a6fcb4273e0 100644
--- a/drivers/acpi/dispatcher/dsobject.c
+++ b/drivers/acpi/dispatcher/dsobject.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -52,12 +52,12 @@
acpi_status
acpi_ds_build_internal_object (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- acpi_operand_object **obj_desc_ptr)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ union acpi_operand_object **obj_desc_ptr)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ds_build_internal_object");
@@ -74,7 +74,7 @@ acpi_ds_build_internal_object (
status = acpi_ns_lookup (walk_state->scope_info, op->common.value.string,
ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, NULL,
- (acpi_namespace_node **) &(op->common.node));
+ (struct acpi_namespace_node **) &(op->common.node));
if (ACPI_FAILURE (status)) {
ACPI_REPORT_NSERROR (op->common.value.string, status);
@@ -119,15 +119,15 @@ acpi_ds_build_internal_object (
acpi_status
acpi_ds_build_internal_buffer_obj (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- u32 buffer_length,
- acpi_operand_object **obj_desc_ptr)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ u32 buffer_length,
+ union acpi_operand_object **obj_desc_ptr)
{
- acpi_parse_object *arg;
- acpi_operand_object *obj_desc;
- acpi_parse_object *byte_list;
- u32 byte_list_length = 0;
+ union acpi_parse_object *arg;
+ union acpi_operand_object *obj_desc;
+ union acpi_parse_object *byte_list;
+ u32 byte_list_length = 0;
ACPI_FUNCTION_TRACE ("ds_build_internal_buffer_obj");
@@ -204,7 +204,7 @@ acpi_ds_build_internal_buffer_obj (
}
obj_desc->buffer.flags |= AOPOBJ_DATA_VALID;
- op->common.node = (acpi_namespace_node *) obj_desc;
+ op->common.node = (struct acpi_namespace_node *) obj_desc;
return_ACPI_STATUS (AE_OK);
}
@@ -227,17 +227,17 @@ acpi_ds_build_internal_buffer_obj (
acpi_status
acpi_ds_build_internal_package_obj (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- u32 package_length,
- acpi_operand_object **obj_desc_ptr)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ u32 package_length,
+ union acpi_operand_object **obj_desc_ptr)
{
- acpi_parse_object *arg;
- acpi_parse_object *parent;
- acpi_operand_object *obj_desc = NULL;
- u32 package_list_length;
- acpi_status status = AE_OK;
- u32 i;
+ union acpi_parse_object *arg;
+ union acpi_parse_object *parent;
+ union acpi_operand_object *obj_desc = NULL;
+ u32 package_list_length;
+ acpi_status status = AE_OK;
+ u32 i;
ACPI_FUNCTION_TRACE ("ds_build_internal_package_obj");
@@ -311,7 +311,7 @@ acpi_ds_build_internal_package_obj (
if (arg->common.aml_opcode == AML_INT_RETURN_VALUE_OP) {
/* Object (package or buffer) is already built */
- obj_desc->package.elements[i] = ACPI_CAST_PTR (acpi_operand_object, arg->common.node);
+ obj_desc->package.elements[i] = ACPI_CAST_PTR (union acpi_operand_object, arg->common.node);
}
else {
status = acpi_ds_build_internal_object (walk_state, arg,
@@ -323,7 +323,7 @@ acpi_ds_build_internal_package_obj (
}
obj_desc->package.flags |= AOPOBJ_DATA_VALID;
- op->common.node = (acpi_namespace_node *) obj_desc;
+ op->common.node = (struct acpi_namespace_node *) obj_desc;
return_ACPI_STATUS (status);
}
@@ -344,12 +344,12 @@ acpi_ds_build_internal_package_obj (
acpi_status
acpi_ds_create_node (
- acpi_walk_state *walk_state,
- acpi_namespace_node *node,
- acpi_parse_object *op)
+ struct acpi_walk_state *walk_state,
+ struct acpi_namespace_node *node,
+ union acpi_parse_object *op)
{
- acpi_status status;
- acpi_operand_object *obj_desc;
+ acpi_status status;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_TRACE_PTR ("ds_create_node", op);
@@ -413,14 +413,14 @@ acpi_ds_create_node (
acpi_status
acpi_ds_init_object_from_op (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- u16 opcode,
- acpi_operand_object **ret_obj_desc)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ u16 opcode,
+ union acpi_operand_object **ret_obj_desc)
{
- const acpi_opcode_info *op_info;
- acpi_operand_object *obj_desc;
- acpi_status status = AE_OK;
+ const struct acpi_opcode_info *op_info;
+ union acpi_operand_object *obj_desc;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ds_init_object_from_op");
@@ -442,7 +442,7 @@ acpi_ds_init_object_from_op (
/*
* Defer evaluation of Buffer term_arg operand
*/
- obj_desc->buffer.node = (acpi_namespace_node *) walk_state->operands[0];
+ obj_desc->buffer.node = (struct acpi_namespace_node *) walk_state->operands[0];
obj_desc->buffer.aml_start = op->named.data;
obj_desc->buffer.aml_length = op->named.length;
break;
@@ -453,7 +453,7 @@ acpi_ds_init_object_from_op (
/*
* Defer evaluation of Package term_arg operand
*/
- obj_desc->package.node = (acpi_namespace_node *) walk_state->operands[0];
+ obj_desc->package.node = (struct acpi_namespace_node *) walk_state->operands[0];
obj_desc->package.aml_start = op->named.data;
obj_desc->package.aml_length = op->named.length;
break;
@@ -551,7 +551,7 @@ acpi_ds_init_object_from_op (
#ifndef ACPI_NO_METHOD_EXECUTION
status = acpi_ds_method_data_get_node (AML_LOCAL_OP, obj_desc->reference.offset,
- walk_state, (acpi_namespace_node **) &obj_desc->reference.object);
+ walk_state, (struct acpi_namespace_node **) &obj_desc->reference.object);
#endif
break;
diff --git a/drivers/acpi/dispatcher/dsopcode.c b/drivers/acpi/dispatcher/dsopcode.c
index fc173321e907..4206f272f1bb 100644
--- a/drivers/acpi/dispatcher/dsopcode.c
+++ b/drivers/acpi/dispatcher/dsopcode.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -52,15 +52,15 @@
acpi_status
acpi_ds_execute_arguments (
- acpi_namespace_node *node,
- acpi_namespace_node *scope_node,
- u32 aml_length,
- u8 *aml_start)
+ struct acpi_namespace_node *node,
+ struct acpi_namespace_node *scope_node,
+ u32 aml_length,
+ u8 *aml_start)
{
- acpi_status status;
- acpi_parse_object *op;
- acpi_walk_state *walk_state;
- acpi_parse_object *arg;
+ acpi_status status;
+ union acpi_parse_object *op;
+ struct acpi_walk_state *walk_state;
+ union acpi_parse_object *arg;
ACPI_FUNCTION_TRACE ("acpi_ds_execute_arguments");
@@ -153,11 +153,11 @@ acpi_ds_execute_arguments (
acpi_status
acpi_ds_get_buffer_field_arguments (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
- acpi_operand_object *extra_desc;
- acpi_namespace_node *node;
- acpi_status status;
+ union acpi_operand_object *extra_desc;
+ struct acpi_namespace_node *node;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ds_get_buffer_field_arguments", obj_desc);
@@ -199,10 +199,10 @@ acpi_ds_get_buffer_field_arguments (
acpi_status
acpi_ds_get_buffer_arguments (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
- acpi_namespace_node *node;
- acpi_status status;
+ struct acpi_namespace_node *node;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ds_get_buffer_arguments", obj_desc);
@@ -246,10 +246,10 @@ acpi_ds_get_buffer_arguments (
acpi_status
acpi_ds_get_package_arguments (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
- acpi_namespace_node *node;
- acpi_status status;
+ struct acpi_namespace_node *node;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ds_get_package_arguments", obj_desc);
@@ -293,11 +293,11 @@ acpi_ds_get_package_arguments (
acpi_status
acpi_ds_get_region_arguments (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
- acpi_namespace_node *node;
- acpi_status status;
- acpi_operand_object *extra_desc;
+ struct acpi_namespace_node *node;
+ acpi_status status;
+ union acpi_operand_object *extra_desc;
ACPI_FUNCTION_TRACE_PTR ("ds_get_region_arguments", obj_desc);
@@ -342,10 +342,10 @@ acpi_ds_get_region_arguments (
acpi_status
acpi_ds_initialize_region (
- acpi_handle obj_handle)
+ acpi_handle obj_handle)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
obj_desc = acpi_ns_get_attached_object (obj_handle);
@@ -376,18 +376,18 @@ acpi_ds_initialize_region (
acpi_status
acpi_ds_init_buffer_field (
- u16 aml_opcode,
- acpi_operand_object *obj_desc,
- acpi_operand_object *buffer_desc,
- acpi_operand_object *offset_desc,
- acpi_operand_object *length_desc,
- acpi_operand_object *result_desc)
+ u16 aml_opcode,
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object *buffer_desc,
+ union acpi_operand_object *offset_desc,
+ union acpi_operand_object *length_desc,
+ union acpi_operand_object *result_desc)
{
- u32 offset;
- u32 bit_offset;
- u32 bit_count;
- u8 field_flags;
- acpi_status status;
+ u32 offset;
+ u32 bit_offset;
+ u32 bit_count;
+ u8 field_flags;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ds_init_buffer_field", obj_desc);
@@ -558,13 +558,13 @@ cleanup:
acpi_status
acpi_ds_eval_buffer_field_operands (
- acpi_walk_state *walk_state,
- acpi_parse_object *op)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op)
{
- acpi_status status;
- acpi_operand_object *obj_desc;
- acpi_namespace_node *node;
- acpi_parse_object *next_op;
+ acpi_status status;
+ union acpi_operand_object *obj_desc;
+ struct acpi_namespace_node *node;
+ union acpi_parse_object *next_op;
ACPI_FUNCTION_TRACE_PTR ("ds_eval_buffer_field_operands", op);
@@ -645,14 +645,14 @@ acpi_ds_eval_buffer_field_operands (
acpi_status
acpi_ds_eval_region_operands (
- acpi_walk_state *walk_state,
- acpi_parse_object *op)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op)
{
- acpi_status status;
- acpi_operand_object *obj_desc;
- acpi_operand_object *operand_desc;
- acpi_namespace_node *node;
- acpi_parse_object *next_op;
+ acpi_status status;
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object *operand_desc;
+ struct acpi_namespace_node *node;
+ union acpi_parse_object *next_op;
ACPI_FUNCTION_TRACE_PTR ("ds_eval_region_operands", op);
@@ -743,13 +743,13 @@ acpi_ds_eval_region_operands (
acpi_status
acpi_ds_eval_data_object_operands (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- acpi_operand_object *obj_desc)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ union acpi_operand_object *obj_desc)
{
- acpi_status status;
- acpi_operand_object *arg_desc;
- u32 length;
+ acpi_status status;
+ union acpi_operand_object *arg_desc;
+ u32 length;
ACPI_FUNCTION_TRACE ("ds_eval_data_object_operands");
@@ -836,11 +836,11 @@ acpi_ds_eval_data_object_operands (
acpi_status
acpi_ds_exec_begin_control_op (
- acpi_walk_state *walk_state,
- acpi_parse_object *op)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op)
{
- acpi_status status = AE_OK;
- acpi_generic_state *control_state;
+ acpi_status status = AE_OK;
+ union acpi_generic_state *control_state;
ACPI_FUNCTION_NAME ("ds_exec_begin_control_op");
@@ -916,11 +916,11 @@ acpi_ds_exec_begin_control_op (
acpi_status
acpi_ds_exec_end_control_op (
- acpi_walk_state *walk_state,
- acpi_parse_object *op)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op)
{
- acpi_status status = AE_OK;
- acpi_generic_state *control_state;
+ acpi_status status = AE_OK;
+ union acpi_generic_state *control_state;
ACPI_FUNCTION_NAME ("ds_exec_end_control_op");
diff --git a/drivers/acpi/dispatcher/dsutils.c b/drivers/acpi/dispatcher/dsutils.c
index 60887030c633..acaed3e97534 100644
--- a/drivers/acpi/dispatcher/dsutils.c
+++ b/drivers/acpi/dispatcher/dsutils.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -52,10 +52,10 @@
u8
acpi_ds_is_result_used (
- acpi_parse_object *op,
- acpi_walk_state *walk_state)
+ union acpi_parse_object *op,
+ struct acpi_walk_state *walk_state)
{
- const acpi_opcode_info *parent_info;
+ const struct acpi_opcode_info *parent_info;
ACPI_FUNCTION_TRACE_PTR ("ds_is_result_used", op);
@@ -200,12 +200,12 @@ result_not_used:
void
acpi_ds_delete_result_if_not_used (
- acpi_parse_object *op,
- acpi_operand_object *result_obj,
- acpi_walk_state *walk_state)
+ union acpi_parse_object *op,
+ union acpi_operand_object *result_obj,
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ds_delete_result_if_not_used", result_obj);
@@ -251,10 +251,10 @@ acpi_ds_delete_result_if_not_used (
acpi_status
acpi_ds_resolve_operands (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- u32 i;
- acpi_status status = AE_OK;
+ u32 i;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_PTR ("ds_resolve_operands", walk_state);
@@ -289,9 +289,9 @@ acpi_ds_resolve_operands (
void
acpi_ds_clear_operands (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- u32 i;
+ u32 i;
ACPI_FUNCTION_TRACE_PTR ("acpi_ds_clear_operands", walk_state);
@@ -333,18 +333,18 @@ acpi_ds_clear_operands (
acpi_status
acpi_ds_create_operand (
- acpi_walk_state *walk_state,
- acpi_parse_object *arg,
- u32 arg_index)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *arg,
+ u32 arg_index)
{
- acpi_status status = AE_OK;
- char *name_string;
- u32 name_length;
- acpi_operand_object *obj_desc;
- acpi_parse_object *parent_op;
- u16 opcode;
- acpi_interpreter_mode interpreter_mode;
- const acpi_opcode_info *op_info;
+ acpi_status status = AE_OK;
+ char *name_string;
+ u32 name_length;
+ union acpi_operand_object *obj_desc;
+ union acpi_parse_object *parent_op;
+ u16 opcode;
+ acpi_interpreter_mode interpreter_mode;
+ const struct acpi_opcode_info *op_info;
ACPI_FUNCTION_TRACE_PTR ("ds_create_operand", arg);
@@ -397,7 +397,7 @@ acpi_ds_create_operand (
ACPI_TYPE_ANY, interpreter_mode,
ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
walk_state,
- ACPI_CAST_INDIRECT_PTR (acpi_namespace_node, &obj_desc));
+ ACPI_CAST_INDIRECT_PTR (struct acpi_namespace_node, &obj_desc));
/*
* The only case where we pass through (ignore) a NOT_FOUND
* error is for the cond_ref_of opcode.
@@ -410,7 +410,7 @@ acpi_ds_create_operand (
* indicate this to the interpreter, set the
* object to the root
*/
- obj_desc = ACPI_CAST_PTR (acpi_operand_object, acpi_gbl_root_node);
+ obj_desc = ACPI_CAST_PTR (union acpi_operand_object, acpi_gbl_root_node);
status = AE_OK;
}
@@ -543,12 +543,12 @@ acpi_ds_create_operand (
acpi_status
acpi_ds_create_operands (
- acpi_walk_state *walk_state,
- acpi_parse_object *first_arg)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *first_arg)
{
- acpi_status status = AE_OK;
- acpi_parse_object *arg;
- u32 arg_count = 0;
+ acpi_status status = AE_OK;
+ union acpi_parse_object *arg;
+ u32 arg_count = 0;
ACPI_FUNCTION_TRACE_PTR ("ds_create_operands", first_arg);
diff --git a/drivers/acpi/dispatcher/dswexec.c b/drivers/acpi/dispatcher/dswexec.c
index 88f8dd7872d9..a1aa38e5eb14 100644
--- a/drivers/acpi/dispatcher/dswexec.c
+++ b/drivers/acpi/dispatcher/dswexec.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -66,10 +66,10 @@ static ACPI_EXECUTE_OP acpi_gbl_op_type_dispatch [] = {
acpi_status
acpi_ds_get_predicate_value (
- acpi_walk_state *walk_state,
- acpi_operand_object *result_obj) {
- acpi_status status = AE_OK;
- acpi_operand_object *obj_desc;
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object *result_obj) {
+ acpi_status status = AE_OK;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_TRACE_PTR ("ds_get_predicate_value", walk_state);
@@ -179,12 +179,12 @@ cleanup:
acpi_status
acpi_ds_exec_begin_op (
- acpi_walk_state *walk_state,
- acpi_parse_object **out_op)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object **out_op)
{
- acpi_parse_object *op;
- acpi_status status = AE_OK;
- u32 opcode_class;
+ union acpi_parse_object *op;
+ acpi_status status = AE_OK;
+ u32 opcode_class;
ACPI_FUNCTION_TRACE_PTR ("ds_exec_begin_op", walk_state);
@@ -320,14 +320,14 @@ acpi_ds_exec_begin_op (
acpi_status
acpi_ds_exec_end_op (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_parse_object *op;
- acpi_status status = AE_OK;
- u32 op_type;
- u32 op_class;
- acpi_parse_object *next_op;
- acpi_parse_object *first_arg;
+ union acpi_parse_object *op;
+ acpi_status status = AE_OK;
+ u32 op_type;
+ u32 op_class;
+ union acpi_parse_object *next_op;
+ union acpi_parse_object *first_arg;
ACPI_FUNCTION_TRACE_PTR ("ds_exec_end_op", walk_state);
diff --git a/drivers/acpi/dispatcher/dswload.c b/drivers/acpi/dispatcher/dswload.c
index 4a02205cafa9..3bf87e5cb750 100644
--- a/drivers/acpi/dispatcher/dswload.c
+++ b/drivers/acpi/dispatcher/dswload.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -51,8 +51,8 @@
acpi_status
acpi_ds_init_callbacks (
- acpi_walk_state *walk_state,
- u32 pass_number)
+ struct acpi_walk_state *walk_state,
+ u32 pass_number)
{
switch (pass_number) {
@@ -100,15 +100,15 @@ acpi_ds_init_callbacks (
acpi_status
acpi_ds_load1_begin_op (
- acpi_walk_state *walk_state,
- acpi_parse_object **out_op)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object **out_op)
{
- acpi_parse_object *op;
- acpi_namespace_node *node;
- acpi_status status;
- acpi_object_type object_type;
- char *path;
- u32 flags;
+ union acpi_parse_object *op;
+ struct acpi_namespace_node *node;
+ acpi_status status;
+ acpi_object_type object_type;
+ char *path;
+ u32 flags;
ACPI_FUNCTION_NAME ("ds_load1_begin_op");
@@ -303,11 +303,11 @@ acpi_ds_load1_begin_op (
acpi_status
acpi_ds_load1_end_op (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_parse_object *op;
- acpi_object_type object_type;
- acpi_status status = AE_OK;
+ union acpi_parse_object *op;
+ acpi_object_type object_type;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_NAME ("ds_load1_end_op");
@@ -415,14 +415,14 @@ acpi_ds_load1_end_op (
acpi_status
acpi_ds_load2_begin_op (
- acpi_walk_state *walk_state,
- acpi_parse_object **out_op)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object **out_op)
{
- acpi_parse_object *op;
- acpi_namespace_node *node;
- acpi_status status;
- acpi_object_type object_type;
- char *buffer_ptr;
+ union acpi_parse_object *op;
+ struct acpi_namespace_node *node;
+ acpi_status status;
+ acpi_object_type object_type;
+ char *buffer_ptr;
ACPI_FUNCTION_TRACE ("ds_load2_begin_op");
@@ -627,16 +627,16 @@ acpi_ds_load2_begin_op (
acpi_status
acpi_ds_load2_end_op (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_parse_object *op;
- acpi_status status = AE_OK;
- acpi_object_type object_type;
- acpi_namespace_node *node;
- acpi_parse_object *arg;
- acpi_namespace_node *new_node;
+ union acpi_parse_object *op;
+ acpi_status status = AE_OK;
+ acpi_object_type object_type;
+ struct acpi_namespace_node *node;
+ union acpi_parse_object *arg;
+ struct acpi_namespace_node *new_node;
#ifndef ACPI_NO_METHOD_EXECUTION
- u32 i;
+ u32 i;
#endif
diff --git a/drivers/acpi/dispatcher/dswscope.c b/drivers/acpi/dispatcher/dswscope.c
index 4173171fdfa9..c2a44773c1df 100644
--- a/drivers/acpi/dispatcher/dswscope.c
+++ b/drivers/acpi/dispatcher/dswscope.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -47,9 +47,9 @@
void
acpi_ds_scope_stack_clear (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_generic_state *scope_info;
+ union acpi_generic_state *scope_info;
ACPI_FUNCTION_NAME ("ds_scope_stack_clear");
@@ -81,12 +81,12 @@ acpi_ds_scope_stack_clear (
acpi_status
acpi_ds_scope_stack_push (
- acpi_namespace_node *node,
- acpi_object_type type,
- acpi_walk_state *walk_state)
+ struct acpi_namespace_node *node,
+ acpi_object_type type,
+ struct acpi_walk_state *walk_state)
{
- acpi_generic_state *scope_info;
- acpi_generic_state *old_scope_info;
+ union acpi_generic_state *scope_info;
+ union acpi_generic_state *old_scope_info;
ACPI_FUNCTION_TRACE ("ds_scope_stack_push");
@@ -168,10 +168,10 @@ acpi_ds_scope_stack_push (
acpi_status
acpi_ds_scope_stack_pop (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_generic_state *scope_info;
- acpi_generic_state *new_scope_info;
+ union acpi_generic_state *scope_info;
+ union acpi_generic_state *new_scope_info;
ACPI_FUNCTION_TRACE ("ds_scope_stack_pop");
diff --git a/drivers/acpi/dispatcher/dswstate.c b/drivers/acpi/dispatcher/dswstate.c
index 805b1b45c5b3..f51cb6b3108f 100644
--- a/drivers/acpi/dispatcher/dswstate.c
+++ b/drivers/acpi/dispatcher/dswstate.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -47,11 +47,11 @@
acpi_status
acpi_ds_result_insert (
- void *object,
- u32 index,
- acpi_walk_state *walk_state)
+ void *object,
+ u32 index,
+ struct acpi_walk_state *walk_state)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_NAME ("ds_result_insert");
@@ -83,7 +83,7 @@ acpi_ds_result_insert (
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"Obj=%p [%s] State=%p Num=%X Cur=%X\n",
- object, object ? acpi_ut_get_object_type_name ((acpi_operand_object *) object) : "NULL",
+ object, object ? acpi_ut_get_object_type_name ((union acpi_operand_object *) object) : "NULL",
walk_state, state->results.num_results, walk_state->current_result));
return (AE_OK);
@@ -106,11 +106,11 @@ acpi_ds_result_insert (
acpi_status
acpi_ds_result_remove (
- acpi_operand_object **object,
- u32 index,
- acpi_walk_state *walk_state)
+ union acpi_operand_object **object,
+ u32 index,
+ struct acpi_walk_state *walk_state)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_NAME ("ds_result_remove");
@@ -170,11 +170,11 @@ acpi_ds_result_remove (
acpi_status
acpi_ds_result_pop (
- acpi_operand_object **object,
- acpi_walk_state *walk_state)
+ union acpi_operand_object **object,
+ struct acpi_walk_state *walk_state)
{
- acpi_native_uint index;
- acpi_generic_state *state;
+ acpi_native_uint index;
+ union acpi_generic_state *state;
ACPI_FUNCTION_NAME ("ds_result_pop");
@@ -230,11 +230,11 @@ acpi_ds_result_pop (
acpi_status
acpi_ds_result_pop_from_bottom (
- acpi_operand_object **object,
- acpi_walk_state *walk_state)
+ union acpi_operand_object **object,
+ struct acpi_walk_state *walk_state)
{
- acpi_native_uint index;
- acpi_generic_state *state;
+ acpi_native_uint index;
+ union acpi_generic_state *state;
ACPI_FUNCTION_NAME ("ds_result_pop_from_bottom");
@@ -296,10 +296,10 @@ acpi_ds_result_pop_from_bottom (
acpi_status
acpi_ds_result_push (
- acpi_operand_object *object,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *object,
+ struct acpi_walk_state *walk_state)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_NAME ("ds_result_push");
@@ -328,7 +328,7 @@ acpi_ds_result_push (
state->results.num_results++;
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p [%s] State=%p Num=%X Cur=%X\n",
- object, object ? acpi_ut_get_object_type_name ((acpi_operand_object *) object) : "NULL",
+ object, object ? acpi_ut_get_object_type_name ((union acpi_operand_object *) object) : "NULL",
walk_state, state->results.num_results, walk_state->current_result));
return (AE_OK);
@@ -350,9 +350,9 @@ acpi_ds_result_push (
acpi_status
acpi_ds_result_stack_push (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_NAME ("ds_result_stack_push");
@@ -386,9 +386,9 @@ acpi_ds_result_stack_push (
acpi_status
acpi_ds_result_stack_pop (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_NAME ("ds_result_stack_pop");
@@ -429,9 +429,9 @@ acpi_ds_result_stack_pop (
acpi_status
acpi_ds_obj_stack_delete_all (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- u32 i;
+ u32 i;
ACPI_FUNCTION_TRACE_PTR ("ds_obj_stack_delete_all", walk_state);
@@ -465,8 +465,8 @@ acpi_ds_obj_stack_delete_all (
acpi_status
acpi_ds_obj_stack_push (
- void *object,
- acpi_walk_state *walk_state)
+ void *object,
+ struct acpi_walk_state *walk_state)
{
ACPI_FUNCTION_NAME ("ds_obj_stack_push");
@@ -486,7 +486,7 @@ acpi_ds_obj_stack_push (
walk_state->num_operands++;
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p [%s] State=%p #Ops=%X\n",
- object, acpi_ut_get_object_type_name ((acpi_operand_object *) object),
+ object, acpi_ut_get_object_type_name ((union acpi_operand_object *) object),
walk_state, walk_state->num_operands));
return (AE_OK);
@@ -510,8 +510,8 @@ acpi_ds_obj_stack_push (
acpi_status
acpi_ds_obj_stack_pop_object (
- acpi_operand_object **object,
- acpi_walk_state *walk_state)
+ union acpi_operand_object **object,
+ struct acpi_walk_state *walk_state)
{
ACPI_FUNCTION_NAME ("ds_obj_stack_pop_object");
@@ -569,10 +569,10 @@ acpi_ds_obj_stack_pop_object (
acpi_status
acpi_ds_obj_stack_pop (
- u32 pop_count,
- acpi_walk_state *walk_state)
+ u32 pop_count,
+ struct acpi_walk_state *walk_state)
{
- u32 i;
+ u32 i;
ACPI_FUNCTION_NAME ("ds_obj_stack_pop");
@@ -616,11 +616,11 @@ acpi_ds_obj_stack_pop (
acpi_status
acpi_ds_obj_stack_pop_and_delete (
- u32 pop_count,
- acpi_walk_state *walk_state)
+ u32 pop_count,
+ struct acpi_walk_state *walk_state)
{
- u32 i;
- acpi_operand_object *obj_desc;
+ u32 i;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_NAME ("ds_obj_stack_pop_and_delete");
@@ -669,8 +669,8 @@ acpi_ds_obj_stack_pop_and_delete (
void *
acpi_ds_obj_stack_get_value (
- u32 index,
- acpi_walk_state *walk_state)
+ u32 index,
+ struct acpi_walk_state *walk_state)
{
ACPI_FUNCTION_TRACE_PTR ("ds_obj_stack_get_value", walk_state);
@@ -706,9 +706,9 @@ acpi_ds_obj_stack_get_value (
*
******************************************************************************/
-acpi_walk_state *
+struct acpi_walk_state *
acpi_ds_get_current_walk_state (
- acpi_thread_state *thread)
+ struct acpi_thread_state *thread)
{
ACPI_FUNCTION_NAME ("ds_get_current_walk_state");
@@ -740,8 +740,8 @@ acpi_ds_get_current_walk_state (
void
acpi_ds_push_walk_state (
- acpi_walk_state *walk_state,
- acpi_thread_state *thread)
+ struct acpi_walk_state *walk_state,
+ struct acpi_thread_state *thread)
{
ACPI_FUNCTION_TRACE ("ds_push_walk_state");
@@ -767,11 +767,11 @@ acpi_ds_push_walk_state (
*
******************************************************************************/
-acpi_walk_state *
+struct acpi_walk_state *
acpi_ds_pop_walk_state (
- acpi_thread_state *thread)
+ struct acpi_thread_state *thread)
{
- acpi_walk_state *walk_state;
+ struct acpi_walk_state *walk_state;
ACPI_FUNCTION_TRACE ("ds_pop_walk_state");
@@ -809,15 +809,15 @@ acpi_ds_pop_walk_state (
*
******************************************************************************/
-acpi_walk_state *
+struct acpi_walk_state *
acpi_ds_create_walk_state (
- acpi_owner_id owner_id,
- acpi_parse_object *origin,
- acpi_operand_object *mth_desc,
- acpi_thread_state *thread)
+ acpi_owner_id owner_id,
+ union acpi_parse_object *origin,
+ union acpi_operand_object *mth_desc,
+ struct acpi_thread_state *thread)
{
- acpi_walk_state *walk_state;
- acpi_status status;
+ struct acpi_walk_state *walk_state;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ds_create_walk_state");
@@ -873,18 +873,18 @@ acpi_ds_create_walk_state (
acpi_status
acpi_ds_init_aml_walk (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- acpi_namespace_node *method_node,
- u8 *aml_start,
- u32 aml_length,
- acpi_operand_object **params,
- acpi_operand_object **return_obj_desc,
- u32 pass_number)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ struct acpi_namespace_node *method_node,
+ u8 *aml_start,
+ u32 aml_length,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_obj_desc,
+ u32 pass_number)
{
- acpi_status status;
- acpi_parse_state *parser_state = &walk_state->parser_state;
- acpi_parse_object *extra_op;
+ acpi_status status;
+ struct acpi_parse_state *parser_state = &walk_state->parser_state;
+ union acpi_parse_object *extra_op;
ACPI_FUNCTION_TRACE ("ds_init_aml_walk");
@@ -974,9 +974,9 @@ acpi_ds_init_aml_walk (
void
acpi_ds_delete_walk_state (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_TRACE_PTR ("ds_delete_walk_state", walk_state);
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 9210841ad533..aaa2e95bcf92 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -79,14 +79,14 @@ static struct acpi_driver acpi_ec_driver = {
};
struct acpi_ec {
- acpi_handle handle;
- unsigned long uid;
- unsigned long gpe_bit;
- acpi_generic_address status_addr;
- acpi_generic_address command_addr;
- acpi_generic_address data_addr;
- unsigned long global_lock;
- spinlock_t lock;
+ acpi_handle handle;
+ unsigned long uid;
+ unsigned long gpe_bit;
+ struct acpi_generic_address status_addr;
+ struct acpi_generic_address command_addr;
+ struct acpi_generic_address data_addr;
+ unsigned long global_lock;
+ spinlock_t lock;
};
/* If we find an EC via the ECDT, we need to keep a ptr to its context */
@@ -652,8 +652,8 @@ acpi_ec_start (
int result = 0;
acpi_status status = AE_OK;
struct acpi_ec *ec = NULL;
- acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
- acpi_resource *resource = NULL;
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ struct acpi_resource *resource = NULL;
ACPI_FUNCTION_TRACE("acpi_ec_start");
@@ -674,7 +674,7 @@ acpi_ec_start (
return_VALUE(-ENODEV);
}
- resource = (acpi_resource *) buffer.pointer;
+ resource = (struct acpi_resource *) buffer.pointer;
if (!resource || (resource->id != ACPI_RSTYPE_IO)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid or missing resource\n"));
result = -ENODEV;
@@ -761,7 +761,7 @@ acpi_ec_ecdt_probe (void)
struct acpi_table_ecdt *ecdt_ptr;
status = acpi_get_firmware_table("ECDT", 1, ACPI_LOGICAL_ADDRESSING,
- (acpi_table_header **) &ecdt_ptr);
+ (struct acpi_table_header **) &ecdt_ptr);
if (ACPI_FAILURE(status))
return 0;
diff --git a/drivers/acpi/events/evevent.c b/drivers/acpi/events/evevent.c
index b62b3ef61f9b..c5988407f903 100644
--- a/drivers/acpi/events/evevent.c
+++ b/drivers/acpi/events/evevent.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -45,7 +45,7 @@ acpi_status
acpi_ev_initialize (
void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_initialize");
@@ -99,7 +99,7 @@ acpi_status
acpi_ev_handler_initialize (
void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_handler_initialize");
@@ -156,8 +156,8 @@ acpi_status
acpi_ev_fixed_event_initialize (
void)
{
- acpi_native_uint i;
- acpi_status status;
+ acpi_native_uint i;
+ acpi_status status;
/*
@@ -199,10 +199,10 @@ u32
acpi_ev_fixed_event_detect (
void)
{
- u32 int_status = ACPI_INTERRUPT_NOT_HANDLED;
- u32 fixed_status;
- u32 fixed_enable;
- acpi_native_uint i;
+ u32 int_status = ACPI_INTERRUPT_NOT_HANDLED;
+ u32 fixed_status;
+ u32 fixed_enable;
+ acpi_native_uint i;
ACPI_FUNCTION_NAME ("ev_fixed_event_detect");
@@ -252,7 +252,7 @@ acpi_ev_fixed_event_detect (
u32
acpi_ev_fixed_event_dispatch (
- u32 event)
+ u32 event)
{
diff --git a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c
index 70cec76ef7c3..6419956a746b 100644
--- a/drivers/acpi/events/evgpe.c
+++ b/drivers/acpi/events/evgpe.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -45,14 +45,14 @@
acpi_status
acpi_ev_gpe_initialize (void)
{
- acpi_native_uint i;
- acpi_native_uint j;
- u32 gpe_block;
- u32 gpe_register;
- u32 gpe_number_index;
- u32 gpe_number;
- acpi_gpe_register_info *gpe_register_info;
- acpi_status status;
+ acpi_native_uint i;
+ acpi_native_uint j;
+ u32 gpe_block;
+ u32 gpe_register;
+ u32 gpe_number_index;
+ u32 gpe_number;
+ struct acpi_gpe_register_info *gpe_register_info;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_gpe_initialize");
@@ -148,7 +148,7 @@ acpi_ev_gpe_initialize (void)
/* Allocate the GPE number-to-index translation table */
acpi_gbl_gpe_number_to_index = ACPI_MEM_CALLOCATE (
- sizeof (acpi_gpe_index_info) *
+ sizeof (struct acpi_gpe_index_info) *
((acpi_size) acpi_gbl_gpe_number_max + 1));
if (!acpi_gbl_gpe_number_to_index) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
@@ -159,13 +159,13 @@ acpi_ev_gpe_initialize (void)
/* Set the Gpe index table to GPE_INVALID */
ACPI_MEMSET (acpi_gbl_gpe_number_to_index, (int) ACPI_GPE_INVALID,
- sizeof (acpi_gpe_index_info) * ((acpi_size) acpi_gbl_gpe_number_max + 1));
+ sizeof (struct acpi_gpe_index_info) * ((acpi_size) acpi_gbl_gpe_number_max + 1));
/* Allocate the GPE register information block */
acpi_gbl_gpe_register_info = ACPI_MEM_CALLOCATE (
(acpi_size) acpi_gbl_gpe_register_count *
- sizeof (acpi_gpe_register_info));
+ sizeof (struct acpi_gpe_register_info));
if (!acpi_gbl_gpe_register_info) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Could not allocate the gpe_register_info table\n"));
@@ -178,7 +178,7 @@ acpi_ev_gpe_initialize (void)
*/
acpi_gbl_gpe_number_info = ACPI_MEM_CALLOCATE (
((acpi_size) acpi_gbl_gpe_register_count * ACPI_GPE_REGISTER_WIDTH) *
- sizeof (acpi_gpe_number_info));
+ sizeof (struct acpi_gpe_number_info));
if (!acpi_gbl_gpe_number_info) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Could not allocate the gpe_number_info table\n"));
goto error_exit2;
@@ -301,16 +301,16 @@ error_exit1:
static acpi_status
acpi_ev_save_method_info (
- acpi_handle obj_handle,
- u32 level,
- void *obj_desc,
- void **return_value)
+ acpi_handle obj_handle,
+ u32 level,
+ void *obj_desc,
+ void **return_value)
{
- u32 gpe_number;
- u32 gpe_number_index;
- char name[ACPI_NAME_SIZE + 1];
- u8 type;
- acpi_status status;
+ u32 gpe_number;
+ u32 gpe_number_index;
+ char name[ACPI_NAME_SIZE + 1];
+ u8 type;
+ acpi_status status;
ACPI_FUNCTION_NAME ("ev_save_method_info");
@@ -319,7 +319,7 @@ acpi_ev_save_method_info (
/* Extract the name from the object and convert to a string */
ACPI_MOVE_UNALIGNED32_TO_32 (name,
- &((acpi_namespace_node *) obj_handle)->name.integer);
+ &((struct acpi_namespace_node *) obj_handle)->name.integer);
name[ACPI_NAME_SIZE] = 0;
/*
@@ -369,7 +369,7 @@ acpi_ev_save_method_info (
* for use during dispatch of this GPE.
*/
acpi_gbl_gpe_number_info [gpe_number_index].type = type;
- acpi_gbl_gpe_number_info [gpe_number_index].method_node = (acpi_namespace_node *) obj_handle;
+ acpi_gbl_gpe_number_info [gpe_number_index].method_node = (struct acpi_namespace_node *) obj_handle;
/*
* Enable the GPE (SCIs should be disabled at this point)
@@ -401,7 +401,7 @@ acpi_ev_save_method_info (
acpi_status
acpi_ev_init_gpe_control_methods (void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_init_gpe_control_methods");
@@ -440,14 +440,14 @@ acpi_ev_init_gpe_control_methods (void)
u32
acpi_ev_gpe_detect (void)
{
- u32 int_status = ACPI_INTERRUPT_NOT_HANDLED;
- u32 i;
- u32 j;
- u8 enabled_status_byte;
- u8 bit_mask;
- acpi_gpe_register_info *gpe_register_info;
- u32 in_value;
- acpi_status status;
+ u32 int_status = ACPI_INTERRUPT_NOT_HANDLED;
+ u32 i;
+ u32 j;
+ u8 enabled_status_byte;
+ u8 bit_mask;
+ struct acpi_gpe_register_info *gpe_register_info;
+ u32 in_value;
+ acpi_status status;
ACPI_FUNCTION_NAME ("ev_gpe_detect");
@@ -528,12 +528,12 @@ acpi_ev_gpe_detect (void)
static void ACPI_SYSTEM_XFACE
acpi_ev_asynch_execute_gpe_method (
- void *context)
+ void *context)
{
- u32 gpe_number = (u32) ACPI_TO_INTEGER (context);
- u32 gpe_number_index;
- acpi_gpe_number_info gpe_info;
- acpi_status status;
+ u32 gpe_number = (u32) ACPI_TO_INTEGER (context);
+ u32 gpe_number_index;
+ struct acpi_gpe_number_info gpe_info;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_asynch_execute_gpe_method");
@@ -607,11 +607,11 @@ acpi_ev_asynch_execute_gpe_method (
u32
acpi_ev_gpe_dispatch (
- u32 gpe_number)
+ u32 gpe_number)
{
- u32 gpe_number_index;
- acpi_gpe_number_info *gpe_info;
- acpi_status status;
+ u32 gpe_number_index;
+ struct acpi_gpe_number_info *gpe_info;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_gpe_dispatch");
diff --git a/drivers/acpi/events/evmisc.c b/drivers/acpi/events/evmisc.c
index bd7d2a729c04..9013890c19bf 100644
--- a/drivers/acpi/events/evmisc.c
+++ b/drivers/acpi/events/evmisc.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@
u8
acpi_ev_is_notify_object (
- acpi_namespace_node *node)
+ struct acpi_namespace_node *node)
{
switch (node->type) {
case ACPI_TYPE_DEVICE:
@@ -80,7 +80,7 @@ acpi_ev_is_notify_object (
u32
acpi_ev_get_gpe_register_index (
- u32 gpe_number)
+ u32 gpe_number)
{
if (gpe_number > acpi_gbl_gpe_number_max) {
@@ -106,7 +106,7 @@ acpi_ev_get_gpe_register_index (
u32
acpi_ev_get_gpe_number_index (
- u32 gpe_number)
+ u32 gpe_number)
{
if (gpe_number > acpi_gbl_gpe_number_max) {
@@ -132,13 +132,13 @@ acpi_ev_get_gpe_number_index (
acpi_status
acpi_ev_queue_notify_request (
- acpi_namespace_node *node,
- u32 notify_value)
+ struct acpi_namespace_node *node,
+ u32 notify_value)
{
- acpi_operand_object *obj_desc;
- acpi_operand_object *handler_obj = NULL;
- acpi_generic_state *notify_info;
- acpi_status status = AE_OK;
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object *handler_obj = NULL;
+ union acpi_generic_state *notify_info;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_NAME ("ev_queue_notify_request");
@@ -250,12 +250,12 @@ acpi_ev_queue_notify_request (
void ACPI_SYSTEM_XFACE
acpi_ev_notify_dispatch (
- void *context)
+ void *context)
{
- acpi_generic_state *notify_info = (acpi_generic_state *) context;
- acpi_notify_handler global_handler = NULL;
- void *global_context = NULL;
- acpi_operand_object *handler_obj;
+ union acpi_generic_state *notify_info = (union acpi_generic_state *) context;
+ acpi_notify_handler global_handler = NULL;
+ void *global_context = NULL;
+ union acpi_operand_object *handler_obj;
ACPI_FUNCTION_ENTRY ();
@@ -316,9 +316,9 @@ acpi_ev_notify_dispatch (
static void ACPI_SYSTEM_XFACE
acpi_ev_global_lock_thread (
- void *context)
+ void *context)
{
- acpi_status status;
+ acpi_status status;
/* Signal threads that are waiting for the lock */
@@ -349,10 +349,10 @@ acpi_ev_global_lock_thread (
static u32
acpi_ev_global_lock_handler (
- void *context)
+ void *context)
{
- u8 acquired = FALSE;
- acpi_status status;
+ u8 acquired = FALSE;
+ acpi_status status;
/*
@@ -395,7 +395,7 @@ acpi_ev_global_lock_handler (
acpi_status
acpi_ev_init_global_lock_handler (void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_init_global_lock_handler");
@@ -433,10 +433,10 @@ acpi_ev_init_global_lock_handler (void)
acpi_status
acpi_ev_acquire_global_lock (
- u16 timeout)
+ u16 timeout)
{
- acpi_status status = AE_OK;
- u8 acquired = FALSE;
+ acpi_status status = AE_OK;
+ u8 acquired = FALSE;
ACPI_FUNCTION_TRACE ("ev_acquire_global_lock");
@@ -499,8 +499,8 @@ acpi_ev_acquire_global_lock (
acpi_status
acpi_ev_release_global_lock (void)
{
- u8 pending = FALSE;
- acpi_status status = AE_OK;
+ u8 pending = FALSE;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ev_release_global_lock");
@@ -554,8 +554,8 @@ acpi_ev_release_global_lock (void)
void
acpi_ev_terminate (void)
{
- acpi_native_uint i;
- acpi_status status;
+ acpi_native_uint i;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_terminate");
diff --git a/drivers/acpi/events/evregion.c b/drivers/acpi/events/evregion.c
index b83bc487c5d5..79ae40cdd4b5 100644
--- a/drivers/acpi/events/evregion.c
+++ b/drivers/acpi/events/evregion.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -48,7 +48,7 @@ acpi_status
acpi_ev_init_address_spaces (
void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_init_address_spaces");
@@ -121,12 +121,12 @@ acpi_ev_init_address_spaces (
static acpi_status
acpi_ev_execute_reg_method (
- acpi_operand_object *region_obj,
- u32 function)
+ union acpi_operand_object *region_obj,
+ u32 function)
{
- acpi_operand_object *params[3];
- acpi_operand_object *region_obj2;
- acpi_status status;
+ union acpi_operand_object *params[3];
+ union acpi_operand_object *region_obj2;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_execute_reg_method");
@@ -203,19 +203,19 @@ cleanup:
acpi_status
acpi_ev_address_space_dispatch (
- acpi_operand_object *region_obj,
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- void *value)
+ union acpi_operand_object *region_obj,
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ void *value)
{
- acpi_status status;
- acpi_status status2;
- acpi_adr_space_handler handler;
- acpi_adr_space_setup region_setup;
- acpi_operand_object *handler_desc;
- acpi_operand_object *region_obj2;
- void *region_context = NULL;
+ acpi_status status;
+ acpi_status status2;
+ acpi_adr_space_handler handler;
+ acpi_adr_space_setup region_setup;
+ union acpi_operand_object *handler_desc;
+ union acpi_operand_object *region_obj2;
+ void *region_context = NULL;
ACPI_FUNCTION_TRACE ("ev_address_space_dispatch");
@@ -352,16 +352,16 @@ acpi_ev_address_space_dispatch (
void
acpi_ev_detach_region(
- acpi_operand_object *region_obj,
- u8 acpi_ns_is_locked)
+ union acpi_operand_object *region_obj,
+ u8 acpi_ns_is_locked)
{
- acpi_operand_object *handler_obj;
- acpi_operand_object *obj_desc;
- acpi_operand_object **last_obj_ptr;
- acpi_adr_space_setup region_setup;
- void *region_context;
- acpi_operand_object *region_obj2;
- acpi_status status;
+ union acpi_operand_object *handler_obj;
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object **last_obj_ptr;
+ acpi_adr_space_setup region_setup;
+ void *region_context;
+ union acpi_operand_object *region_obj2;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_detach_region");
@@ -498,12 +498,12 @@ acpi_ev_detach_region(
acpi_status
acpi_ev_attach_region (
- acpi_operand_object *handler_obj,
- acpi_operand_object *region_obj,
- u8 acpi_ns_is_locked)
+ union acpi_operand_object *handler_obj,
+ union acpi_operand_object *region_obj,
+ u8 acpi_ns_is_locked)
{
- acpi_status status;
- acpi_status status2;
+ acpi_status status;
+ acpi_status status2;
ACPI_FUNCTION_TRACE ("ev_attach_region");
@@ -570,22 +570,22 @@ acpi_ev_attach_region (
acpi_status
acpi_ev_addr_handler_helper (
- acpi_handle obj_handle,
- u32 level,
- void *context,
- void **return_value)
+ acpi_handle obj_handle,
+ u32 level,
+ void *context,
+ void **return_value)
{
- acpi_operand_object *handler_obj;
- acpi_operand_object *tmp_obj;
- acpi_operand_object *obj_desc;
- acpi_namespace_node *node;
- acpi_status status;
+ union acpi_operand_object *handler_obj;
+ union acpi_operand_object *tmp_obj;
+ union acpi_operand_object *obj_desc;
+ struct acpi_namespace_node *node;
+ acpi_status status;
ACPI_FUNCTION_NAME ("ev_addr_handler_helper");
- handler_obj = (acpi_operand_object *) context;
+ handler_obj = (union acpi_operand_object *) context;
/* Parameter validation */
diff --git a/drivers/acpi/events/evrgnini.c b/drivers/acpi/events/evrgnini.c
index 03c5decf5a77..49f75fa541b3 100644
--- a/drivers/acpi/events/evrgnini.c
+++ b/drivers/acpi/events/evrgnini.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -48,13 +48,13 @@
acpi_status
acpi_ev_system_memory_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context)
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context)
{
- acpi_operand_object *region_desc = (acpi_operand_object *) handle;
- acpi_mem_space_context *local_region_context;
+ union acpi_operand_object *region_desc = (union acpi_operand_object *) handle;
+ struct acpi_mem_space_context *local_region_context;
ACPI_FUNCTION_TRACE ("ev_system_memory_region_setup");
@@ -70,7 +70,7 @@ acpi_ev_system_memory_region_setup (
/* Create a new context */
- local_region_context = ACPI_MEM_CALLOCATE (sizeof (acpi_mem_space_context));
+ local_region_context = ACPI_MEM_CALLOCATE (sizeof (struct acpi_mem_space_context));
if (!(local_region_context)) {
return_ACPI_STATUS (AE_NO_MEMORY);
}
@@ -102,10 +102,10 @@ acpi_ev_system_memory_region_setup (
acpi_status
acpi_ev_io_space_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context)
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context)
{
ACPI_FUNCTION_TRACE ("ev_io_space_region_setup");
@@ -140,18 +140,18 @@ acpi_ev_io_space_region_setup (
acpi_status
acpi_ev_pci_config_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context)
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context)
{
- acpi_status status = AE_OK;
- acpi_integer temp;
- acpi_pci_id *pci_id = *region_context;
- acpi_operand_object *handler_obj;
- acpi_namespace_node *node;
- acpi_operand_object *region_obj = (acpi_operand_object *) handle;
- acpi_device_id object_hID;
+ acpi_status status = AE_OK;
+ acpi_integer temp;
+ struct acpi_pci_id *pci_id = *region_context;
+ union acpi_operand_object *handler_obj;
+ struct acpi_namespace_node *node;
+ union acpi_operand_object *region_obj = (union acpi_operand_object *) handle;
+ struct acpi_device_id object_hID;
ACPI_FUNCTION_TRACE ("ev_pci_config_region_setup");
@@ -179,7 +179,7 @@ acpi_ev_pci_config_region_setup (
/* Create a new context */
- pci_id = ACPI_MEM_CALLOCATE (sizeof (acpi_pci_id));
+ pci_id = ACPI_MEM_CALLOCATE (sizeof (struct acpi_pci_id));
if (!pci_id) {
return_ACPI_STATUS (AE_NO_MEMORY);
}
@@ -297,10 +297,10 @@ acpi_ev_pci_config_region_setup (
acpi_status
acpi_ev_pci_bar_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context)
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context)
{
ACPI_FUNCTION_TRACE ("ev_pci_bar_region_setup");
@@ -328,10 +328,10 @@ acpi_ev_pci_bar_region_setup (
acpi_status
acpi_ev_cmos_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context)
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context)
{
ACPI_FUNCTION_TRACE ("ev_cmos_region_setup");
@@ -357,10 +357,10 @@ acpi_ev_cmos_region_setup (
acpi_status
acpi_ev_default_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context)
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context)
{
ACPI_FUNCTION_TRACE ("ev_default_region_setup");
@@ -400,17 +400,17 @@ acpi_ev_default_region_setup (
acpi_status
acpi_ev_initialize_region (
- acpi_operand_object *region_obj,
- u8 acpi_ns_locked)
+ union acpi_operand_object *region_obj,
+ u8 acpi_ns_locked)
{
- acpi_operand_object *handler_obj;
- acpi_operand_object *obj_desc;
- acpi_adr_space_type space_id;
- acpi_namespace_node *node;
- acpi_status status;
- acpi_namespace_node *method_node;
- acpi_name *reg_name_ptr = (acpi_name *) METHOD_NAME__REG;
- acpi_operand_object *region_obj2;
+ union acpi_operand_object *handler_obj;
+ union acpi_operand_object *obj_desc;
+ acpi_adr_space_type space_id;
+ struct acpi_namespace_node *node;
+ acpi_status status;
+ struct acpi_namespace_node *method_node;
+ acpi_name *reg_name_ptr = (acpi_name *) METHOD_NAME__REG;
+ union acpi_operand_object *region_obj2;
ACPI_FUNCTION_TRACE_U32 ("ev_initialize_region", acpi_ns_locked);
diff --git a/drivers/acpi/events/evsci.c b/drivers/acpi/events/evsci.c
index 9e47863dc7ce..a18db61f8274 100644
--- a/drivers/acpi/events/evsci.c
+++ b/drivers/acpi/events/evsci.c
@@ -6,7 +6,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -47,11 +47,11 @@
static u32 ACPI_SYSTEM_XFACE
acpi_ev_sci_handler (
- void *context)
+ void *context)
{
- u32 interrupt_handled = ACPI_INTERRUPT_NOT_HANDLED;
- u32 value;
- acpi_status status;
+ u32 interrupt_handled = ACPI_INTERRUPT_NOT_HANDLED;
+ u32 value;
+ acpi_status status;
ACPI_FUNCTION_TRACE("ev_sci_handler");
@@ -105,7 +105,7 @@ acpi_ev_sci_handler (
u32
acpi_ev_install_sci_handler (void)
{
- u32 status = AE_OK;
+ u32 status = AE_OK;
ACPI_FUNCTION_TRACE ("ev_install_sci_handler");
@@ -139,7 +139,7 @@ acpi_ev_install_sci_handler (void)
acpi_status
acpi_ev_remove_sci_handler (void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ev_remove_sci_handler");
diff --git a/drivers/acpi/events/evxface.c b/drivers/acpi/events/evxface.c
index 8914fc9c8fd7..172aecfa9141 100644
--- a/drivers/acpi/events/evxface.c
+++ b/drivers/acpi/events/evxface.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -50,11 +50,11 @@
acpi_status
acpi_install_fixed_event_handler (
- u32 event,
- acpi_event_handler handler,
- void *context)
+ u32 event,
+ acpi_event_handler handler,
+ void *context)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_install_fixed_event_handler");
@@ -119,10 +119,10 @@ cleanup:
acpi_status
acpi_remove_fixed_event_handler (
- u32 event,
- acpi_event_handler handler)
+ u32 event,
+ acpi_event_handler handler)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("acpi_remove_fixed_event_handler");
@@ -180,15 +180,15 @@ acpi_remove_fixed_event_handler (
acpi_status
acpi_install_notify_handler (
- acpi_handle device,
- u32 handler_type,
- acpi_notify_handler handler,
- void *context)
+ acpi_handle device,
+ u32 handler_type,
+ acpi_notify_handler handler,
+ void *context)
{
- acpi_operand_object *obj_desc;
- acpi_operand_object *notify_obj;
- acpi_namespace_node *node;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object *notify_obj;
+ struct acpi_namespace_node *node;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_install_notify_handler");
@@ -335,14 +335,14 @@ unlock_and_exit:
acpi_status
acpi_remove_notify_handler (
- acpi_handle device,
- u32 handler_type,
- acpi_notify_handler handler)
+ acpi_handle device,
+ u32 handler_type,
+ acpi_notify_handler handler)
{
- acpi_operand_object *notify_obj;
- acpi_operand_object *obj_desc;
- acpi_namespace_node *node;
- acpi_status status;
+ union acpi_operand_object *notify_obj;
+ union acpi_operand_object *obj_desc;
+ struct acpi_namespace_node *node;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_remove_notify_handler");
@@ -467,13 +467,13 @@ unlock_and_exit:
acpi_status
acpi_install_gpe_handler (
- u32 gpe_number,
- u32 type,
- acpi_gpe_handler handler,
- void *context)
+ u32 gpe_number,
+ u32 type,
+ acpi_gpe_handler handler,
+ void *context)
{
- acpi_status status;
- u32 gpe_number_index;
+ acpi_status status;
+ u32 gpe_number_index;
ACPI_FUNCTION_TRACE ("acpi_install_gpe_handler");
@@ -541,11 +541,11 @@ cleanup:
acpi_status
acpi_remove_gpe_handler (
- u32 gpe_number,
- acpi_gpe_handler handler)
+ u32 gpe_number,
+ acpi_gpe_handler handler)
{
- acpi_status status;
- u32 gpe_number_index;
+ acpi_status status;
+ u32 gpe_number_index;
ACPI_FUNCTION_TRACE ("acpi_remove_gpe_handler");
@@ -611,10 +611,10 @@ cleanup:
acpi_status
acpi_acquire_global_lock (
- u16 timeout,
- u32 *handle)
+ u16 timeout,
+ u32 *handle)
{
- acpi_status status;
+ acpi_status status;
if (!handle) {
@@ -652,9 +652,9 @@ acpi_acquire_global_lock (
acpi_status
acpi_release_global_lock (
- u32 handle)
+ u32 handle)
{
- acpi_status status;
+ acpi_status status;
if (handle != acpi_gbl_global_lock_handle) {
diff --git a/drivers/acpi/events/evxfevnt.c b/drivers/acpi/events/evxfevnt.c
index b1375dab658c..69c5ea7b4e16 100644
--- a/drivers/acpi/events/evxfevnt.c
+++ b/drivers/acpi/events/evxfevnt.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -45,7 +45,7 @@
acpi_status
acpi_enable (void)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("acpi_enable");
@@ -92,7 +92,7 @@ acpi_enable (void)
acpi_status
acpi_disable (void)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("acpi_disable");
@@ -138,12 +138,12 @@ acpi_disable (void)
acpi_status
acpi_enable_event (
- u32 event,
- u32 type,
- u32 flags)
+ u32 event,
+ u32 type,
+ u32 flags)
{
- acpi_status status = AE_OK;
- u32 value;
+ acpi_status status = AE_OK;
+ u32 value;
ACPI_FUNCTION_TRACE ("acpi_enable_event");
@@ -232,12 +232,12 @@ acpi_enable_event (
acpi_status
acpi_disable_event (
- u32 event,
- u32 type,
- u32 flags)
+ u32 event,
+ u32 type,
+ u32 flags)
{
- acpi_status status = AE_OK;
- u32 value;
+ acpi_status status = AE_OK;
+ u32 value;
ACPI_FUNCTION_TRACE ("acpi_disable_event");
@@ -323,10 +323,10 @@ acpi_disable_event (
acpi_status
acpi_clear_event (
- u32 event,
- u32 type)
+ u32 event,
+ u32 type)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("acpi_clear_event");
@@ -391,11 +391,11 @@ acpi_clear_event (
acpi_status
acpi_get_event_status (
- u32 event,
- u32 type,
- acpi_event_status *event_status)
+ u32 event,
+ u32 type,
+ acpi_event_status *event_status)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("acpi_get_event_status");
diff --git a/drivers/acpi/events/evxfregn.c b/drivers/acpi/events/evxfregn.c
index a2e6049e8c61..be53770f5479 100644
--- a/drivers/acpi/events/evxfregn.c
+++ b/drivers/acpi/events/evxfregn.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -51,18 +51,18 @@
acpi_status
acpi_install_address_space_handler (
- acpi_handle device,
- acpi_adr_space_type space_id,
- acpi_adr_space_handler handler,
- acpi_adr_space_setup setup,
- void *context)
+ acpi_handle device,
+ acpi_adr_space_type space_id,
+ acpi_adr_space_handler handler,
+ acpi_adr_space_setup setup,
+ void *context)
{
- acpi_operand_object *obj_desc;
- acpi_operand_object *handler_obj;
- acpi_namespace_node *node;
- acpi_status status;
- acpi_object_type type;
- u16 flags = 0;
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object *handler_obj;
+ struct acpi_namespace_node *node;
+ acpi_status status;
+ acpi_object_type type;
+ u16 flags = 0;
ACPI_FUNCTION_TRACE ("acpi_install_address_space_handler");
@@ -281,16 +281,16 @@ unlock_and_exit:
acpi_status
acpi_remove_address_space_handler (
- acpi_handle device,
- acpi_adr_space_type space_id,
- acpi_adr_space_handler handler)
+ acpi_handle device,
+ acpi_adr_space_type space_id,
+ acpi_adr_space_handler handler)
{
- acpi_operand_object *obj_desc;
- acpi_operand_object *handler_obj;
- acpi_operand_object *region_obj;
- acpi_operand_object **last_obj_ptr;
- acpi_namespace_node *node;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object *handler_obj;
+ union acpi_operand_object *region_obj;
+ union acpi_operand_object **last_obj_ptr;
+ struct acpi_namespace_node *node;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_remove_address_space_handler");
diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c
index 945647d48431..c39443cca122 100644
--- a/drivers/acpi/executer/exconfig.c
+++ b/drivers/acpi/executer/exconfig.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -52,13 +52,13 @@
acpi_status
acpi_ex_add_table (
- acpi_table_header *table,
- acpi_namespace_node *parent_node,
- acpi_operand_object **ddb_handle)
+ struct acpi_table_header *table,
+ struct acpi_namespace_node *parent_node,
+ union acpi_operand_object **ddb_handle)
{
- acpi_status status;
- acpi_table_desc table_info;
- acpi_operand_object *obj_desc;
+ acpi_status status;
+ struct acpi_table_desc table_info;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_TRACE ("ex_add_table");
@@ -121,16 +121,16 @@ cleanup:
acpi_status
acpi_ex_load_table_op (
- acpi_walk_state *walk_state,
- acpi_operand_object **return_desc)
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object **return_desc)
{
- acpi_status status;
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_table_header *table;
- acpi_namespace_node *parent_node;
- acpi_namespace_node *start_node;
- acpi_namespace_node *parameter_node = NULL;
- acpi_operand_object *ddb_handle;
+ acpi_status status;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ struct acpi_table_header *table;
+ struct acpi_namespace_node *parent_node;
+ struct acpi_namespace_node *start_node;
+ struct acpi_namespace_node *parameter_node = NULL;
+ union acpi_operand_object *ddb_handle;
ACPI_FUNCTION_TRACE ("ex_load_table_op");
@@ -225,7 +225,7 @@ acpi_ex_load_table_op (
if (parameter_node) {
/* Store the parameter data into the optional parameter object */
- status = acpi_ex_store (operand[5], ACPI_CAST_PTR (acpi_operand_object, parameter_node),
+ status = acpi_ex_store (operand[5], ACPI_CAST_PTR (union acpi_operand_object, parameter_node),
walk_state);
if (ACPI_FAILURE (status)) {
(void) acpi_ex_unload_table (ddb_handle);
@@ -253,17 +253,17 @@ acpi_ex_load_table_op (
acpi_status
acpi_ex_load_op (
- acpi_operand_object *obj_desc,
- acpi_operand_object *target,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object *target,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_operand_object *ddb_handle;
- acpi_operand_object *buffer_desc = NULL;
- acpi_table_header *table_ptr = NULL;
- u8 *table_data_ptr;
- acpi_table_header table_header;
- u32 i;
+ acpi_status status;
+ union acpi_operand_object *ddb_handle;
+ union acpi_operand_object *buffer_desc = NULL;
+ struct acpi_table_header *table_ptr = NULL;
+ u8 *table_data_ptr;
+ struct acpi_table_header table_header;
+ u32 i;
ACPI_FUNCTION_TRACE ("ex_load_op");
@@ -279,7 +279,7 @@ acpi_ex_load_op (
/* Get the table header */
table_header.length = 0;
- for (i = 0; i < sizeof (acpi_table_header); i++) {
+ for (i = 0; i < sizeof (struct acpi_table_header); i++) {
status = acpi_ev_address_space_dispatch (obj_desc, ACPI_READ,
(acpi_physical_address) i, 8,
((u8 *) &table_header) + i);
@@ -297,8 +297,8 @@ acpi_ex_load_op (
/* Copy the header to the buffer */
- ACPI_MEMCPY (table_ptr, &table_header, sizeof (acpi_table_header));
- table_data_ptr = ACPI_PTR_ADD (u8, table_ptr, sizeof (acpi_table_header));
+ ACPI_MEMCPY (table_ptr, &table_header, sizeof (struct acpi_table_header));
+ table_data_ptr = ACPI_PTR_ADD (u8, table_ptr, sizeof (struct acpi_table_header));
/* Get the table from the op region */
@@ -331,7 +331,7 @@ acpi_ex_load_op (
goto cleanup;
}
- table_ptr = ACPI_CAST_PTR (acpi_table_header, buffer_desc->buffer.pointer);
+ table_ptr = ACPI_CAST_PTR (struct acpi_table_header, buffer_desc->buffer.pointer);
break;
@@ -397,11 +397,11 @@ cleanup:
acpi_status
acpi_ex_unload_table (
- acpi_operand_object *ddb_handle)
+ union acpi_operand_object *ddb_handle)
{
- acpi_status status = AE_NOT_IMPLEMENTED;
- acpi_operand_object *table_desc = ddb_handle;
- acpi_table_desc *table_info;
+ acpi_status status = AE_NOT_IMPLEMENTED;
+ union acpi_operand_object *table_desc = ddb_handle;
+ struct acpi_table_desc *table_info;
ACPI_FUNCTION_TRACE ("ex_unload_table");
@@ -421,7 +421,7 @@ acpi_ex_unload_table (
/* Get the actual table descriptor from the ddb_handle */
- table_info = (acpi_table_desc *) table_desc->reference.object;
+ table_info = (struct acpi_table_desc *) table_desc->reference.object;
/*
* Delete the entire namespace under this table Node
diff --git a/drivers/acpi/executer/exconvrt.c b/drivers/acpi/executer/exconvrt.c
index b27833530ef6..fe6e2cae330a 100644
--- a/drivers/acpi/executer/exconvrt.c
+++ b/drivers/acpi/executer/exconvrt.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -48,16 +48,16 @@
acpi_status
acpi_ex_convert_to_integer (
- acpi_operand_object *obj_desc,
- acpi_operand_object **result_desc,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **result_desc,
+ struct acpi_walk_state *walk_state)
{
- u32 i;
- acpi_operand_object *ret_desc;
- u32 count;
- u8 *pointer;
- acpi_integer result;
- acpi_status status;
+ u32 i;
+ union acpi_operand_object *ret_desc;
+ u32 count;
+ u8 *pointer;
+ acpi_integer result;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ex_convert_to_integer", obj_desc);
@@ -182,13 +182,13 @@ acpi_ex_convert_to_integer (
acpi_status
acpi_ex_convert_to_buffer (
- acpi_operand_object *obj_desc,
- acpi_operand_object **result_desc,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **result_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object *ret_desc;
- u32 i;
- u8 *new_buf;
+ union acpi_operand_object *ret_desc;
+ u32 i;
+ u8 *new_buf;
ACPI_FUNCTION_TRACE_PTR ("ex_convert_to_buffer", obj_desc);
@@ -283,19 +283,19 @@ acpi_ex_convert_to_buffer (
u32
acpi_ex_convert_to_ascii (
- acpi_integer integer,
- u32 base,
- u8 *string,
- u8 data_width)
+ acpi_integer integer,
+ u32 base,
+ u8 *string,
+ u8 data_width)
{
- u32 i;
- u32 j;
- u32 k = 0;
- char hex_digit;
- acpi_integer digit;
- u32 remainder;
- u32 length;
- u8 leading_zero;
+ u32 i;
+ u32 j;
+ u32 k = 0;
+ char hex_digit;
+ acpi_integer digit;
+ u32 remainder;
+ u32 length;
+ u8 leading_zero;
ACPI_FUNCTION_ENTRY ();
@@ -389,17 +389,17 @@ acpi_ex_convert_to_ascii (
acpi_status
acpi_ex_convert_to_string (
- acpi_operand_object *obj_desc,
- acpi_operand_object **result_desc,
- u32 base,
- u32 max_length,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **result_desc,
+ u32 base,
+ u32 max_length,
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object *ret_desc;
- u32 i;
- u32 string_length;
- u8 *new_buf;
- u8 *pointer;
+ union acpi_operand_object *ret_desc;
+ u32 i;
+ u32 string_length;
+ u8 *new_buf;
+ u8 *pointer;
ACPI_FUNCTION_TRACE_PTR ("ex_convert_to_string", obj_desc);
@@ -553,12 +553,12 @@ acpi_ex_convert_to_string (
acpi_status
acpi_ex_convert_to_target_type (
- acpi_object_type destination_type,
- acpi_operand_object *source_desc,
- acpi_operand_object **result_desc,
- acpi_walk_state *walk_state)
+ acpi_object_type destination_type,
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object **result_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ex_convert_to_target_type");
diff --git a/drivers/acpi/executer/excreate.c b/drivers/acpi/executer/excreate.c
index e2d9dcac4f3d..f3b33c929e85 100644
--- a/drivers/acpi/executer/excreate.c
+++ b/drivers/acpi/executer/excreate.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -50,11 +50,11 @@
acpi_status
acpi_ex_create_alias (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_namespace_node *target_node;
- acpi_namespace_node *alias_node;
- acpi_status status = AE_OK;
+ struct acpi_namespace_node *target_node;
+ struct acpi_namespace_node *alias_node;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ex_create_alias");
@@ -62,8 +62,8 @@ acpi_ex_create_alias (
/* Get the source/alias operands (both namespace nodes) */
- alias_node = (acpi_namespace_node *) walk_state->operands[0];
- target_node = (acpi_namespace_node *) walk_state->operands[1];
+ alias_node = (struct acpi_namespace_node *) walk_state->operands[0];
+ target_node = (struct acpi_namespace_node *) walk_state->operands[1];
if (target_node->type == ACPI_TYPE_LOCAL_ALIAS) {
/*
@@ -72,7 +72,7 @@ acpi_ex_create_alias (
* always exactly one level of indirection away from the
* actual aliased name.
*/
- target_node = (acpi_namespace_node *) target_node->object;
+ target_node = (struct acpi_namespace_node *) target_node->object;
}
/*
@@ -95,7 +95,7 @@ acpi_ex_create_alias (
* types, the object can change dynamically via a Store.
*/
alias_node->type = ACPI_TYPE_LOCAL_ALIAS;
- alias_node->object = ACPI_CAST_PTR (acpi_operand_object, target_node);
+ alias_node->object = ACPI_CAST_PTR (union acpi_operand_object, target_node);
break;
default:
@@ -134,10 +134,10 @@ acpi_ex_create_alias (
acpi_status
acpi_ex_create_event (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_operand_object *obj_desc;
+ acpi_status status;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_TRACE ("ex_create_event");
@@ -161,7 +161,7 @@ acpi_ex_create_event (
/* Attach object to the Node */
- status = acpi_ns_attach_object ((acpi_namespace_node *) walk_state->operands[0],
+ status = acpi_ns_attach_object ((struct acpi_namespace_node *) walk_state->operands[0],
obj_desc, ACPI_TYPE_EVENT);
cleanup:
@@ -190,10 +190,10 @@ cleanup:
acpi_status
acpi_ex_create_mutex (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
- acpi_operand_object *obj_desc;
+ acpi_status status = AE_OK;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_TRACE_PTR ("ex_create_mutex", ACPI_WALK_OPERANDS);
@@ -220,7 +220,7 @@ acpi_ex_create_mutex (
/* Init object and attach to NS node */
obj_desc->mutex.sync_level = (u8) walk_state->operands[1]->integer.value;
- obj_desc->mutex.node = (acpi_namespace_node *) walk_state->operands[0];
+ obj_desc->mutex.node = (struct acpi_namespace_node *) walk_state->operands[0];
status = acpi_ns_attach_object (obj_desc->mutex.node,
obj_desc, ACPI_TYPE_MUTEX);
@@ -253,15 +253,15 @@ cleanup:
acpi_status
acpi_ex_create_region (
- u8 *aml_start,
- u32 aml_length,
- u8 region_space,
- acpi_walk_state *walk_state)
+ u8 *aml_start,
+ u32 aml_length,
+ u8 region_space,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_operand_object *obj_desc;
- acpi_namespace_node *node;
- acpi_operand_object *region_obj2;
+ acpi_status status;
+ union acpi_operand_object *obj_desc;
+ struct acpi_namespace_node *node;
+ union acpi_operand_object *region_obj2;
ACPI_FUNCTION_TRACE ("ex_create_region");
@@ -344,14 +344,14 @@ cleanup:
acpi_status
acpi_ex_create_table_region (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_operand_object *obj_desc;
- acpi_namespace_node *node;
- acpi_table_header *table;
- acpi_operand_object *region_obj2;
+ acpi_status status;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ union acpi_operand_object *obj_desc;
+ struct acpi_namespace_node *node;
+ struct acpi_table_header *table;
+ union acpi_operand_object *region_obj2;
ACPI_FUNCTION_TRACE ("ex_create_table_region");
@@ -441,11 +441,11 @@ cleanup:
acpi_status
acpi_ex_create_processor (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ex_create_processor", walk_state);
@@ -467,7 +467,7 @@ acpi_ex_create_processor (
/* Install the processor object in the parent Node */
- status = acpi_ns_attach_object ((acpi_namespace_node *) operand[0],
+ status = acpi_ns_attach_object ((struct acpi_namespace_node *) operand[0],
obj_desc, ACPI_TYPE_PROCESSOR);
@@ -494,11 +494,11 @@ acpi_ex_create_processor (
acpi_status
acpi_ex_create_power_resource (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_status status;
- acpi_operand_object *obj_desc;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ acpi_status status;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_TRACE_PTR ("ex_create_power_resource", walk_state);
@@ -518,7 +518,7 @@ acpi_ex_create_power_resource (
/* Install the power resource object in the parent Node */
- status = acpi_ns_attach_object ((acpi_namespace_node *) operand[0],
+ status = acpi_ns_attach_object ((struct acpi_namespace_node *) operand[0],
obj_desc, ACPI_TYPE_POWER);
@@ -546,14 +546,14 @@ acpi_ex_create_power_resource (
acpi_status
acpi_ex_create_method (
- u8 *aml_start,
- u32 aml_length,
- acpi_walk_state *walk_state)
+ u8 *aml_start,
+ u32 aml_length,
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_operand_object *obj_desc;
- acpi_status status;
- u8 method_flags;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
+ u8 method_flags;
ACPI_FUNCTION_TRACE_PTR ("ex_create_method", walk_state);
@@ -597,7 +597,7 @@ acpi_ex_create_method (
/* Attach the new object to the method Node */
- status = acpi_ns_attach_object ((acpi_namespace_node *) operand[0],
+ status = acpi_ns_attach_object ((struct acpi_namespace_node *) operand[0],
obj_desc, ACPI_TYPE_METHOD);
/* Remove local reference to the object */
diff --git a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c
index f109dbce5828..9d35a6e7a082 100644
--- a/drivers/acpi/executer/exdump.c
+++ b/drivers/acpi/executer/exdump.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -53,12 +53,12 @@
void
acpi_ex_dump_operand (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
- u8 *buf = NULL;
- u32 length;
- acpi_operand_object **element;
- u16 element_index;
+ u8 *buf = NULL;
+ u32 length;
+ union acpi_operand_object **element;
+ u16 element_index;
ACPI_FUNCTION_NAME ("ex_dump_operand")
@@ -86,7 +86,7 @@ acpi_ex_dump_operand (
if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) != ACPI_DESC_TYPE_OPERAND) {
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p is not a local object\n", obj_desc));
- ACPI_DUMP_BUFFER (obj_desc, sizeof (acpi_operand_object));
+ ACPI_DUMP_BUFFER (obj_desc, sizeof (union acpi_operand_object));
return;
}
@@ -383,16 +383,16 @@ acpi_ex_dump_operand (
void
acpi_ex_dump_operands (
- acpi_operand_object **operands,
- acpi_interpreter_mode interpreter_mode,
- char *ident,
- u32 num_levels,
- char *note,
- char *module_name,
- u32 line_number)
+ union acpi_operand_object **operands,
+ acpi_interpreter_mode interpreter_mode,
+ char *ident,
+ u32 num_levels,
+ char *note,
+ char *module_name,
+ u32 line_number)
{
- acpi_native_uint i;
- acpi_operand_object **obj_desc;
+ acpi_native_uint i;
+ union acpi_operand_object **obj_desc;
ACPI_FUNCTION_NAME ("ex_dump_operands");
@@ -443,32 +443,32 @@ acpi_ex_dump_operands (
void
acpi_ex_out_string (
- char *title,
- char *value)
+ char *title,
+ char *value)
{
acpi_os_printf ("%20s : %s\n", title, value);
}
void
acpi_ex_out_pointer (
- char *title,
- void *value)
+ char *title,
+ void *value)
{
acpi_os_printf ("%20s : %p\n", title, value);
}
void
acpi_ex_out_integer (
- char *title,
- u32 value)
+ char *title,
+ u32 value)
{
acpi_os_printf ("%20s : %X\n", title, value);
}
void
acpi_ex_out_address (
- char *title,
- acpi_physical_address value)
+ char *title,
+ acpi_physical_address value)
{
#if ACPI_MACHINE_WIDTH == 16
@@ -493,8 +493,8 @@ acpi_ex_out_address (
void
acpi_ex_dump_node (
- acpi_namespace_node *node,
- u32 flags)
+ struct acpi_namespace_node *node,
+ u32 flags)
{
ACPI_FUNCTION_ENTRY ();
@@ -531,10 +531,10 @@ acpi_ex_dump_node (
void
acpi_ex_dump_object_descriptor (
- acpi_operand_object *obj_desc,
- u32 flags)
+ union acpi_operand_object *obj_desc,
+ u32 flags)
{
- u32 i;
+ u32 i;
ACPI_FUNCTION_TRACE ("ex_dump_object_descriptor");
@@ -547,9 +547,9 @@ acpi_ex_dump_object_descriptor (
}
if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) == ACPI_DESC_TYPE_NAMED) {
- acpi_ex_dump_node ((acpi_namespace_node *) obj_desc, flags);
- acpi_os_printf ("\nAttached Object (%p):\n", ((acpi_namespace_node *) obj_desc)->object);
- acpi_ex_dump_object_descriptor (((acpi_namespace_node *) obj_desc)->object, flags);
+ acpi_ex_dump_node ((struct acpi_namespace_node *) obj_desc, flags);
+ acpi_os_printf ("\nAttached Object (%p):\n", ((struct acpi_namespace_node *) obj_desc)->object);
+ acpi_ex_dump_object_descriptor (((struct acpi_namespace_node *) obj_desc)->object, flags);
return;
}
diff --git a/drivers/acpi/executer/exfield.c b/drivers/acpi/executer/exfield.c
index 7ac114676ac1..be98ebb04894 100644
--- a/drivers/acpi/executer/exfield.c
+++ b/drivers/acpi/executer/exfield.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -49,15 +49,15 @@
acpi_status
acpi_ex_read_data_from_field (
- acpi_walk_state *walk_state,
- acpi_operand_object *obj_desc,
- acpi_operand_object **ret_buffer_desc)
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **ret_buffer_desc)
{
- acpi_status status;
- acpi_operand_object *buffer_desc;
- acpi_size length;
- void *buffer;
- u8 locked;
+ acpi_status status;
+ union acpi_operand_object *buffer_desc;
+ acpi_size length;
+ void *buffer;
+ u8 locked;
ACPI_FUNCTION_TRACE_PTR ("ex_read_data_from_field", obj_desc);
@@ -186,17 +186,17 @@ exit:
acpi_status
acpi_ex_write_data_to_field (
- acpi_operand_object *source_desc,
- acpi_operand_object *obj_desc,
- acpi_operand_object **result_desc)
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **result_desc)
{
- acpi_status status;
- u32 length;
- u32 required_length;
- void *buffer;
- void *new_buffer;
- u8 locked;
- acpi_operand_object *buffer_desc;
+ acpi_status status;
+ u32 length;
+ u32 required_length;
+ void *buffer;
+ void *new_buffer;
+ u8 locked;
+ union acpi_operand_object *buffer_desc;
ACPI_FUNCTION_TRACE_PTR ("ex_write_data_to_field", obj_desc);
diff --git a/drivers/acpi/executer/exfldio.c b/drivers/acpi/executer/exfldio.c
index a38dd560a1df..31208e9ecc22 100644
--- a/drivers/acpi/executer/exfldio.c
+++ b/drivers/acpi/executer/exfldio.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -51,11 +51,11 @@
acpi_status
acpi_ex_setup_region (
- acpi_operand_object *obj_desc,
- u32 field_datum_byte_offset)
+ union acpi_operand_object *obj_desc,
+ u32 field_datum_byte_offset)
{
- acpi_status status = AE_OK;
- acpi_operand_object *rgn_desc;
+ acpi_status status = AE_OK;
+ union acpi_operand_object *rgn_desc;
ACPI_FUNCTION_TRACE_U32 ("ex_setup_region", field_datum_byte_offset);
@@ -147,14 +147,14 @@ acpi_ex_setup_region (
acpi_status
acpi_ex_access_region (
- acpi_operand_object *obj_desc,
- u32 field_datum_byte_offset,
- acpi_integer *value,
- u32 function)
+ union acpi_operand_object *obj_desc,
+ u32 field_datum_byte_offset,
+ acpi_integer *value,
+ u32 function)
{
- acpi_status status;
- acpi_operand_object *rgn_desc;
- acpi_physical_address address;
+ acpi_status status;
+ union acpi_operand_object *rgn_desc;
+ acpi_physical_address address;
ACPI_FUNCTION_TRACE ("ex_access_region");
@@ -240,8 +240,8 @@ acpi_ex_access_region (
u8
acpi_ex_register_overflow (
- acpi_operand_object *obj_desc,
- acpi_integer value)
+ union acpi_operand_object *obj_desc,
+ acpi_integer value)
{
if (obj_desc->common_field.bit_length >= ACPI_INTEGER_BIT_SIZE) {
@@ -286,13 +286,13 @@ acpi_ex_register_overflow (
acpi_status
acpi_ex_field_datum_io (
- acpi_operand_object *obj_desc,
- u32 field_datum_byte_offset,
- acpi_integer *value,
- u32 read_write)
+ union acpi_operand_object *obj_desc,
+ u32 field_datum_byte_offset,
+ acpi_integer *value,
+ u32 read_write)
{
- acpi_status status;
- acpi_integer local_value;
+ acpi_status status;
+ acpi_integer local_value;
ACPI_FUNCTION_TRACE_U32 ("ex_field_datum_io", field_datum_byte_offset);
@@ -465,14 +465,14 @@ acpi_ex_field_datum_io (
acpi_status
acpi_ex_write_with_update_rule (
- acpi_operand_object *obj_desc,
- acpi_integer mask,
- acpi_integer field_value,
- u32 field_datum_byte_offset)
+ union acpi_operand_object *obj_desc,
+ acpi_integer mask,
+ acpi_integer field_value,
+ u32 field_datum_byte_offset)
{
- acpi_status status = AE_OK;
- acpi_integer merged_value;
- acpi_integer current_value;
+ acpi_status status = AE_OK;
+ acpi_integer merged_value;
+ acpi_integer current_value;
ACPI_FUNCTION_TRACE_U32 ("ex_write_with_update_rule", mask);
@@ -562,10 +562,10 @@ acpi_ex_write_with_update_rule (
void
acpi_ex_get_buffer_datum(
- acpi_integer *datum,
- void *buffer,
- u32 byte_granularity,
- u32 offset)
+ acpi_integer *datum,
+ void *buffer,
+ u32 byte_granularity,
+ u32 offset)
{
ACPI_FUNCTION_ENTRY ();
@@ -618,10 +618,10 @@ acpi_ex_get_buffer_datum(
void
acpi_ex_set_buffer_datum (
- acpi_integer merged_datum,
- void *buffer,
- u32 byte_granularity,
- u32 offset)
+ acpi_integer merged_datum,
+ void *buffer,
+ u32 byte_granularity,
+ u32 offset)
{
ACPI_FUNCTION_ENTRY ();
@@ -670,18 +670,18 @@ acpi_ex_set_buffer_datum (
acpi_status
acpi_ex_extract_from_field (
- acpi_operand_object *obj_desc,
- void *buffer,
- u32 buffer_length)
+ union acpi_operand_object *obj_desc,
+ void *buffer,
+ u32 buffer_length)
{
- acpi_status status;
- u32 field_datum_byte_offset;
- u32 datum_offset;
- acpi_integer previous_raw_datum;
- acpi_integer this_raw_datum = 0;
- acpi_integer merged_datum = 0;
- u32 byte_field_length;
- u32 datum_count;
+ acpi_status status;
+ u32 field_datum_byte_offset;
+ u32 datum_offset;
+ acpi_integer previous_raw_datum;
+ acpi_integer this_raw_datum = 0;
+ acpi_integer merged_datum = 0;
+ u32 byte_field_length;
+ u32 datum_count;
ACPI_FUNCTION_TRACE ("ex_extract_from_field");
@@ -846,19 +846,19 @@ acpi_ex_extract_from_field (
acpi_status
acpi_ex_insert_into_field (
- acpi_operand_object *obj_desc,
- void *buffer,
- u32 buffer_length)
+ union acpi_operand_object *obj_desc,
+ void *buffer,
+ u32 buffer_length)
{
- acpi_status status;
- u32 field_datum_byte_offset;
- u32 datum_offset;
- acpi_integer mask;
- acpi_integer merged_datum;
- acpi_integer previous_raw_datum;
- acpi_integer this_raw_datum;
- u32 byte_field_length;
- u32 datum_count;
+ acpi_status status;
+ u32 field_datum_byte_offset;
+ u32 datum_offset;
+ acpi_integer mask;
+ acpi_integer merged_datum;
+ acpi_integer previous_raw_datum;
+ acpi_integer this_raw_datum;
+ u32 byte_field_length;
+ u32 datum_count;
ACPI_FUNCTION_TRACE ("ex_insert_into_field");
diff --git a/drivers/acpi/executer/exmisc.c b/drivers/acpi/executer/exmisc.c
index 2629767a4633..0f6a03e80957 100644
--- a/drivers/acpi/executer/exmisc.c
+++ b/drivers/acpi/executer/exmisc.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -50,12 +50,12 @@
acpi_status
acpi_ex_get_object_reference (
- acpi_operand_object *obj_desc,
- acpi_operand_object **return_desc,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **return_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object *reference_obj;
- acpi_operand_object *referenced_obj;
+ union acpi_operand_object *reference_obj;
+ union acpi_operand_object *referenced_obj;
ACPI_FUNCTION_TRACE_PTR ("ex_get_object_reference", obj_desc);
@@ -142,17 +142,17 @@ acpi_ex_get_object_reference (
acpi_status
acpi_ex_concat_template (
- acpi_operand_object *obj_desc1,
- acpi_operand_object *obj_desc2,
- acpi_operand_object **actual_return_desc,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *obj_desc1,
+ union acpi_operand_object *obj_desc2,
+ union acpi_operand_object **actual_return_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object *return_desc;
- u8 *new_buf;
- u8 *end_tag1;
- u8 *end_tag2;
- acpi_size length1;
- acpi_size length2;
+ union acpi_operand_object *return_desc;
+ u8 *new_buf;
+ u8 *end_tag1;
+ u8 *end_tag2;
+ acpi_size length1;
+ acpi_size length2;
ACPI_FUNCTION_TRACE ("ex_concat_template");
@@ -215,16 +215,16 @@ acpi_ex_concat_template (
acpi_status
acpi_ex_do_concatenate (
- acpi_operand_object *obj_desc1,
- acpi_operand_object *obj_desc2,
- acpi_operand_object **actual_return_desc,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *obj_desc1,
+ union acpi_operand_object *obj_desc2,
+ union acpi_operand_object **actual_return_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- u32 i;
- acpi_integer this_integer;
- acpi_operand_object *return_desc;
- char *new_buf;
+ acpi_status status;
+ u32 i;
+ acpi_integer this_integer;
+ union acpi_operand_object *return_desc;
+ char *new_buf;
ACPI_FUNCTION_ENTRY ();
@@ -363,9 +363,9 @@ cleanup:
acpi_integer
acpi_ex_do_math_op (
- u16 opcode,
- acpi_integer operand0,
- acpi_integer operand1)
+ u16 opcode,
+ acpi_integer operand0,
+ acpi_integer operand1)
{
@@ -449,9 +449,9 @@ acpi_ex_do_math_op (
u8
acpi_ex_do_logical_op (
- u16 opcode,
- acpi_integer operand0,
- acpi_integer operand1)
+ u16 opcode,
+ acpi_integer operand0,
+ acpi_integer operand1)
{
diff --git a/drivers/acpi/executer/exmutex.c b/drivers/acpi/executer/exmutex.c
index bac364f30205..d99de76887e4 100644
--- a/drivers/acpi/executer/exmutex.c
+++ b/drivers/acpi/executer/exmutex.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -45,9 +45,9 @@
void
acpi_ex_unlink_mutex (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
- acpi_thread_state *thread = obj_desc->mutex.owner_thread;
+ struct acpi_thread_state *thread = obj_desc->mutex.owner_thread;
if (!thread) {
@@ -82,10 +82,10 @@ acpi_ex_unlink_mutex (
void
acpi_ex_link_mutex (
- acpi_operand_object *obj_desc,
- acpi_thread_state *thread)
+ union acpi_operand_object *obj_desc,
+ struct acpi_thread_state *thread)
{
- acpi_operand_object *list_head;
+ union acpi_operand_object *list_head;
list_head = thread->acquired_mutex_list;
@@ -122,11 +122,11 @@ acpi_ex_link_mutex (
acpi_status
acpi_ex_acquire_mutex (
- acpi_operand_object *time_desc,
- acpi_operand_object *obj_desc,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *time_desc,
+ union acpi_operand_object *obj_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ex_acquire_mutex", obj_desc);
@@ -206,10 +206,10 @@ acpi_ex_acquire_mutex (
acpi_status
acpi_ex_release_mutex (
- acpi_operand_object *obj_desc,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *obj_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ex_release_mutex");
@@ -297,11 +297,11 @@ acpi_ex_release_mutex (
void
acpi_ex_release_all_mutexes (
- acpi_thread_state *thread)
+ struct acpi_thread_state *thread)
{
- acpi_operand_object *next = thread->acquired_mutex_list;
- acpi_operand_object *this;
- acpi_status status;
+ union acpi_operand_object *next = thread->acquired_mutex_list;
+ union acpi_operand_object *this;
+ acpi_status status;
ACPI_FUNCTION_ENTRY ();
diff --git a/drivers/acpi/executer/exnames.c b/drivers/acpi/executer/exnames.c
index fd8159362de2..09b634c89f63 100644
--- a/drivers/acpi/executer/exnames.c
+++ b/drivers/acpi/executer/exnames.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -58,12 +58,12 @@
char *
acpi_ex_allocate_name_string (
- u32 prefix_count,
- u32 num_name_segs)
+ u32 prefix_count,
+ u32 num_name_segs)
{
- char *temp_ptr;
- char *name_string;
- u32 size_needed;
+ char *temp_ptr;
+ char *name_string;
+ u32 size_needed;
ACPI_FUNCTION_TRACE ("ex_allocate_name_string");
@@ -143,13 +143,13 @@ acpi_ex_allocate_name_string (
acpi_status
acpi_ex_name_segment (
- u8 **in_aml_address,
- char *name_string)
+ u8 **in_aml_address,
+ char *name_string)
{
- char *aml_address = (void *) *in_aml_address;
- acpi_status status = AE_OK;
- u32 index;
- char char_buf[5];
+ char *aml_address = (void *) *in_aml_address;
+ acpi_status status = AE_OK;
+ u32 index;
+ char char_buf[5];
ACPI_FUNCTION_TRACE ("ex_name_segment");
@@ -230,17 +230,17 @@ acpi_ex_name_segment (
acpi_status
acpi_ex_get_name_string (
- acpi_object_type data_type,
- u8 *in_aml_address,
- char **out_name_string,
- u32 *out_name_length)
+ acpi_object_type data_type,
+ u8 *in_aml_address,
+ char **out_name_string,
+ u32 *out_name_length)
{
- acpi_status status = AE_OK;
- u8 *aml_address = in_aml_address;
- char *name_string = NULL;
- u32 num_segments;
- u32 prefix_count = 0;
- u8 has_prefix = FALSE;
+ acpi_status status = AE_OK;
+ u8 *aml_address = in_aml_address;
+ char *name_string = NULL;
+ u32 num_segments;
+ u32 prefix_count = 0;
+ u8 has_prefix = FALSE;
ACPI_FUNCTION_TRACE_PTR ("ex_get_name_string", aml_address);
diff --git a/drivers/acpi/executer/exoparg1.c b/drivers/acpi/executer/exoparg1.c
index 2f8a0426803a..5817d8bb2bbf 100644
--- a/drivers/acpi/executer/exoparg1.c
+++ b/drivers/acpi/executer/exoparg1.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -73,10 +73,10 @@
acpi_status
acpi_ex_opcode_1A_0T_0R (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_status status = AE_OK;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_STR ("ex_opcode_1A_0T_0R", acpi_ps_get_opcode_name (walk_state->opcode));
@@ -148,10 +148,10 @@ acpi_ex_opcode_1A_0T_0R (
acpi_status
acpi_ex_opcode_1A_1T_0R (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
- acpi_operand_object **operand = &walk_state->operands[0];
+ acpi_status status = AE_OK;
+ union acpi_operand_object **operand = &walk_state->operands[0];
ACPI_FUNCTION_TRACE_STR ("ex_opcode_1A_1T_0R", acpi_ps_get_opcode_name (walk_state->opcode));
@@ -195,16 +195,16 @@ cleanup:
acpi_status
acpi_ex_opcode_1A_1T_1R (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_operand_object *return_desc = NULL;
- acpi_operand_object *return_desc2 = NULL;
- u32 temp32;
- u32 i;
- u32 j;
- acpi_integer digit;
+ acpi_status status = AE_OK;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ union acpi_operand_object *return_desc = NULL;
+ union acpi_operand_object *return_desc2 = NULL;
+ u32 temp32;
+ u32 i;
+ u32 j;
+ acpi_integer digit;
ACPI_FUNCTION_TRACE_STR ("ex_opcode_1A_1T_1R", acpi_ps_get_opcode_name (walk_state->opcode));
@@ -338,7 +338,7 @@ acpi_ex_opcode_1A_1T_1R (
* different than the return value stored in the result descriptor
* (There are really two return values)
*/
- if ((acpi_namespace_node *) operand[0] == acpi_gbl_root_node) {
+ if ((struct acpi_namespace_node *) operand[0] == acpi_gbl_root_node) {
/*
* This means that the object does not exist in the namespace,
* return FALSE
@@ -486,14 +486,14 @@ cleanup:
acpi_status
acpi_ex_opcode_1A_0T_1R (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_operand_object *temp_desc;
- acpi_operand_object *return_desc = NULL;
- acpi_status status = AE_OK;
- u32 type;
- acpi_integer value;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ union acpi_operand_object *temp_desc;
+ union acpi_operand_object *return_desc = NULL;
+ acpi_status status = AE_OK;
+ u32 type;
+ acpi_integer value;
ACPI_FUNCTION_TRACE_STR ("ex_opcode_1A_0T_0R", acpi_ps_get_opcode_name (walk_state->opcode));
@@ -695,13 +695,13 @@ acpi_ex_opcode_1A_0T_1R (
*/
status = acpi_ns_get_node_by_path (operand[0]->string.pointer,
walk_state->scope_info->scope.node, ACPI_NS_SEARCH_PARENT,
- ACPI_CAST_INDIRECT_PTR (acpi_namespace_node, &return_desc));
+ ACPI_CAST_INDIRECT_PTR (struct acpi_namespace_node, &return_desc));
if (ACPI_FAILURE (status)) {
goto cleanup;
}
status = acpi_ex_resolve_node_to_value (
- ACPI_CAST_INDIRECT_PTR (acpi_namespace_node, &return_desc), walk_state);
+ ACPI_CAST_INDIRECT_PTR (struct acpi_namespace_node, &return_desc), walk_state);
goto cleanup;
@@ -720,7 +720,7 @@ acpi_ex_opcode_1A_0T_1R (
* Get the actual object from the Node (This is the dereference).
* -- This case may only happen when a local_x or arg_x is dereferenced above.
*/
- return_desc = acpi_ns_get_attached_object ((acpi_namespace_node *) operand[0]);
+ return_desc = acpi_ns_get_attached_object ((struct acpi_namespace_node *) operand[0]);
}
else {
/*
@@ -802,7 +802,7 @@ acpi_ex_opcode_1A_0T_1R (
if (ACPI_GET_DESCRIPTOR_TYPE (return_desc) == ACPI_DESC_TYPE_NAMED) {
- return_desc = acpi_ns_get_attached_object ((acpi_namespace_node *) return_desc);
+ return_desc = acpi_ns_get_attached_object ((struct acpi_namespace_node *) return_desc);
}
/* Add another reference to the object! */
diff --git a/drivers/acpi/executer/exoparg2.c b/drivers/acpi/executer/exoparg2.c
index 3562e75107b8..9f1e0d5ab0d0 100644
--- a/drivers/acpi/executer/exoparg2.c
+++ b/drivers/acpi/executer/exoparg2.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -74,11 +74,11 @@
acpi_status
acpi_ex_opcode_2A_0T_0R (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_namespace_node *node;
- acpi_status status = AE_OK;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ struct acpi_namespace_node *node;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_STR ("ex_opcode_2A_0T_0R",
@@ -92,7 +92,7 @@ acpi_ex_opcode_2A_0T_0R (
/* The first operand is a namespace node */
- node = (acpi_namespace_node *) operand[0];
+ node = (struct acpi_namespace_node *) operand[0];
/* Notifies allowed on this object? */
@@ -142,12 +142,12 @@ acpi_ex_opcode_2A_0T_0R (
acpi_status
acpi_ex_opcode_2A_2T_1R (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_operand_object *return_desc1 = NULL;
- acpi_operand_object *return_desc2 = NULL;
- acpi_status status;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ union acpi_operand_object *return_desc1 = NULL;
+ union acpi_operand_object *return_desc2 = NULL;
+ acpi_status status;
ACPI_FUNCTION_TRACE_STR ("ex_opcode_2A_2T_1R", acpi_ps_get_opcode_name (walk_state->opcode));
@@ -239,14 +239,14 @@ cleanup:
acpi_status
acpi_ex_opcode_2A_1T_1R (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_operand_object *return_desc = NULL;
- acpi_operand_object *temp_desc = NULL;
- u32 index;
- acpi_status status = AE_OK;
- acpi_size length;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ union acpi_operand_object *return_desc = NULL;
+ union acpi_operand_object *temp_desc = NULL;
+ u32 index;
+ acpi_status status = AE_OK;
+ acpi_size length;
ACPI_FUNCTION_TRACE_STR ("ex_opcode_2A_1T_1R", acpi_ps_get_opcode_name (walk_state->opcode));
@@ -499,12 +499,12 @@ cleanup:
acpi_status
acpi_ex_opcode_2A_0T_1R (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_operand_object *return_desc = NULL;
- acpi_status status = AE_OK;
- u8 logical_result = FALSE;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ union acpi_operand_object *return_desc = NULL;
+ acpi_status status = AE_OK;
+ u8 logical_result = FALSE;
ACPI_FUNCTION_TRACE_STR ("ex_opcode_2A_0T_1R", acpi_ps_get_opcode_name (walk_state->opcode));
diff --git a/drivers/acpi/executer/exoparg3.c b/drivers/acpi/executer/exoparg3.c
index f3cab1837b83..32f4cad514a6 100644
--- a/drivers/acpi/executer/exoparg3.c
+++ b/drivers/acpi/executer/exoparg3.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -71,11 +71,11 @@
acpi_status
acpi_ex_opcode_3A_0T_0R (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_signal_fatal_info *fatal;
- acpi_status status = AE_OK;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ struct acpi_signal_fatal_info *fatal;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_STR ("ex_opcode_3A_0T_0R", acpi_ps_get_opcode_name (walk_state->opcode));
@@ -91,7 +91,7 @@ acpi_ex_opcode_3A_0T_0R (
(u32) operand[2]->integer.value));
- fatal = ACPI_MEM_ALLOCATE (sizeof (acpi_signal_fatal_info));
+ fatal = ACPI_MEM_ALLOCATE (sizeof (struct acpi_signal_fatal_info));
if (fatal) {
fatal->type = (u32) operand[0]->integer.value;
fatal->code = (u32) operand[1]->integer.value;
@@ -138,14 +138,14 @@ cleanup:
acpi_status
acpi_ex_opcode_3A_1T_1R (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_operand_object *return_desc = NULL;
- char *buffer;
- acpi_status status = AE_OK;
- acpi_native_uint index;
- acpi_size length;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ union acpi_operand_object *return_desc = NULL;
+ char *buffer;
+ acpi_status status = AE_OK;
+ acpi_native_uint index;
+ acpi_size length;
ACPI_FUNCTION_TRACE_STR ("ex_opcode_3A_1T_1R", acpi_ps_get_opcode_name (walk_state->opcode));
diff --git a/drivers/acpi/executer/exoparg6.c b/drivers/acpi/executer/exoparg6.c
index 3260c23bed3d..c7edcbd15eb9 100644
--- a/drivers/acpi/executer/exoparg6.c
+++ b/drivers/acpi/executer/exoparg6.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -73,9 +73,9 @@
u8
acpi_ex_do_match (
- u32 match_op,
- acpi_integer package_value,
- acpi_integer match_value)
+ u32 match_op,
+ acpi_integer package_value,
+ acpi_integer match_value)
{
switch (match_op) {
@@ -148,13 +148,13 @@ acpi_ex_do_match (
acpi_status
acpi_ex_opcode_6A_0T_1R (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object **operand = &walk_state->operands[0];
- acpi_operand_object *return_desc = NULL;
- acpi_status status = AE_OK;
- u32 index;
- acpi_operand_object *this_element;
+ union acpi_operand_object **operand = &walk_state->operands[0];
+ union acpi_operand_object *return_desc = NULL;
+ acpi_status status = AE_OK;
+ u32 index;
+ union acpi_operand_object *this_element;
ACPI_FUNCTION_TRACE_STR ("ex_opcode_6A_0T_1R", acpi_ps_get_opcode_name (walk_state->opcode));
diff --git a/drivers/acpi/executer/exprep.c b/drivers/acpi/executer/exprep.c
index 11ea877c9dc2..61ea5bf86519 100644
--- a/drivers/acpi/executer/exprep.c
+++ b/drivers/acpi/executer/exprep.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -50,14 +50,14 @@
static u32
acpi_ex_decode_field_access (
- acpi_operand_object *obj_desc,
- u8 field_flags,
- u32 *return_byte_alignment)
+ union acpi_operand_object *obj_desc,
+ u8 field_flags,
+ u32 *return_byte_alignment)
{
- u32 access;
- u8 byte_alignment;
- u8 bit_length;
-/* u32 Length; */
+ u32 access;
+ u8 byte_alignment;
+ u8 bit_length;
+/* u32 Length; */
ACPI_FUNCTION_NAME ("ex_decode_field_access");
@@ -171,15 +171,15 @@ acpi_ex_decode_field_access (
acpi_status
acpi_ex_prep_common_field_object (
- acpi_operand_object *obj_desc,
- u8 field_flags,
- u8 field_attribute,
- u32 field_bit_position,
- u32 field_bit_length)
+ union acpi_operand_object *obj_desc,
+ u8 field_flags,
+ u8 field_attribute,
+ u32 field_bit_position,
+ u32 field_bit_length)
{
- u32 access_bit_width;
- u32 byte_alignment;
- u32 nearest_byte_address;
+ u32 access_bit_width;
+ u32 byte_alignment;
+ u32 nearest_byte_address;
ACPI_FUNCTION_TRACE ("ex_prep_common_field_object");
@@ -289,18 +289,18 @@ acpi_ex_prep_common_field_object (
*
* RETURN: Status
*
- * DESCRIPTION: Construct an acpi_operand_object of type def_field and
+ * DESCRIPTION: Construct an union acpi_operand_object of type def_field and
* connect it to the parent Node.
*
******************************************************************************/
acpi_status
acpi_ex_prep_field_value (
- acpi_create_field_info *info)
+ struct acpi_create_field_info *info)
{
- acpi_operand_object *obj_desc;
- u32 type;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ u32 type;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ex_prep_field_value");
diff --git a/drivers/acpi/executer/exregion.c b/drivers/acpi/executer/exregion.c
index b77fa6b6985d..d950461a00d4 100644
--- a/drivers/acpi/executer/exregion.c
+++ b/drivers/acpi/executer/exregion.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -52,20 +52,20 @@
acpi_status
acpi_ex_system_memory_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context)
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context)
{
- acpi_status status = AE_OK;
- void *logical_addr_ptr = NULL;
- acpi_mem_space_context *mem_info = region_context;
- u32 length;
- acpi_size window_size;
+ acpi_status status = AE_OK;
+ void *logical_addr_ptr = NULL;
+ struct acpi_mem_space_context *mem_info = region_context;
+ u32 length;
+ acpi_size window_size;
#ifndef _HW_ALIGNMENT_SUPPORT
- u32 remainder;
+ u32 remainder;
#endif
ACPI_FUNCTION_TRACE ("ex_system_memory_space_handler");
@@ -256,14 +256,14 @@ acpi_ex_system_memory_space_handler (
acpi_status
acpi_ex_system_io_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context)
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ex_system_io_space_handler");
@@ -316,16 +316,16 @@ acpi_ex_system_io_space_handler (
acpi_status
acpi_ex_pci_config_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context)
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context)
{
- acpi_status status = AE_OK;
- acpi_pci_id *pci_id;
- u16 pci_register;
+ acpi_status status = AE_OK;
+ struct acpi_pci_id *pci_id;
+ u16 pci_register;
ACPI_FUNCTION_TRACE ("ex_pci_config_space_handler");
@@ -343,7 +343,7 @@ acpi_ex_pci_config_space_handler (
* Value - input value for write, output address for read
*
*/
- pci_id = (acpi_pci_id *) region_context;
+ pci_id = (struct acpi_pci_id *) region_context;
pci_register = (u16) (u32) address;
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
@@ -393,14 +393,14 @@ acpi_ex_pci_config_space_handler (
acpi_status
acpi_ex_cmos_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context)
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ex_cmos_space_handler");
@@ -430,14 +430,14 @@ acpi_ex_cmos_space_handler (
acpi_status
acpi_ex_pci_bar_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context)
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ex_pci_bar_space_handler");
@@ -467,17 +467,17 @@ acpi_ex_pci_bar_space_handler (
acpi_status
acpi_ex_data_table_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context)
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context)
{
- acpi_status status = AE_OK;
- u32 byte_width = ACPI_DIV_8 (bit_width);
- u32 i;
- char *logical_addr_ptr;
+ acpi_status status = AE_OK;
+ u32 byte_width = ACPI_DIV_8 (bit_width);
+ u32 i;
+ char *logical_addr_ptr;
ACPI_FUNCTION_TRACE ("ex_data_table_space_handler");
diff --git a/drivers/acpi/executer/exresnte.c b/drivers/acpi/executer/exresnte.c
index e1510cf46429..8940f20f3853 100644
--- a/drivers/acpi/executer/exresnte.c
+++ b/drivers/acpi/executer/exresnte.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -62,22 +62,22 @@
acpi_status
acpi_ex_resolve_node_to_value (
- acpi_namespace_node **object_ptr,
- acpi_walk_state *walk_state)
+ struct acpi_namespace_node **object_ptr,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
- acpi_operand_object *source_desc;
- acpi_operand_object *obj_desc = NULL;
- acpi_namespace_node *node;
- acpi_object_type entry_type;
+ acpi_status status = AE_OK;
+ union acpi_operand_object *source_desc;
+ union acpi_operand_object *obj_desc = NULL;
+ struct acpi_namespace_node *node;
+ acpi_object_type entry_type;
ACPI_FUNCTION_TRACE ("ex_resolve_node_to_value");
/*
- * The stack pointer points to a acpi_namespace_node (Node). Get the
+ * The stack pointer points to a struct acpi_namespace_node (Node). Get the
* object that is attached to the Node.
*/
node = *object_ptr;
@@ -90,7 +90,7 @@ acpi_ex_resolve_node_to_value (
if (entry_type == ACPI_TYPE_LOCAL_ALIAS) {
/* There is always exactly one level of indirection */
- node = (acpi_namespace_node *) node->object;
+ node = (struct acpi_namespace_node *) node->object;
source_desc = acpi_ns_get_attached_object (node);
entry_type = acpi_ns_get_type ((acpi_handle) node);
*object_ptr = node;
diff --git a/drivers/acpi/executer/exresolv.c b/drivers/acpi/executer/exresolv.c
index 0222d9c9d90f..92a5d4bb3c70 100644
--- a/drivers/acpi/executer/exresolv.c
+++ b/drivers/acpi/executer/exresolv.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@
* FUNCTION: acpi_ex_resolve_to_value
*
* PARAMETERS: **stack_ptr - Points to entry on obj_stack, which can
- * be either an (acpi_operand_object *)
+ * be either an (union acpi_operand_object *)
* or an acpi_handle.
* walk_state - Current method state
*
@@ -52,10 +52,10 @@
acpi_status
acpi_ex_resolve_to_value (
- acpi_operand_object **stack_ptr,
- acpi_walk_state *walk_state)
+ union acpi_operand_object **stack_ptr,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ex_resolve_to_value", stack_ptr);
@@ -68,8 +68,8 @@ acpi_ex_resolve_to_value (
/*
* The entity pointed to by the stack_ptr can be either
- * 1) A valid acpi_operand_object, or
- * 2) A acpi_namespace_node (named_obj)
+ * 1) A valid union acpi_operand_object, or
+ * 2) A struct acpi_namespace_node (named_obj)
*/
if (ACPI_GET_DESCRIPTOR_TYPE (*stack_ptr) == ACPI_DESC_TYPE_OPERAND) {
status = acpi_ex_resolve_object_to_value (stack_ptr, walk_state);
@@ -84,7 +84,7 @@ acpi_ex_resolve_to_value (
*/
if (ACPI_GET_DESCRIPTOR_TYPE (*stack_ptr) == ACPI_DESC_TYPE_NAMED) {
status = acpi_ex_resolve_node_to_value (
- ACPI_CAST_INDIRECT_PTR (acpi_namespace_node, stack_ptr),
+ ACPI_CAST_INDIRECT_PTR (struct acpi_namespace_node, stack_ptr),
walk_state);
if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status);
@@ -113,14 +113,14 @@ acpi_ex_resolve_to_value (
acpi_status
acpi_ex_resolve_object_to_value (
- acpi_operand_object **stack_ptr,
- acpi_walk_state *walk_state)
+ union acpi_operand_object **stack_ptr,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
- acpi_operand_object *stack_desc;
- void *temp_node;
- acpi_operand_object *obj_desc;
- u16 opcode;
+ acpi_status status = AE_OK;
+ union acpi_operand_object *stack_desc;
+ void *temp_node;
+ union acpi_operand_object *obj_desc;
+ u16 opcode;
ACPI_FUNCTION_TRACE ("ex_resolve_object_to_value");
@@ -128,7 +128,7 @@ acpi_ex_resolve_object_to_value (
stack_desc = *stack_ptr;
- /* This is an acpi_operand_object */
+ /* This is an union acpi_operand_object */
switch (ACPI_GET_OBJECT_TYPE (stack_desc)) {
case ACPI_TYPE_LOCAL_REFERENCE:
@@ -298,14 +298,14 @@ acpi_ex_resolve_object_to_value (
acpi_status
acpi_ex_resolve_multiple (
- acpi_walk_state *walk_state,
- acpi_operand_object *operand,
- acpi_object_type *return_type,
- acpi_operand_object **return_desc)
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object *operand,
+ acpi_object_type *return_type,
+ union acpi_operand_object **return_desc)
{
- acpi_operand_object *obj_desc = (void *) operand;
- acpi_namespace_node *node;
- acpi_object_type type;
+ union acpi_operand_object *obj_desc = (void *) operand;
+ struct acpi_namespace_node *node;
+ acpi_object_type type;
ACPI_FUNCTION_TRACE ("acpi_ex_resolve_multiple");
diff --git a/drivers/acpi/executer/exresop.c b/drivers/acpi/executer/exresop.c
index 719cbd2979b8..e9fc7af37be7 100644
--- a/drivers/acpi/executer/exresop.c
+++ b/drivers/acpi/executer/exresop.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -50,9 +50,9 @@
acpi_status
acpi_ex_check_object_type (
- acpi_object_type type_needed,
- acpi_object_type this_type,
- void *object)
+ acpi_object_type type_needed,
+ acpi_object_type this_type,
+ void *object)
{
ACPI_FUNCTION_NAME ("ex_check_object_type");
@@ -70,7 +70,7 @@ acpi_ex_check_object_type (
* specification, a store to a constant is a noop.)
*/
if ((this_type == ACPI_TYPE_INTEGER) &&
- (((acpi_operand_object *) object)->common.flags & AOPOBJ_AML_CONSTANT)) {
+ (((union acpi_operand_object *) object)->common.flags & AOPOBJ_AML_CONSTANT)) {
return (AE_OK);
}
}
@@ -111,18 +111,18 @@ acpi_ex_check_object_type (
acpi_status
acpi_ex_resolve_operands (
- u16 opcode,
- acpi_operand_object **stack_ptr,
- acpi_walk_state *walk_state)
+ u16 opcode,
+ union acpi_operand_object **stack_ptr,
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object *obj_desc;
- acpi_status status = AE_OK;
- u8 object_type;
- void *temp_node;
- u32 arg_types;
- const acpi_opcode_info *op_info;
- u32 this_arg_type;
- acpi_object_type type_needed;
+ union acpi_operand_object *obj_desc;
+ acpi_status status = AE_OK;
+ u8 object_type;
+ void *temp_node;
+ u32 arg_types;
+ const struct acpi_opcode_info *op_info;
+ u32 this_arg_type;
+ acpi_object_type type_needed;
ACPI_FUNCTION_TRACE_U32 ("ex_resolve_operands", opcode);
@@ -170,7 +170,7 @@ acpi_ex_resolve_operands (
/* Node */
- object_type = ((acpi_namespace_node *) obj_desc)->type;
+ object_type = ((struct acpi_namespace_node *) obj_desc)->type;
break;
diff --git a/drivers/acpi/executer/exstore.c b/drivers/acpi/executer/exstore.c
index a22e0b266091..63545463f4cc 100644
--- a/drivers/acpi/executer/exstore.c
+++ b/drivers/acpi/executer/exstore.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@
*
* PARAMETERS: *source_desc - Value to be stored
* *dest_desc - Where to store it. Must be an NS node
- * or an acpi_operand_object of type
+ * or an union acpi_operand_object of type
* Reference;
* walk_state - Current walk state
*
@@ -57,12 +57,12 @@
acpi_status
acpi_ex_store (
- acpi_operand_object *source_desc,
- acpi_operand_object *dest_desc,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *dest_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
- acpi_operand_object *ref_desc = dest_desc;
+ acpi_status status = AE_OK;
+ union acpi_operand_object *ref_desc = dest_desc;
ACPI_FUNCTION_TRACE_PTR ("ex_store", dest_desc);
@@ -83,7 +83,7 @@ acpi_ex_store (
* Storing an object into a Named node.
*/
status = acpi_ex_store_object_to_node (source_desc,
- (acpi_namespace_node *) dest_desc, walk_state);
+ (struct acpi_namespace_node *) dest_desc, walk_state);
return_ACPI_STATUS (status);
}
@@ -237,14 +237,14 @@ acpi_ex_store (
acpi_status
acpi_ex_store_object_to_index (
- acpi_operand_object *source_desc,
- acpi_operand_object *index_desc,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *index_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
- acpi_operand_object *obj_desc;
- acpi_operand_object *new_desc;
- u8 value = 0;
+ acpi_status status = AE_OK;
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object *new_desc;
+ u8 value = 0;
ACPI_FUNCTION_TRACE ("ex_store_object_to_index");
@@ -390,14 +390,14 @@ acpi_ex_store_object_to_index (
acpi_status
acpi_ex_store_object_to_node (
- acpi_operand_object *source_desc,
- acpi_namespace_node *node,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *source_desc,
+ struct acpi_namespace_node *node,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
- acpi_operand_object *target_desc;
- acpi_operand_object *new_desc;
- acpi_object_type target_type;
+ acpi_status status = AE_OK;
+ union acpi_operand_object *target_desc;
+ union acpi_operand_object *new_desc;
+ acpi_object_type target_type;
ACPI_FUNCTION_TRACE_PTR ("ex_store_object_to_node", source_desc);
diff --git a/drivers/acpi/executer/exstoren.c b/drivers/acpi/executer/exstoren.c
index 222cc6b307ad..baafa32f3892 100644
--- a/drivers/acpi/executer/exstoren.c
+++ b/drivers/acpi/executer/exstoren.c
@@ -7,7 +7,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -50,12 +50,12 @@
acpi_status
acpi_ex_resolve_object (
- acpi_operand_object **source_desc_ptr,
- acpi_object_type target_type,
- acpi_walk_state *walk_state)
+ union acpi_operand_object **source_desc_ptr,
+ acpi_object_type target_type,
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object *source_desc = *source_desc_ptr;
- acpi_status status = AE_OK;
+ union acpi_operand_object *source_desc = *source_desc_ptr;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ex_resolve_object");
@@ -171,13 +171,13 @@ acpi_ex_resolve_object (
acpi_status
acpi_ex_store_object_to_object (
- acpi_operand_object *source_desc,
- acpi_operand_object *dest_desc,
- acpi_operand_object **new_desc,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *dest_desc,
+ union acpi_operand_object **new_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_operand_object *actual_src_desc;
- acpi_status status = AE_OK;
+ union acpi_operand_object *actual_src_desc;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_PTR ("ex_store_object_to_object", source_desc);
diff --git a/drivers/acpi/executer/exstorob.c b/drivers/acpi/executer/exstorob.c
index 496cf0798859..54927552508a 100644
--- a/drivers/acpi/executer/exstorob.c
+++ b/drivers/acpi/executer/exstorob.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -47,11 +47,11 @@
acpi_status
acpi_ex_store_buffer_to_buffer (
- acpi_operand_object *source_desc,
- acpi_operand_object *target_desc)
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *target_desc)
{
- u32 length;
- u8 *buffer;
+ u32 length;
+ u8 *buffer;
ACPI_FUNCTION_TRACE_PTR ("ex_store_buffer_to_buffer", source_desc);
@@ -121,11 +121,11 @@ acpi_ex_store_buffer_to_buffer (
acpi_status
acpi_ex_store_string_to_string (
- acpi_operand_object *source_desc,
- acpi_operand_object *target_desc)
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *target_desc)
{
- u32 length;
- u8 *buffer;
+ u32 length;
+ u8 *buffer;
ACPI_FUNCTION_TRACE_PTR ("ex_store_string_to_string", source_desc);
diff --git a/drivers/acpi/executer/exsystem.c b/drivers/acpi/executer/exsystem.c
index 6af31b016a83..31927d24f404 100644
--- a/drivers/acpi/executer/exsystem.c
+++ b/drivers/acpi/executer/exsystem.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -49,11 +49,11 @@
acpi_status
acpi_ex_system_wait_semaphore (
- acpi_handle semaphore,
- u16 timeout)
+ acpi_handle semaphore,
+ u16 timeout)
{
- acpi_status status;
- acpi_status status2;
+ acpi_status status;
+ acpi_status status2;
ACPI_FUNCTION_TRACE ("ex_system_wait_semaphore");
@@ -102,9 +102,9 @@ acpi_ex_system_wait_semaphore (
acpi_status
acpi_ex_system_do_stall (
- u32 how_long)
+ u32 how_long)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_ENTRY ();
@@ -144,9 +144,9 @@ acpi_ex_system_do_stall (
acpi_status
acpi_ex_system_do_suspend (
- u32 how_long)
+ u32 how_long)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_ENTRY ();
@@ -183,10 +183,10 @@ acpi_ex_system_do_suspend (
acpi_status
acpi_ex_system_acquire_mutex (
- acpi_operand_object *time_desc,
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *time_desc,
+ union acpi_operand_object *obj_desc)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_PTR ("ex_system_acquire_mutex", obj_desc);
@@ -227,9 +227,9 @@ acpi_ex_system_acquire_mutex (
acpi_status
acpi_ex_system_release_mutex (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ex_system_release_mutex");
@@ -267,9 +267,9 @@ acpi_ex_system_release_mutex (
acpi_status
acpi_ex_system_signal_event (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ex_system_signal_event");
@@ -300,10 +300,10 @@ acpi_ex_system_signal_event (
acpi_status
acpi_ex_system_wait_event (
- acpi_operand_object *time_desc,
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *time_desc,
+ union acpi_operand_object *obj_desc)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ex_system_wait_event");
@@ -332,10 +332,10 @@ acpi_ex_system_wait_event (
acpi_status
acpi_ex_system_reset_event (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
- acpi_status status = AE_OK;
- void *temp_semaphore;
+ acpi_status status = AE_OK;
+ void *temp_semaphore;
ACPI_FUNCTION_ENTRY ();
diff --git a/drivers/acpi/executer/exutils.c b/drivers/acpi/executer/exutils.c
index ecd2db932dda..0b5dbb3e5fa0 100644
--- a/drivers/acpi/executer/exutils.c
+++ b/drivers/acpi/executer/exutils.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -65,7 +65,7 @@
acpi_status
acpi_ex_enter_interpreter (void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ex_enter_interpreter");
@@ -102,7 +102,7 @@ acpi_ex_enter_interpreter (void)
void
acpi_ex_exit_interpreter (void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ex_exit_interpreter");
@@ -132,7 +132,7 @@ acpi_ex_exit_interpreter (void)
void
acpi_ex_truncate_for32bit_table (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
ACPI_FUNCTION_ENTRY ();
@@ -174,10 +174,10 @@ acpi_ex_truncate_for32bit_table (
u8
acpi_ex_acquire_global_lock (
- u32 field_flags)
+ u32 field_flags)
{
- u8 locked = FALSE;
- acpi_status status;
+ u8 locked = FALSE;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ex_acquire_global_lock");
@@ -217,9 +217,9 @@ acpi_ex_acquire_global_lock (
void
acpi_ex_release_global_lock (
- u8 locked_by_me)
+ u8 locked_by_me)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ex_release_global_lock");
@@ -256,12 +256,12 @@ acpi_ex_release_global_lock (
u32
acpi_ex_digits_needed (
- acpi_integer value,
- u32 base)
+ acpi_integer value,
+ u32 base)
{
- u32 num_digits;
- acpi_integer current_value;
- acpi_integer quotient;
+ u32 num_digits;
+ acpi_integer current_value;
+ acpi_integer quotient;
ACPI_FUNCTION_TRACE ("ex_digits_needed");
@@ -296,10 +296,10 @@ acpi_ex_digits_needed (
void
acpi_ex_eisa_id_to_string (
- u32 numeric_id,
- char *out_string)
+ u32 numeric_id,
+ char *out_string)
{
- u32 eisa_id;
+ u32 eisa_id;
ACPI_FUNCTION_ENTRY ();
@@ -333,13 +333,13 @@ acpi_ex_eisa_id_to_string (
void
acpi_ex_unsigned_integer_to_string (
- acpi_integer value,
- char *out_string)
+ acpi_integer value,
+ char *out_string)
{
- u32 count;
- u32 digits_needed;
- u32 remainder;
- acpi_integer quotient;
+ u32 count;
+ u32 digits_needed;
+ u32 remainder;
+ acpi_integer quotient;
ACPI_FUNCTION_ENTRY ();
diff --git a/drivers/acpi/hardware/hwacpi.c b/drivers/acpi/hardware/hwacpi.c
index 0b1bf2239a8d..6fa3ad5eea10 100644
--- a/drivers/acpi/hardware/hwacpi.c
+++ b/drivers/acpi/hardware/hwacpi.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@ acpi_status
acpi_hw_initialize (
void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("hw_initialize");
@@ -86,11 +86,11 @@ acpi_hw_initialize (
acpi_status
acpi_hw_set_mode (
- u32 mode)
+ u32 mode)
{
- acpi_status status;
- u32 retry;
+ acpi_status status;
+ u32 retry;
ACPI_FUNCTION_TRACE ("hw_set_mode");
@@ -183,8 +183,8 @@ acpi_hw_set_mode (
u32
acpi_hw_get_mode (void)
{
- acpi_status status;
- u32 value;
+ acpi_status status;
+ u32 value;
ACPI_FUNCTION_TRACE ("hw_get_mode");
diff --git a/drivers/acpi/hardware/hwgpe.c b/drivers/acpi/hardware/hwgpe.c
index 56507fdfaf38..c227eb8e9f54 100644
--- a/drivers/acpi/hardware/hwgpe.c
+++ b/drivers/acpi/hardware/hwgpe.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -44,7 +44,7 @@
u8
acpi_hw_get_gpe_bit_mask (
- u32 gpe_number)
+ u32 gpe_number)
{
return (acpi_gbl_gpe_number_info [acpi_ev_get_gpe_number_index (gpe_number)].bit_mask);
}
@@ -64,12 +64,12 @@ acpi_hw_get_gpe_bit_mask (
acpi_status
acpi_hw_enable_gpe (
- u32 gpe_number)
+ u32 gpe_number)
{
- u32 in_byte;
- u32 register_index;
- u8 bit_mask;
- acpi_status status;
+ u32 in_byte;
+ u32 register_index;
+ u8 bit_mask;
+ acpi_status status;
ACPI_FUNCTION_ENTRY ();
@@ -115,10 +115,10 @@ acpi_hw_enable_gpe (
void
acpi_hw_enable_gpe_for_wakeup (
- u32 gpe_number)
+ u32 gpe_number)
{
- u32 register_index;
- u8 bit_mask;
+ u32 register_index;
+ u8 bit_mask;
ACPI_FUNCTION_ENTRY ();
@@ -153,12 +153,12 @@ acpi_hw_enable_gpe_for_wakeup (
acpi_status
acpi_hw_disable_gpe (
- u32 gpe_number)
+ u32 gpe_number)
{
- u32 in_byte;
- u32 register_index;
- u8 bit_mask;
- acpi_status status;
+ u32 in_byte;
+ u32 register_index;
+ u8 bit_mask;
+ acpi_status status;
ACPI_FUNCTION_ENTRY ();
@@ -208,10 +208,10 @@ acpi_hw_disable_gpe (
void
acpi_hw_disable_gpe_for_wakeup (
- u32 gpe_number)
+ u32 gpe_number)
{
- u32 register_index;
- u8 bit_mask;
+ u32 register_index;
+ u8 bit_mask;
ACPI_FUNCTION_ENTRY ();
@@ -246,11 +246,11 @@ acpi_hw_disable_gpe_for_wakeup (
acpi_status
acpi_hw_clear_gpe (
- u32 gpe_number)
+ u32 gpe_number)
{
- u32 register_index;
- u8 bit_mask;
- acpi_status status;
+ u32 register_index;
+ u8 bit_mask;
+ acpi_status status;
ACPI_FUNCTION_ENTRY ();
@@ -289,14 +289,14 @@ acpi_hw_clear_gpe (
acpi_status
acpi_hw_get_gpe_status (
- u32 gpe_number,
- acpi_event_status *event_status)
+ u32 gpe_number,
+ acpi_event_status *event_status)
{
- u32 in_byte = 0;
- u32 register_index = 0;
- u8 bit_mask = 0;
- acpi_gpe_register_info *gpe_register_info;
- acpi_status status;
+ u32 in_byte = 0;
+ u32 register_index = 0;
+ u8 bit_mask = 0;
+ struct acpi_gpe_register_info *gpe_register_info;
+ acpi_status status;
ACPI_FUNCTION_ENTRY ();
@@ -368,10 +368,10 @@ acpi_status
acpi_hw_disable_non_wakeup_gpes (
void)
{
- u32 i;
- acpi_gpe_register_info *gpe_register_info;
- u32 in_value;
- acpi_status status;
+ u32 i;
+ struct acpi_gpe_register_info *gpe_register_info;
+ u32 in_value;
+ acpi_status status;
ACPI_FUNCTION_ENTRY ();
@@ -421,9 +421,9 @@ acpi_status
acpi_hw_enable_non_wakeup_gpes (
void)
{
- u32 i;
- acpi_gpe_register_info *gpe_register_info;
- acpi_status status;
+ u32 i;
+ struct acpi_gpe_register_info *gpe_register_info;
+ acpi_status status;
ACPI_FUNCTION_ENTRY ();
diff --git a/drivers/acpi/hardware/hwregs.c b/drivers/acpi/hardware/hwregs.c
index f32bddfb8765..e609dd35d3fa 100644
--- a/drivers/acpi/hardware/hwregs.c
+++ b/drivers/acpi/hardware/hwregs.c
@@ -7,7 +7,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -47,9 +47,9 @@
acpi_status
acpi_hw_clear_acpi_status (void)
{
- acpi_native_uint i;
- acpi_native_uint gpe_block;
- acpi_status status;
+ acpi_native_uint i;
+ acpi_native_uint gpe_block;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("hw_clear_acpi_status");
@@ -116,12 +116,12 @@ unlock_and_exit:
acpi_status
acpi_get_sleep_type_data (
- u8 sleep_state,
- u8 *sleep_type_a,
- u8 *sleep_type_b)
+ u8 sleep_state,
+ u8 *sleep_type_a,
+ u8 *sleep_type_b)
{
- acpi_status status = AE_OK;
- acpi_operand_object *obj_desc;
+ acpi_status status = AE_OK;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_TRACE ("acpi_get_sleep_type_data");
@@ -207,9 +207,9 @@ acpi_get_sleep_type_data (
*
******************************************************************************/
-acpi_bit_register_info *
+struct acpi_bit_register_info *
acpi_hw_get_bit_register_info (
- u32 register_id)
+ u32 register_id)
{
ACPI_FUNCTION_NAME ("hw_get_bit_register_info");
@@ -239,13 +239,13 @@ acpi_hw_get_bit_register_info (
acpi_status
acpi_get_register (
- u32 register_id,
- u32 *return_value,
- u32 flags)
+ u32 register_id,
+ u32 *return_value,
+ u32 flags)
{
- u32 register_value = 0;
- acpi_bit_register_info *bit_reg_info;
- acpi_status status;
+ u32 register_value = 0;
+ struct acpi_bit_register_info *bit_reg_info;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_get_register");
@@ -304,13 +304,13 @@ acpi_get_register (
acpi_status
acpi_set_register (
- u32 register_id,
- u32 value,
- u32 flags)
+ u32 register_id,
+ u32 value,
+ u32 flags)
{
- u32 register_value = 0;
- acpi_bit_register_info *bit_reg_info;
- acpi_status status;
+ u32 register_value = 0;
+ struct acpi_bit_register_info *bit_reg_info;
+ acpi_status status;
ACPI_FUNCTION_TRACE_U32 ("acpi_set_register", register_id);
@@ -454,14 +454,14 @@ unlock_and_exit:
acpi_status
acpi_hw_register_read (
- u8 use_lock,
- u32 register_id,
- u32 *return_value)
+ u8 use_lock,
+ u32 register_id,
+ u32 *return_value)
{
- u32 value1 = 0;
- u32 value2 = 0;
- u32 bank_offset;
- acpi_status status;
+ u32 value1 = 0;
+ u32 value2 = 0;
+ u32 bank_offset;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("hw_register_read");
@@ -563,12 +563,12 @@ unlock_and_exit:
acpi_status
acpi_hw_register_write (
- u8 use_lock,
- u32 register_id,
- u32 value)
+ u8 use_lock,
+ u32 register_id,
+ u32 value)
{
- u32 bank_offset;
- acpi_status status;
+ u32 bank_offset;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("hw_register_write");
@@ -678,16 +678,16 @@ unlock_and_exit:
acpi_status
acpi_hw_low_level_read (
- u32 width,
- u32 *value,
- acpi_generic_address *reg,
- u32 offset)
+ u32 width,
+ u32 *value,
+ struct acpi_generic_address *reg,
+ u32 offset)
{
- acpi_physical_address mem_address;
- acpi_io_address io_address;
- acpi_pci_id pci_id;
- u16 pci_register;
- acpi_status status;
+ acpi_physical_address mem_address;
+ acpi_io_address io_address;
+ struct acpi_pci_id pci_id;
+ u16 pci_register;
+ acpi_status status;
ACPI_FUNCTION_NAME ("hw_low_level_read");
@@ -768,16 +768,16 @@ acpi_hw_low_level_read (
acpi_status
acpi_hw_low_level_write (
- u32 width,
- u32 value,
- acpi_generic_address *reg,
- u32 offset)
+ u32 width,
+ u32 value,
+ struct acpi_generic_address *reg,
+ u32 offset)
{
- acpi_physical_address mem_address;
- acpi_io_address io_address;
- acpi_pci_id pci_id;
- u16 pci_register;
- acpi_status status;
+ acpi_physical_address mem_address;
+ acpi_io_address io_address;
+ struct acpi_pci_id pci_id;
+ u16 pci_register;
+ acpi_status status;
ACPI_FUNCTION_NAME ("hw_low_level_write");
diff --git a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c
index 475e624fcf71..aaab0ff004da 100644
--- a/drivers/acpi/hardware/hwsleep.c
+++ b/drivers/acpi/hardware/hwsleep.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -123,11 +123,11 @@ acpi_get_firmware_waking_vector (
acpi_status
acpi_enter_sleep_state_prep (
- u8 sleep_state)
+ u8 sleep_state)
{
- acpi_status status;
- acpi_object_list arg_list;
- acpi_object arg;
+ acpi_status status;
+ struct acpi_object_list arg_list;
+ union acpi_object arg;
ACPI_FUNCTION_TRACE ("acpi_enter_sleep_state_prep");
@@ -181,14 +181,14 @@ acpi_enter_sleep_state_prep (
acpi_status
acpi_enter_sleep_state (
- u8 sleep_state)
+ u8 sleep_state)
{
- u32 PM1Acontrol;
- u32 PM1Bcontrol;
- acpi_bit_register_info *sleep_type_reg_info;
- acpi_bit_register_info *sleep_enable_reg_info;
- u32 in_value;
- acpi_status status;
+ u32 PM1Acontrol;
+ u32 PM1Bcontrol;
+ struct acpi_bit_register_info *sleep_type_reg_info;
+ struct acpi_bit_register_info *sleep_enable_reg_info;
+ u32 in_value;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_enter_sleep_state");
@@ -330,11 +330,11 @@ acpi_enter_sleep_state (
acpi_status
acpi_leave_sleep_state (
- u8 sleep_state)
+ u8 sleep_state)
{
- acpi_object_list arg_list;
- acpi_object arg;
- acpi_status status;
+ struct acpi_object_list arg_list;
+ union acpi_object arg;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_leave_sleep_state");
diff --git a/drivers/acpi/hardware/hwtimer.c b/drivers/acpi/hardware/hwtimer.c
index 42f22de5a26b..b5651f4fef58 100644
--- a/drivers/acpi/hardware/hwtimer.c
+++ b/drivers/acpi/hardware/hwtimer.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -43,7 +43,7 @@
acpi_status
acpi_get_timer_resolution (
- u32 *resolution)
+ u32 *resolution)
{
ACPI_FUNCTION_TRACE ("acpi_get_timer_resolution");
@@ -77,9 +77,9 @@ acpi_get_timer_resolution (
acpi_status
acpi_get_timer (
- u32 *ticks)
+ u32 *ticks)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_get_timer");
@@ -123,14 +123,14 @@ acpi_get_timer (
acpi_status
acpi_get_timer_duration (
- u32 start_ticks,
- u32 end_ticks,
- u32 *time_elapsed)
+ u32 start_ticks,
+ u32 end_ticks,
+ u32 *time_elapsed)
{
- u32 delta_ticks = 0;
- uint64_overlay normalized_ticks;
- acpi_status status;
- acpi_integer out_quotient;
+ u32 delta_ticks = 0;
+ union uint64_overlay normalized_ticks;
+ acpi_status status;
+ acpi_integer out_quotient;
ACPI_FUNCTION_TRACE ("acpi_get_timer_duration");
diff --git a/drivers/acpi/include/acconfig.h b/drivers/acpi/include/acconfig.h
index 0458b93ab494..fbac15e36756 100644
--- a/drivers/acpi/include/acconfig.h
+++ b/drivers/acpi/include/acconfig.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -53,7 +53,7 @@
/* Version string */
-#define ACPI_CA_VERSION 0x20021217
+#define ACPI_CA_VERSION 0x20030109
/* Version of ACPI supported */
diff --git a/drivers/acpi/include/acdebug.h b/drivers/acpi/include/acdebug.h
index 3a3cc90179ae..ed08890bea25 100644
--- a/drivers/acpi/include/acdebug.h
+++ b/drivers/acpi/include/acdebug.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -28,19 +28,17 @@
#define ACPI_DEBUG_BUFFER_SIZE 4196
-typedef struct command_info
+struct command_info
{
- char *name; /* Command Name */
- u8 min_args; /* Minimum arguments required */
+ char *name; /* Command Name */
+ u8 min_args; /* Minimum arguments required */
+};
-} COMMAND_INFO;
-
-typedef struct argument_info
+struct argument_info
{
- char *name; /* Argument Name */
-
-} ARGUMENT_INFO;
+ char *name; /* Argument Name */
+};
#define PARAM_LIST(pl) pl
@@ -71,9 +69,9 @@ acpi_db_terminate (
acpi_status
acpi_db_single_step (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- u32 op_type);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ u32 op_type);
/*
@@ -82,65 +80,65 @@ acpi_db_single_step (
void
acpi_db_display_table_info (
- char *table_arg);
+ char *table_arg);
void
acpi_db_unload_acpi_table (
- char *table_arg,
- char *instance_arg);
+ char *table_arg,
+ char *instance_arg);
void
acpi_db_set_method_breakpoint (
- char *location,
- acpi_walk_state *walk_state,
- acpi_parse_object *op);
+ char *location,
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op);
void
acpi_db_set_method_call_breakpoint (
- acpi_parse_object *op);
+ union acpi_parse_object *op);
void
acpi_db_disassemble_aml (
- char *statements,
- acpi_parse_object *op);
+ char *statements,
+ union acpi_parse_object *op);
void
acpi_db_dump_namespace (
- char *start_arg,
- char *depth_arg);
+ char *start_arg,
+ char *depth_arg);
void
acpi_db_dump_namespace_by_owner (
- char *owner_arg,
- char *depth_arg);
+ char *owner_arg,
+ char *depth_arg);
void
acpi_db_send_notify (
- char *name,
- u32 value);
+ char *name,
+ u32 value);
void
acpi_db_set_method_data (
- char *type_arg,
- char *index_arg,
- char *value_arg);
+ char *type_arg,
+ char *index_arg,
+ char *value_arg);
acpi_status
acpi_db_display_objects (
- char *obj_type_arg,
- char *display_count_arg);
+ char *obj_type_arg,
+ char *display_count_arg);
acpi_status
acpi_db_find_name_in_namespace (
- char *name_arg);
+ char *name_arg);
void
acpi_db_set_scope (
- char *name);
+ char *name);
void
acpi_db_find_references (
- char *object_arg);
+ char *object_arg);
void
acpi_db_display_locks (void);
@@ -148,7 +146,7 @@ acpi_db_display_locks (void);
void
acpi_db_display_resources (
- char *object_arg);
+ char *object_arg);
void
acpi_db_check_integrity (
@@ -156,31 +154,31 @@ acpi_db_check_integrity (
acpi_status
acpi_db_integrity_walk (
- acpi_handle obj_handle,
- u32 nesting_level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 nesting_level,
+ void *context,
+ void **return_value);
acpi_status
acpi_db_walk_and_match_name (
- acpi_handle obj_handle,
- u32 nesting_level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 nesting_level,
+ void *context,
+ void **return_value);
acpi_status
acpi_db_walk_for_references (
- acpi_handle obj_handle,
- u32 nesting_level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 nesting_level,
+ void *context,
+ void **return_value);
acpi_status
acpi_db_walk_for_specific_objects (
- acpi_handle obj_handle,
- u32 nesting_level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 nesting_level,
+ void *context,
+ void **return_value);
/*
@@ -189,30 +187,30 @@ acpi_db_walk_for_specific_objects (
void
acpi_db_display_method_info (
- acpi_parse_object *op);
+ union acpi_parse_object *op);
void
acpi_db_decode_and_display_object (
- char *target,
- char *output_type);
+ char *target,
+ char *output_type);
void
acpi_db_decode_node (
- acpi_namespace_node *node);
+ struct acpi_namespace_node *node);
void
acpi_db_display_result_object (
- acpi_operand_object *obj_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *obj_desc,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_db_display_all_methods (
- char *display_count_arg);
+ char *display_count_arg);
void
acpi_db_display_internal_object (
- acpi_operand_object *obj_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *obj_desc,
+ struct acpi_walk_state *walk_state);
void
acpi_db_display_arguments (
@@ -232,20 +230,20 @@ acpi_db_display_calling_tree (
void
acpi_db_display_argument_object (
- acpi_operand_object *obj_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *obj_desc,
+ struct acpi_walk_state *walk_state);
void
acpi_db_dump_parser_descriptor (
- acpi_parse_object *op);
+ union acpi_parse_object *op);
void *
acpi_db_get_pointer (
- void *target);
+ void *target);
void
acpi_db_decode_internal_object (
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
/*
@@ -254,24 +252,24 @@ acpi_db_decode_internal_object (
void
acpi_db_execute (
- char *name,
- char **args,
- u32 flags);
+ char *name,
+ char **args,
+ u32 flags);
void
acpi_db_create_execution_threads (
- char *num_threads_arg,
- char *num_loops_arg,
- char *method_name_arg);
+ char *num_threads_arg,
+ char *num_loops_arg,
+ char *method_name_arg);
acpi_status
acpi_db_execute_method (
- acpi_db_method_info *info,
- acpi_buffer *return_obj);
+ struct acpi_db_method_info *info,
+ struct acpi_buffer *return_obj);
void
acpi_db_execute_setup (
- acpi_db_method_info *info);
+ struct acpi_db_method_info *info);
u32
acpi_db_get_outstanding_allocations (
@@ -279,7 +277,7 @@ acpi_db_get_outstanding_allocations (
void ACPI_SYSTEM_XFACE
acpi_db_method_thread (
- void *context);
+ void *context);
/*
@@ -288,12 +286,12 @@ acpi_db_method_thread (
acpi_object_type
acpi_db_match_argument (
- char *user_argument,
- ARGUMENT_INFO *arguments);
+ char *user_argument,
+ struct argument_info *arguments);
acpi_status
ae_local_load_table (
- acpi_table_header *table_ptr);
+ struct acpi_table_header *table_ptr);
void
acpi_db_close_debug_file (
@@ -301,15 +299,15 @@ acpi_db_close_debug_file (
void
acpi_db_open_debug_file (
- char *name);
+ char *name);
acpi_status
acpi_db_load_acpi_table (
- char *filename);
+ char *filename);
acpi_status
acpi_db_get_acpi_table (
- char *filename);
+ char *filename);
/*
* dbhistry - debugger HISTORY command
@@ -317,14 +315,14 @@ acpi_db_get_acpi_table (
void
acpi_db_add_to_history (
- char *command_line);
+ char *command_line);
void
acpi_db_display_history (void);
char *
acpi_db_get_from_history (
- char *command_num_arg);
+ char *command_num_arg);
/*
@@ -333,35 +331,35 @@ acpi_db_get_from_history (
acpi_status
acpi_db_command_dispatch (
- char *input_buffer,
- acpi_walk_state *walk_state,
- acpi_parse_object *op);
+ char *input_buffer,
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op);
void ACPI_SYSTEM_XFACE
acpi_db_execute_thread (
- void *context);
+ void *context);
acpi_status
acpi_db_user_commands (
- char prompt,
- acpi_parse_object *op);
+ char prompt,
+ union acpi_parse_object *op);
void
acpi_db_display_help (
- char *help_type);
+ char *help_type);
char *
acpi_db_get_next_token (
- char *string,
- char **next);
+ char *string,
+ char **next);
u32
acpi_db_get_line (
- char *input_buffer);
+ char *input_buffer);
u32
acpi_db_match_command (
- char *user_command);
+ char *user_command);
void
acpi_db_single_thread (
@@ -374,20 +372,20 @@ acpi_db_single_thread (
void
acpi_db_generate_statistics (
- acpi_parse_object *root,
- u8 is_method);
+ union acpi_parse_object *root,
+ u8 is_method);
acpi_status
acpi_db_display_statistics (
- char *type_arg);
+ char *type_arg);
acpi_status
acpi_db_classify_one_object (
- acpi_handle obj_handle,
- u32 nesting_level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 nesting_level,
+ void *context,
+ void **return_value);
void
acpi_db_count_namespace_objects (
@@ -395,7 +393,7 @@ acpi_db_count_namespace_objects (
void
acpi_db_enumerate_object (
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
/*
@@ -404,29 +402,29 @@ acpi_db_enumerate_object (
void
acpi_db_set_output_destination (
- u32 where);
+ u32 where);
void
acpi_db_dump_buffer (
- u32 address);
+ u32 address);
void
acpi_db_dump_object (
- acpi_object *obj_desc,
- u32 level);
+ union acpi_object *obj_desc,
+ u32 level);
void
acpi_db_prep_namestring (
- char *name);
+ char *name);
acpi_status
acpi_db_second_pass_parse (
- acpi_parse_object *root);
+ union acpi_parse_object *root);
-acpi_namespace_node *
+struct acpi_namespace_node *
acpi_db_local_ns_lookup (
- char *name);
+ char *name);
#endif /* __ACDEBUG_H__ */
diff --git a/drivers/acpi/include/acdispat.h b/drivers/acpi/include/acdispat.h
index 53328058ef7f..d007aba08056 100644
--- a/drivers/acpi/include/acdispat.h
+++ b/drivers/acpi/include/acdispat.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -35,78 +35,78 @@
acpi_status
acpi_ds_obj_stack_push (
- void *object,
- acpi_walk_state *walk_state);
+ void *object,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_obj_stack_pop (
- u32 pop_count,
- acpi_walk_state *walk_state);
+ u32 pop_count,
+ struct acpi_walk_state *walk_state);
void *
acpi_ds_obj_stack_get_value (
- u32 index,
- acpi_walk_state *walk_state);
+ u32 index,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_obj_stack_pop_object (
- acpi_operand_object **object,
- acpi_walk_state *walk_state);
+ union acpi_operand_object **object,
+ struct acpi_walk_state *walk_state);
/* dsopcode - support for late evaluation */
acpi_status
acpi_ds_execute_arguments (
- acpi_namespace_node *node,
- acpi_namespace_node *scope_node,
- u32 aml_length,
- u8 *aml_start);
+ struct acpi_namespace_node *node,
+ struct acpi_namespace_node *scope_node,
+ u32 aml_length,
+ u8 *aml_start);
acpi_status
acpi_ds_get_buffer_field_arguments (
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
acpi_status
acpi_ds_get_region_arguments (
- acpi_operand_object *rgn_desc);
+ union acpi_operand_object *rgn_desc);
acpi_status
acpi_ds_get_buffer_arguments (
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
acpi_status
acpi_ds_get_package_arguments (
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
acpi_status
acpi_ds_init_buffer_field (
- u16 aml_opcode,
- acpi_operand_object *obj_desc,
- acpi_operand_object *buffer_desc,
- acpi_operand_object *offset_desc,
- acpi_operand_object *length_desc,
- acpi_operand_object *result_desc);
+ u16 aml_opcode,
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object *buffer_desc,
+ union acpi_operand_object *offset_desc,
+ union acpi_operand_object *length_desc,
+ union acpi_operand_object *result_desc);
acpi_status
acpi_ds_eval_buffer_field_operands (
- acpi_walk_state *walk_state,
- acpi_parse_object *op);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op);
acpi_status
acpi_ds_eval_region_operands (
- acpi_walk_state *walk_state,
- acpi_parse_object *op);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op);
acpi_status
acpi_ds_eval_data_object_operands (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- acpi_operand_object *obj_desc);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ union acpi_operand_object *obj_desc);
acpi_status
acpi_ds_initialize_region (
- acpi_handle obj_handle);
+ acpi_handle obj_handle);
/* dsctrl - Parser/Interpreter interface, control stack routines */
@@ -114,13 +114,13 @@ acpi_ds_initialize_region (
acpi_status
acpi_ds_exec_begin_control_op (
- acpi_walk_state *walk_state,
- acpi_parse_object *op);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op);
acpi_status
acpi_ds_exec_end_control_op (
- acpi_walk_state *walk_state,
- acpi_parse_object *op);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op);
/* dsexec - Parser/Interpreter interface, method execution callbacks */
@@ -128,80 +128,80 @@ acpi_ds_exec_end_control_op (
acpi_status
acpi_ds_get_predicate_value (
- acpi_walk_state *walk_state,
- acpi_operand_object *result_obj);
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object *result_obj);
acpi_status
acpi_ds_exec_begin_op (
- acpi_walk_state *walk_state,
- acpi_parse_object **out_op);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object **out_op);
acpi_status
acpi_ds_exec_end_op (
- acpi_walk_state *state);
+ struct acpi_walk_state *state);
/* dsfield - Parser/Interpreter interface for AML fields */
acpi_status
acpi_ds_get_field_names (
- acpi_create_field_info *info,
- acpi_walk_state *walk_state,
- acpi_parse_object *arg);
+ struct acpi_create_field_info *info,
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *arg);
acpi_status
acpi_ds_create_field (
- acpi_parse_object *op,
- acpi_namespace_node *region_node,
- acpi_walk_state *walk_state);
+ union acpi_parse_object *op,
+ struct acpi_namespace_node *region_node,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_create_bank_field (
- acpi_parse_object *op,
- acpi_namespace_node *region_node,
- acpi_walk_state *walk_state);
+ union acpi_parse_object *op,
+ struct acpi_namespace_node *region_node,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_create_index_field (
- acpi_parse_object *op,
- acpi_namespace_node *region_node,
- acpi_walk_state *walk_state);
+ union acpi_parse_object *op,
+ struct acpi_namespace_node *region_node,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_create_buffer_field (
- acpi_parse_object *op,
- acpi_walk_state *walk_state);
+ union acpi_parse_object *op,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_init_field_objects (
- acpi_parse_object *op,
- acpi_walk_state *walk_state);
+ union acpi_parse_object *op,
+ struct acpi_walk_state *walk_state);
/* dsload - Parser/Interpreter interface, namespace load callbacks */
acpi_status
acpi_ds_load1_begin_op (
- acpi_walk_state *walk_state,
- acpi_parse_object **out_op);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object **out_op);
acpi_status
acpi_ds_load1_end_op (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_load2_begin_op (
- acpi_walk_state *walk_state,
- acpi_parse_object **out_op);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object **out_op);
acpi_status
acpi_ds_load2_end_op (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_init_callbacks (
- acpi_walk_state *walk_state,
- u32 pass_number);
+ struct acpi_walk_state *walk_state,
+ u32 pass_number);
/* dsmthdat - method data (locals/args) */
@@ -209,177 +209,177 @@ acpi_ds_init_callbacks (
acpi_status
acpi_ds_store_object_to_local (
- u16 opcode,
- u32 index,
- acpi_operand_object *src_desc,
- acpi_walk_state *walk_state);
+ u16 opcode,
+ u32 index,
+ union acpi_operand_object *src_desc,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_method_data_get_entry (
- u16 opcode,
- u32 index,
- acpi_walk_state *walk_state,
- acpi_operand_object ***node);
+ u16 opcode,
+ u32 index,
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object ***node);
void
acpi_ds_method_data_delete_all (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
u8
acpi_ds_is_method_value (
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
acpi_object_type
acpi_ds_method_data_get_type (
- u16 opcode,
- u32 index,
- acpi_walk_state *walk_state);
+ u16 opcode,
+ u32 index,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_method_data_get_value (
- u16 opcode,
- u32 index,
- acpi_walk_state *walk_state,
- acpi_operand_object **dest_desc);
+ u16 opcode,
+ u32 index,
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object **dest_desc);
void
acpi_ds_method_data_delete_value (
- u16 opcode,
- u32 index,
- acpi_walk_state *walk_state);
+ u16 opcode,
+ u32 index,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_method_data_init_args (
- acpi_operand_object **params,
- u32 max_param_count,
- acpi_walk_state *walk_state);
+ union acpi_operand_object **params,
+ u32 max_param_count,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_method_data_get_node (
- u16 opcode,
- u32 index,
- acpi_walk_state *walk_state,
- acpi_namespace_node **node);
+ u16 opcode,
+ u32 index,
+ struct acpi_walk_state *walk_state,
+ struct acpi_namespace_node **node);
void
acpi_ds_method_data_init (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_method_data_set_value (
- u16 opcode,
- u32 index,
- acpi_operand_object *object,
- acpi_walk_state *walk_state);
+ u16 opcode,
+ u32 index,
+ union acpi_operand_object *object,
+ struct acpi_walk_state *walk_state);
/* dsmethod - Parser/Interpreter interface - control method parsing */
acpi_status
acpi_ds_parse_method (
- acpi_handle obj_handle);
+ acpi_handle obj_handle);
acpi_status
acpi_ds_call_control_method (
- acpi_thread_state *thread,
- acpi_walk_state *walk_state,
- acpi_parse_object *op);
+ struct acpi_thread_state *thread,
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op);
acpi_status
acpi_ds_restart_control_method (
- acpi_walk_state *walk_state,
- acpi_operand_object *return_desc);
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object *return_desc);
acpi_status
acpi_ds_terminate_control_method (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_begin_method_execution (
- acpi_namespace_node *method_node,
- acpi_operand_object *obj_desc,
- acpi_namespace_node *calling_method_node);
+ struct acpi_namespace_node *method_node,
+ union acpi_operand_object *obj_desc,
+ struct acpi_namespace_node *calling_method_node);
/* dsobj - Parser/Interpreter interface - object initialization and conversion */
acpi_status
acpi_ds_init_one_object (
- acpi_handle obj_handle,
- u32 level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 level,
+ void *context,
+ void **return_value);
acpi_status
acpi_ds_initialize_objects (
- acpi_table_desc *table_desc,
- acpi_namespace_node *start_node);
+ struct acpi_table_desc *table_desc,
+ struct acpi_namespace_node *start_node);
acpi_status
acpi_ds_build_internal_buffer_obj (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- u32 buffer_length,
- acpi_operand_object **obj_desc_ptr);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ u32 buffer_length,
+ union acpi_operand_object **obj_desc_ptr);
acpi_status
acpi_ds_build_internal_package_obj (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- u32 package_length,
- acpi_operand_object **obj_desc);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ u32 package_length,
+ union acpi_operand_object **obj_desc);
acpi_status
acpi_ds_build_internal_object (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- acpi_operand_object **obj_desc_ptr);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ union acpi_operand_object **obj_desc_ptr);
acpi_status
acpi_ds_init_object_from_op (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- u16 opcode,
- acpi_operand_object **obj_desc);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ u16 opcode,
+ union acpi_operand_object **obj_desc);
acpi_status
acpi_ds_create_node (
- acpi_walk_state *walk_state,
- acpi_namespace_node *node,
- acpi_parse_object *op);
+ struct acpi_walk_state *walk_state,
+ struct acpi_namespace_node *node,
+ union acpi_parse_object *op);
/* dsutils - Parser/Interpreter interface utility routines */
u8
acpi_ds_is_result_used (
- acpi_parse_object *op,
- acpi_walk_state *walk_state);
+ union acpi_parse_object *op,
+ struct acpi_walk_state *walk_state);
void
acpi_ds_delete_result_if_not_used (
- acpi_parse_object *op,
- acpi_operand_object *result_obj,
- acpi_walk_state *walk_state);
+ union acpi_parse_object *op,
+ union acpi_operand_object *result_obj,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_create_operand (
- acpi_walk_state *walk_state,
- acpi_parse_object *arg,
- u32 args_remaining);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *arg,
+ u32 args_remaining);
acpi_status
acpi_ds_create_operands (
- acpi_walk_state *walk_state,
- acpi_parse_object *first_arg);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *first_arg);
acpi_status
acpi_ds_resolve_operands (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
void
acpi_ds_clear_operands (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
/*
@@ -388,77 +388,77 @@ acpi_ds_clear_operands (
acpi_status
acpi_ds_scope_stack_push (
- acpi_namespace_node *node,
- acpi_object_type type,
- acpi_walk_state *walk_state);
+ struct acpi_namespace_node *node,
+ acpi_object_type type,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_scope_stack_pop (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
void
acpi_ds_scope_stack_clear (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
/* dswstate - parser WALK_STATE management routines */
-acpi_walk_state *
+struct acpi_walk_state *
acpi_ds_create_walk_state (
- acpi_owner_id owner_id,
- acpi_parse_object *origin,
- acpi_operand_object *mth_desc,
- acpi_thread_state *thread);
+ acpi_owner_id owner_id,
+ union acpi_parse_object *origin,
+ union acpi_operand_object *mth_desc,
+ struct acpi_thread_state *thread);
acpi_status
acpi_ds_init_aml_walk (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- acpi_namespace_node *method_node,
- u8 *aml_start,
- u32 aml_length,
- acpi_operand_object **params,
- acpi_operand_object **return_obj_desc,
- u32 pass_number);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ struct acpi_namespace_node *method_node,
+ u8 *aml_start,
+ u32 aml_length,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_obj_desc,
+ u32 pass_number);
acpi_status
acpi_ds_obj_stack_delete_all (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_obj_stack_pop_and_delete (
- u32 pop_count,
- acpi_walk_state *walk_state);
+ u32 pop_count,
+ struct acpi_walk_state *walk_state);
void
acpi_ds_delete_walk_state (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
-acpi_walk_state *
+struct acpi_walk_state *
acpi_ds_pop_walk_state (
- acpi_thread_state *thread);
+ struct acpi_thread_state *thread);
void
acpi_ds_push_walk_state (
- acpi_walk_state *walk_state,
- acpi_thread_state *thread);
+ struct acpi_walk_state *walk_state,
+ struct acpi_thread_state *thread);
acpi_status
acpi_ds_result_stack_pop (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_result_stack_push (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_result_stack_clear (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
-acpi_walk_state *
+struct acpi_walk_state *
acpi_ds_get_current_walk_state (
- acpi_thread_state *thread);
+ struct acpi_thread_state *thread);
void
acpi_ds_delete_walk_state_cache (
@@ -466,29 +466,29 @@ acpi_ds_delete_walk_state_cache (
acpi_status
acpi_ds_result_insert (
- void *object,
- u32 index,
- acpi_walk_state *walk_state);
+ void *object,
+ u32 index,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_result_remove (
- acpi_operand_object **object,
- u32 index,
- acpi_walk_state *walk_state);
+ union acpi_operand_object **object,
+ u32 index,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_result_pop (
- acpi_operand_object **object,
- acpi_walk_state *walk_state);
+ union acpi_operand_object **object,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_result_push (
- acpi_operand_object *object,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *object,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ds_result_pop_from_bottom (
- acpi_operand_object **object,
- acpi_walk_state *walk_state);
+ union acpi_operand_object **object,
+ struct acpi_walk_state *walk_state);
#endif /* _ACDISPAT_H_ */
diff --git a/drivers/acpi/include/acevents.h b/drivers/acpi/include/acevents.h
index 68bb50b675f3..ab3949ab1849 100644
--- a/drivers/acpi/include/acevents.h
+++ b/drivers/acpi/include/acevents.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -49,7 +49,7 @@ acpi_ev_fixed_event_detect (
u32
acpi_ev_fixed_event_dispatch (
- u32 event);
+ u32 event);
/*
@@ -58,11 +58,11 @@ acpi_ev_fixed_event_dispatch (
u8
acpi_ev_is_notify_object (
- acpi_namespace_node *node);
+ struct acpi_namespace_node *node);
acpi_status
acpi_ev_acquire_global_lock(
- u16 timeout);
+ u16 timeout);
acpi_status
acpi_ev_release_global_lock(
@@ -74,20 +74,20 @@ acpi_ev_init_global_lock_handler (
u32
acpi_ev_get_gpe_register_index (
- u32 gpe_number);
+ u32 gpe_number);
u32
acpi_ev_get_gpe_number_index (
- u32 gpe_number);
+ u32 gpe_number);
acpi_status
acpi_ev_queue_notify_request (
- acpi_namespace_node *node,
- u32 notify_value);
+ struct acpi_namespace_node *node,
+ u32 notify_value);
void ACPI_SYSTEM_XFACE
acpi_ev_notify_dispatch (
- void *context);
+ void *context);
/*
@@ -104,7 +104,7 @@ acpi_ev_init_gpe_control_methods (
u32
acpi_ev_gpe_dispatch (
- u32 gpe_number);
+ u32 gpe_number);
u32
acpi_ev_gpe_detect (
@@ -120,29 +120,29 @@ acpi_ev_init_address_spaces (
acpi_status
acpi_ev_address_space_dispatch (
- acpi_operand_object *region_obj,
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- void *value);
+ union acpi_operand_object *region_obj,
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ void *value);
acpi_status
acpi_ev_addr_handler_helper (
- acpi_handle obj_handle,
- u32 level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 level,
+ void *context,
+ void **return_value);
acpi_status
acpi_ev_attach_region (
- acpi_operand_object *handler_obj,
- acpi_operand_object *region_obj,
- u8 acpi_ns_is_locked);
+ union acpi_operand_object *handler_obj,
+ union acpi_operand_object *region_obj,
+ u8 acpi_ns_is_locked);
void
acpi_ev_detach_region (
- acpi_operand_object *region_obj,
- u8 acpi_ns_is_locked);
+ union acpi_operand_object *region_obj,
+ u8 acpi_ns_is_locked);
/*
@@ -151,50 +151,50 @@ acpi_ev_detach_region (
acpi_status
acpi_ev_system_memory_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context);
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context);
acpi_status
acpi_ev_io_space_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context);
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context);
acpi_status
acpi_ev_pci_config_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context);
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context);
acpi_status
acpi_ev_cmos_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context);
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context);
acpi_status
acpi_ev_pci_bar_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context);
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context);
acpi_status
acpi_ev_default_region_setup (
- acpi_handle handle,
- u32 function,
- void *handler_context,
- void **region_context);
+ acpi_handle handle,
+ u32 function,
+ void *handler_context,
+ void **region_context);
acpi_status
acpi_ev_initialize_region (
- acpi_operand_object *region_obj,
- u8 acpi_ns_locked);
+ union acpi_operand_object *region_obj,
+ u8 acpi_ns_locked);
/*
@@ -211,7 +211,7 @@ acpi_ev_remove_sci_handler (
u32
acpi_ev_initialize_sCI (
- u32 program_sCI);
+ u32 program_sCI);
void
acpi_ev_terminate (
diff --git a/drivers/acpi/include/acexcep.h b/drivers/acpi/include/acexcep.h
index 5db7e41a4cb5..f531a805732c 100644
--- a/drivers/acpi/include/acexcep.h
+++ b/drivers/acpi/include/acexcep.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/drivers/acpi/include/acglobal.h b/drivers/acpi/include/acglobal.h
index d32632d64851..a52f1ce5dba7 100644
--- a/drivers/acpi/include/acglobal.h
+++ b/drivers/acpi/include/acglobal.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -47,12 +47,12 @@
/* Runtime configuration of debug print levels */
-extern u32 acpi_dbg_level;
-extern u32 acpi_dbg_layer;
+extern u32 acpi_dbg_level;
+extern u32 acpi_dbg_layer;
/* Procedure nesting level for debug output */
-extern u32 acpi_gbl_nesting_level;
+extern u32 acpi_gbl_nesting_level;
/*****************************************************************************
@@ -70,22 +70,22 @@ extern u32 acpi_gbl_nesting_level;
* of each in the system. Each global points to the actual table.
*
*/
-ACPI_EXTERN u32 acpi_gbl_table_flags;
-ACPI_EXTERN u32 acpi_gbl_rsdt_table_count;
-ACPI_EXTERN rsdp_descriptor *acpi_gbl_RSDP;
-ACPI_EXTERN xsdt_descriptor *acpi_gbl_XSDT;
+ACPI_EXTERN u32 acpi_gbl_table_flags;
+ACPI_EXTERN u32 acpi_gbl_rsdt_table_count;
+ACPI_EXTERN struct rsdp_descriptor *acpi_gbl_RSDP;
+ACPI_EXTERN XSDT_DESCRIPTOR *acpi_gbl_XSDT;
ACPI_EXTERN FADT_DESCRIPTOR *acpi_gbl_FADT;
-ACPI_EXTERN acpi_table_header *acpi_gbl_DSDT;
+ACPI_EXTERN struct acpi_table_header *acpi_gbl_DSDT;
ACPI_EXTERN FACS_DESCRIPTOR *acpi_gbl_FACS;
-ACPI_EXTERN acpi_common_facs acpi_gbl_common_fACS;
+ACPI_EXTERN struct acpi_common_facs acpi_gbl_common_fACS;
/*
* Handle both ACPI 1.0 and ACPI 2.0 Integer widths
* If we are running a method that exists in a 32-bit ACPI table.
* Use only 32 bits of the Integer for conversion.
*/
-ACPI_EXTERN u8 acpi_gbl_integer_bit_width;
-ACPI_EXTERN u8 acpi_gbl_integer_byte_width;
+ACPI_EXTERN u8 acpi_gbl_integer_bit_width;
+ACPI_EXTERN u8 acpi_gbl_integer_byte_width;
/*
* Since there may be multiple SSDTs and PSDTS, a single pointer is not
@@ -96,15 +96,15 @@ ACPI_EXTERN u8 acpi_gbl_integer_byte_width;
/*
* ACPI Table info arrays
*/
-extern acpi_table_desc acpi_gbl_acpi_tables[NUM_ACPI_TABLES];
-extern ACPI_TABLE_SUPPORT acpi_gbl_acpi_table_data[NUM_ACPI_TABLES];
+extern struct acpi_table_desc acpi_gbl_acpi_tables[NUM_ACPI_TABLES];
+extern struct acpi_table_support acpi_gbl_acpi_table_data[NUM_ACPI_TABLES];
/*
* Predefined mutex objects. This array contains the
* actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs.
* (The table maps local handles to the real OS handles)
*/
-ACPI_EXTERN acpi_mutex_info acpi_gbl_acpi_mutex_info [NUM_MTX];
+ACPI_EXTERN struct acpi_mutex_info acpi_gbl_acpi_mutex_info [NUM_MTX];
/*****************************************************************************
@@ -114,35 +114,35 @@ ACPI_EXTERN acpi_mutex_info acpi_gbl_acpi_mutex_info [NUM_MTX];
****************************************************************************/
-ACPI_EXTERN acpi_memory_list acpi_gbl_memory_lists[ACPI_NUM_MEM_LISTS];
-ACPI_EXTERN acpi_object_notify_handler acpi_gbl_drv_notify;
-ACPI_EXTERN acpi_object_notify_handler acpi_gbl_sys_notify;
-ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler;
-ACPI_EXTERN acpi_walk_state *acpi_gbl_breakpoint_walk;
-ACPI_EXTERN acpi_handle acpi_gbl_global_lock_semaphore;
-
-ACPI_EXTERN u32 acpi_gbl_global_lock_thread_count;
-ACPI_EXTERN u32 acpi_gbl_original_mode;
-ACPI_EXTERN u32 acpi_gbl_rsdp_original_location;
-ACPI_EXTERN u32 acpi_gbl_ns_lookup_count;
-ACPI_EXTERN u32 acpi_gbl_ps_find_count;
-ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save;
-ACPI_EXTERN u16 acpi_gbl_next_table_owner_id;
-ACPI_EXTERN u16 acpi_gbl_next_method_owner_id;
-ACPI_EXTERN u16 acpi_gbl_global_lock_handle;
-ACPI_EXTERN u8 acpi_gbl_debugger_configuration;
-ACPI_EXTERN u8 acpi_gbl_global_lock_acquired;
-ACPI_EXTERN u8 acpi_gbl_step_to_next_call;
-ACPI_EXTERN u8 acpi_gbl_acpi_hardware_present;
-ACPI_EXTERN u8 acpi_gbl_global_lock_present;
-ACPI_EXTERN u8 acpi_gbl_events_initialized;
-
-extern u8 acpi_gbl_shutdown;
-extern u32 acpi_gbl_startup_flags;
-extern const u8 acpi_gbl_decode_to8bit[8];
-extern const char *acpi_gbl_db_sleep_states[ACPI_S_STATE_COUNT];
-extern const acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES];
-extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS];
+ACPI_EXTERN struct acpi_memory_list acpi_gbl_memory_lists[ACPI_NUM_MEM_LISTS];
+ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_drv_notify;
+ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_sys_notify;
+ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler;
+ACPI_EXTERN struct acpi_walk_state *acpi_gbl_breakpoint_walk;
+ACPI_EXTERN acpi_handle acpi_gbl_global_lock_semaphore;
+
+ACPI_EXTERN u32 acpi_gbl_global_lock_thread_count;
+ACPI_EXTERN u32 acpi_gbl_original_mode;
+ACPI_EXTERN u32 acpi_gbl_rsdp_original_location;
+ACPI_EXTERN u32 acpi_gbl_ns_lookup_count;
+ACPI_EXTERN u32 acpi_gbl_ps_find_count;
+ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save;
+ACPI_EXTERN u16 acpi_gbl_next_table_owner_id;
+ACPI_EXTERN u16 acpi_gbl_next_method_owner_id;
+ACPI_EXTERN u16 acpi_gbl_global_lock_handle;
+ACPI_EXTERN u8 acpi_gbl_debugger_configuration;
+ACPI_EXTERN u8 acpi_gbl_global_lock_acquired;
+ACPI_EXTERN u8 acpi_gbl_step_to_next_call;
+ACPI_EXTERN u8 acpi_gbl_acpi_hardware_present;
+ACPI_EXTERN u8 acpi_gbl_global_lock_present;
+ACPI_EXTERN u8 acpi_gbl_events_initialized;
+
+extern u8 acpi_gbl_shutdown;
+extern u32 acpi_gbl_startup_flags;
+extern const u8 acpi_gbl_decode_to8bit[8];
+extern const char *acpi_gbl_db_sleep_states[ACPI_S_STATE_COUNT];
+extern const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES];
+extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS];
/*****************************************************************************
@@ -159,19 +159,19 @@ extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINE
#define NUM_PREDEFINED_NAMES 9
#endif
-ACPI_EXTERN acpi_namespace_node acpi_gbl_root_node_struct;
-ACPI_EXTERN acpi_namespace_node *acpi_gbl_root_node;
+ACPI_EXTERN struct acpi_namespace_node acpi_gbl_root_node_struct;
+ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_root_node;
-extern const u8 acpi_gbl_ns_properties[NUM_NS_TYPES];
-extern const acpi_predefined_names acpi_gbl_pre_defined_names [NUM_PREDEFINED_NAMES];
+extern const u8 acpi_gbl_ns_properties[NUM_NS_TYPES];
+extern const struct acpi_predefined_names acpi_gbl_pre_defined_names [NUM_PREDEFINED_NAMES];
#ifdef ACPI_DEBUG_OUTPUT
-ACPI_EXTERN u32 acpi_gbl_current_node_count;
-ACPI_EXTERN u32 acpi_gbl_current_node_size;
-ACPI_EXTERN u32 acpi_gbl_max_concurrent_node_count;
-ACPI_EXTERN acpi_size acpi_gbl_entry_stack_pointer;
-ACPI_EXTERN acpi_size acpi_gbl_lowest_stack_pointer;
-ACPI_EXTERN u32 acpi_gbl_deepest_nesting;
+ACPI_EXTERN u32 acpi_gbl_current_node_count;
+ACPI_EXTERN u32 acpi_gbl_current_node_size;
+ACPI_EXTERN u32 acpi_gbl_max_concurrent_node_count;
+ACPI_EXTERN acpi_size acpi_gbl_entry_stack_pointer;
+ACPI_EXTERN acpi_size acpi_gbl_lowest_stack_pointer;
+ACPI_EXTERN u32 acpi_gbl_deepest_nesting;
#endif
/*****************************************************************************
@@ -181,11 +181,11 @@ ACPI_EXTERN u32 acpi_gbl_deepest_nesting;
****************************************************************************/
-ACPI_EXTERN acpi_thread_state *acpi_gbl_current_walk_list;
+ACPI_EXTERN struct acpi_thread_state *acpi_gbl_current_walk_list;
/* Control method single step flag */
-ACPI_EXTERN u8 acpi_gbl_cm_single_step;
+ACPI_EXTERN u8 acpi_gbl_cm_single_step;
/*****************************************************************************
@@ -194,7 +194,7 @@ ACPI_EXTERN u8 acpi_gbl_cm_single_step;
*
****************************************************************************/
-ACPI_EXTERN acpi_parse_object *acpi_gbl_parsed_namespace_root;
+ACPI_EXTERN union acpi_parse_object *acpi_gbl_parsed_namespace_root;
/*****************************************************************************
*
@@ -202,9 +202,9 @@ ACPI_EXTERN acpi_parse_object *acpi_gbl_parsed_namespace_root;
*
****************************************************************************/
-extern acpi_bit_register_info acpi_gbl_bit_register_info[ACPI_NUM_BITREG];
-ACPI_EXTERN u8 acpi_gbl_sleep_type_a;
-ACPI_EXTERN u8 acpi_gbl_sleep_type_b;
+extern struct acpi_bit_register_info acpi_gbl_bit_register_info[ACPI_NUM_BITREG];
+ACPI_EXTERN u8 acpi_gbl_sleep_type_a;
+ACPI_EXTERN u8 acpi_gbl_sleep_type_b;
/*****************************************************************************
@@ -213,15 +213,15 @@ ACPI_EXTERN u8 acpi_gbl_sleep_type_b;
*
****************************************************************************/
-extern acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS];
-ACPI_EXTERN acpi_fixed_event_handler acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS];
+extern struct acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS];
+ACPI_EXTERN struct acpi_fixed_event_handler acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS];
-ACPI_EXTERN acpi_handle acpi_gbl_gpe_obj_handle;
-ACPI_EXTERN u32 acpi_gbl_gpe_register_count;
-ACPI_EXTERN u32 acpi_gbl_gpe_number_max;
-ACPI_EXTERN acpi_gpe_register_info *acpi_gbl_gpe_register_info;
-ACPI_EXTERN acpi_gpe_number_info *acpi_gbl_gpe_number_info;
-ACPI_EXTERN acpi_gpe_block_info acpi_gbl_gpe_block_info[ACPI_MAX_GPE_BLOCKS];
+ACPI_EXTERN acpi_handle acpi_gbl_gpe_obj_handle;
+ACPI_EXTERN u32 acpi_gbl_gpe_register_count;
+ACPI_EXTERN u32 acpi_gbl_gpe_number_max;
+ACPI_EXTERN struct acpi_gpe_register_info *acpi_gbl_gpe_register_info;
+ACPI_EXTERN struct acpi_gpe_number_info *acpi_gbl_gpe_number_info;
+ACPI_EXTERN struct acpi_gpe_block_info acpi_gbl_gpe_block_info[ACPI_MAX_GPE_BLOCKS];
/*
* GPE translation table
@@ -230,7 +230,7 @@ ACPI_EXTERN acpi_gpe_block_info acpi_gbl_gpe_block_info[ACPI_MAX_GPE_BLO
* This table is needed because the GPE numbers supported by block 1 do not
* have to be contiguous with the GPE numbers supported by block 0.
*/
-ACPI_EXTERN acpi_gpe_index_info *acpi_gbl_gpe_number_to_index;
+ACPI_EXTERN struct acpi_gpe_index_info *acpi_gbl_gpe_number_to_index;
/*****************************************************************************
@@ -240,57 +240,57 @@ ACPI_EXTERN acpi_gpe_index_info *acpi_gbl_gpe_number_to_index;
****************************************************************************/
-ACPI_EXTERN u8 acpi_gbl_db_output_flags;
+ACPI_EXTERN u8 acpi_gbl_db_output_flags;
#ifdef ACPI_DISASSEMBLER
-ACPI_EXTERN u8 acpi_gbl_db_opt_disasm;
-ACPI_EXTERN u8 acpi_gbl_db_opt_verbose;
+ACPI_EXTERN u8 acpi_gbl_db_opt_disasm;
+ACPI_EXTERN u8 acpi_gbl_db_opt_verbose;
#endif
#ifdef ACPI_DEBUGGER
-extern u8 acpi_gbl_method_executing;
-extern u8 acpi_gbl_abort_method;
-extern u8 acpi_gbl_db_terminate_threads;
+extern u8 acpi_gbl_method_executing;
+extern u8 acpi_gbl_abort_method;
+extern u8 acpi_gbl_db_terminate_threads;
-ACPI_EXTERN int optind;
-ACPI_EXTERN char *optarg;
+ACPI_EXTERN int optind;
+ACPI_EXTERN char *optarg;
-ACPI_EXTERN u8 acpi_gbl_db_opt_tables;
-ACPI_EXTERN u8 acpi_gbl_db_opt_stats;
-ACPI_EXTERN u8 acpi_gbl_db_opt_ini_methods;
+ACPI_EXTERN u8 acpi_gbl_db_opt_tables;
+ACPI_EXTERN u8 acpi_gbl_db_opt_stats;
+ACPI_EXTERN u8 acpi_gbl_db_opt_ini_methods;
-ACPI_EXTERN char *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS];
-ACPI_EXTERN char acpi_gbl_db_line_buf[80];
-ACPI_EXTERN char acpi_gbl_db_parsed_buf[80];
-ACPI_EXTERN char acpi_gbl_db_scope_buf[40];
-ACPI_EXTERN char acpi_gbl_db_debug_filename[40];
-ACPI_EXTERN u8 acpi_gbl_db_output_to_file;
-ACPI_EXTERN char *acpi_gbl_db_buffer;
-ACPI_EXTERN char *acpi_gbl_db_filename;
-ACPI_EXTERN u32 acpi_gbl_db_debug_level;
-ACPI_EXTERN u32 acpi_gbl_db_console_debug_level;
-ACPI_EXTERN acpi_table_header *acpi_gbl_db_table_ptr;
-ACPI_EXTERN acpi_namespace_node *acpi_gbl_db_scope_node;
+ACPI_EXTERN char *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS];
+ACPI_EXTERN char acpi_gbl_db_line_buf[80];
+ACPI_EXTERN char acpi_gbl_db_parsed_buf[80];
+ACPI_EXTERN char acpi_gbl_db_scope_buf[40];
+ACPI_EXTERN char acpi_gbl_db_debug_filename[40];
+ACPI_EXTERN u8 acpi_gbl_db_output_to_file;
+ACPI_EXTERN char *acpi_gbl_db_buffer;
+ACPI_EXTERN char *acpi_gbl_db_filename;
+ACPI_EXTERN u32 acpi_gbl_db_debug_level;
+ACPI_EXTERN u32 acpi_gbl_db_console_debug_level;
+ACPI_EXTERN struct acpi_table_header *acpi_gbl_db_table_ptr;
+ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_db_scope_node;
/*
* Statistic globals
*/
-ACPI_EXTERN u16 acpi_gbl_obj_type_count[ACPI_TYPE_NS_NODE_MAX+1];
-ACPI_EXTERN u16 acpi_gbl_node_type_count[ACPI_TYPE_NS_NODE_MAX+1];
-ACPI_EXTERN u16 acpi_gbl_obj_type_count_misc;
-ACPI_EXTERN u16 acpi_gbl_node_type_count_misc;
-ACPI_EXTERN u32 acpi_gbl_num_nodes;
-ACPI_EXTERN u32 acpi_gbl_num_objects;
-
-
-ACPI_EXTERN u32 acpi_gbl_size_of_parse_tree;
-ACPI_EXTERN u32 acpi_gbl_size_of_method_trees;
-ACPI_EXTERN u32 acpi_gbl_size_of_node_entries;
-ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects;
+ACPI_EXTERN u16 acpi_gbl_obj_type_count[ACPI_TYPE_NS_NODE_MAX+1];
+ACPI_EXTERN u16 acpi_gbl_node_type_count[ACPI_TYPE_NS_NODE_MAX+1];
+ACPI_EXTERN u16 acpi_gbl_obj_type_count_misc;
+ACPI_EXTERN u16 acpi_gbl_node_type_count_misc;
+ACPI_EXTERN u32 acpi_gbl_num_nodes;
+ACPI_EXTERN u32 acpi_gbl_num_objects;
+
+
+ACPI_EXTERN u32 acpi_gbl_size_of_parse_tree;
+ACPI_EXTERN u32 acpi_gbl_size_of_method_trees;
+ACPI_EXTERN u32 acpi_gbl_size_of_node_entries;
+ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects;
#endif /* ACPI_DEBUGGER */
diff --git a/drivers/acpi/include/achware.h b/drivers/acpi/include/achware.h
index 57469b26dff4..4916993043ab 100644
--- a/drivers/acpi/include/achware.h
+++ b/drivers/acpi/include/achware.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -47,7 +47,7 @@ acpi_hw_initialize_system_info (
acpi_status
acpi_hw_set_mode (
- u32 mode);
+ u32 mode);
u32
acpi_hw_get_mode (
@@ -59,35 +59,35 @@ acpi_hw_get_mode_capabilities (
/* Register I/O Prototypes */
-acpi_bit_register_info *
+struct acpi_bit_register_info *
acpi_hw_get_bit_register_info (
- u32 register_id);
+ u32 register_id);
acpi_status
acpi_hw_register_read (
- u8 use_lock,
- u32 register_id,
- u32 *return_value);
+ u8 use_lock,
+ u32 register_id,
+ u32 *return_value);
acpi_status
acpi_hw_register_write (
- u8 use_lock,
- u32 register_id,
- u32 value);
+ u8 use_lock,
+ u32 register_id,
+ u32 value);
acpi_status
acpi_hw_low_level_read (
- u32 width,
- u32 *value,
- acpi_generic_address *reg,
- u32 offset);
+ u32 width,
+ u32 *value,
+ struct acpi_generic_address *reg,
+ u32 offset);
acpi_status
acpi_hw_low_level_write (
- u32 width,
- u32 value,
- acpi_generic_address *reg,
- u32 offset);
+ u32 width,
+ u32 value,
+ struct acpi_generic_address *reg,
+ u32 offset);
acpi_status
acpi_hw_clear_acpi_status (
@@ -98,32 +98,32 @@ acpi_hw_clear_acpi_status (
u8
acpi_hw_get_gpe_bit_mask (
- u32 gpe_number);
+ u32 gpe_number);
acpi_status
acpi_hw_enable_gpe (
- u32 gpe_number);
+ u32 gpe_number);
void
acpi_hw_enable_gpe_for_wakeup (
- u32 gpe_number);
+ u32 gpe_number);
acpi_status
acpi_hw_disable_gpe (
- u32 gpe_number);
+ u32 gpe_number);
void
acpi_hw_disable_gpe_for_wakeup (
- u32 gpe_number);
+ u32 gpe_number);
acpi_status
acpi_hw_clear_gpe (
- u32 gpe_number);
+ u32 gpe_number);
acpi_status
acpi_hw_get_gpe_status (
- u32 gpe_number,
- acpi_event_status *event_status);
+ u32 gpe_number,
+ acpi_event_status *event_status);
acpi_status
acpi_hw_disable_non_wakeup_gpes (
@@ -138,17 +138,17 @@ acpi_hw_enable_non_wakeup_gpes (
acpi_status
acpi_get_timer_resolution (
- u32 *resolution);
+ u32 *resolution);
acpi_status
acpi_get_timer (
- u32 *ticks);
+ u32 *ticks);
acpi_status
acpi_get_timer_duration (
- u32 start_ticks,
- u32 end_ticks,
- u32 *time_elapsed);
+ u32 start_ticks,
+ u32 end_ticks,
+ u32 *time_elapsed);
#endif /* __ACHWARE_H__ */
diff --git a/drivers/acpi/include/acinterp.h b/drivers/acpi/include/acinterp.h
index 7831616ccf9b..cd0060827d79 100644
--- a/drivers/acpi/include/acinterp.h
+++ b/drivers/acpi/include/acinterp.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -31,15 +31,15 @@
acpi_status
acpi_ex_resolve_operands (
- u16 opcode,
- acpi_operand_object **stack_ptr,
- acpi_walk_state *walk_state);
+ u16 opcode,
+ union acpi_operand_object **stack_ptr,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_check_object_type (
- acpi_object_type type_needed,
- acpi_object_type this_type,
- void *object);
+ acpi_object_type type_needed,
+ acpi_object_type this_type,
+ void *object);
/*
* exxface - External interpreter interfaces
@@ -47,13 +47,13 @@ acpi_ex_check_object_type (
acpi_status
acpi_ex_load_table (
- acpi_table_type table_id);
+ acpi_table_type table_id);
acpi_status
acpi_ex_execute_method (
- acpi_namespace_node *method_node,
- acpi_operand_object **params,
- acpi_operand_object **return_obj_desc);
+ struct acpi_namespace_node *method_node,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_obj_desc);
/*
@@ -62,37 +62,37 @@ acpi_ex_execute_method (
acpi_status
acpi_ex_convert_to_integer (
- acpi_operand_object *obj_desc,
- acpi_operand_object **result_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **result_desc,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_convert_to_buffer (
- acpi_operand_object *obj_desc,
- acpi_operand_object **result_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **result_desc,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_convert_to_string (
- acpi_operand_object *obj_desc,
- acpi_operand_object **result_desc,
- u32 base,
- u32 max_length,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **result_desc,
+ u32 base,
+ u32 max_length,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_convert_to_target_type (
- acpi_object_type destination_type,
- acpi_operand_object *source_desc,
- acpi_operand_object **result_desc,
- acpi_walk_state *walk_state);
+ acpi_object_type destination_type,
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object **result_desc,
+ struct acpi_walk_state *walk_state);
u32
acpi_ex_convert_to_ascii (
- acpi_integer integer,
- u32 base,
- u8 *string,
- u8 max_length);
+ acpi_integer integer,
+ u32 base,
+ u8 *string,
+ u8 max_length);
/*
* exfield - ACPI AML (p-code) execution - field manipulation
@@ -100,72 +100,72 @@ acpi_ex_convert_to_ascii (
acpi_status
acpi_ex_extract_from_field (
- acpi_operand_object *obj_desc,
- void *buffer,
- u32 buffer_length);
+ union acpi_operand_object *obj_desc,
+ void *buffer,
+ u32 buffer_length);
acpi_status
acpi_ex_insert_into_field (
- acpi_operand_object *obj_desc,
- void *buffer,
- u32 buffer_length);
+ union acpi_operand_object *obj_desc,
+ void *buffer,
+ u32 buffer_length);
acpi_status
acpi_ex_setup_region (
- acpi_operand_object *obj_desc,
- u32 field_datum_byte_offset);
+ union acpi_operand_object *obj_desc,
+ u32 field_datum_byte_offset);
acpi_status
acpi_ex_access_region (
- acpi_operand_object *obj_desc,
- u32 field_datum_byte_offset,
- acpi_integer *value,
- u32 read_write);
+ union acpi_operand_object *obj_desc,
+ u32 field_datum_byte_offset,
+ acpi_integer *value,
+ u32 read_write);
u8
acpi_ex_register_overflow (
- acpi_operand_object *obj_desc,
- acpi_integer value);
+ union acpi_operand_object *obj_desc,
+ acpi_integer value);
acpi_status
acpi_ex_field_datum_io (
- acpi_operand_object *obj_desc,
- u32 field_datum_byte_offset,
- acpi_integer *value,
- u32 read_write);
+ union acpi_operand_object *obj_desc,
+ u32 field_datum_byte_offset,
+ acpi_integer *value,
+ u32 read_write);
acpi_status
acpi_ex_write_with_update_rule (
- acpi_operand_object *obj_desc,
- acpi_integer mask,
- acpi_integer field_value,
- u32 field_datum_byte_offset);
+ union acpi_operand_object *obj_desc,
+ acpi_integer mask,
+ acpi_integer field_value,
+ u32 field_datum_byte_offset);
void
acpi_ex_get_buffer_datum(
- acpi_integer *datum,
- void *buffer,
- u32 byte_granularity,
- u32 offset);
+ acpi_integer *datum,
+ void *buffer,
+ u32 byte_granularity,
+ u32 offset);
void
acpi_ex_set_buffer_datum (
- acpi_integer merged_datum,
- void *buffer,
- u32 byte_granularity,
- u32 offset);
+ acpi_integer merged_datum,
+ void *buffer,
+ u32 byte_granularity,
+ u32 offset);
acpi_status
acpi_ex_read_data_from_field (
- acpi_walk_state *walk_state,
- acpi_operand_object *obj_desc,
- acpi_operand_object **ret_buffer_desc);
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **ret_buffer_desc);
acpi_status
acpi_ex_write_data_to_field (
- acpi_operand_object *source_desc,
- acpi_operand_object *obj_desc,
- acpi_operand_object **result_desc);
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **result_desc);
/*
* exmisc - ACPI AML (p-code) execution - specific opcodes
@@ -173,97 +173,97 @@ acpi_ex_write_data_to_field (
acpi_status
acpi_ex_opcode_3A_0T_0R (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_3A_1T_1R (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_6A_0T_1R (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
u8
acpi_ex_do_match (
- u32 match_op,
- acpi_integer package_value,
- acpi_integer match_value);
+ u32 match_op,
+ acpi_integer package_value,
+ acpi_integer match_value);
acpi_status
acpi_ex_get_object_reference (
- acpi_operand_object *obj_desc,
- acpi_operand_object **return_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object **return_desc,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_resolve_multiple (
- acpi_walk_state *walk_state,
- acpi_operand_object *operand,
- acpi_object_type *return_type,
- acpi_operand_object **return_desc);
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object *operand,
+ acpi_object_type *return_type,
+ union acpi_operand_object **return_desc);
acpi_status
acpi_ex_concat_template (
- acpi_operand_object *obj_desc,
- acpi_operand_object *obj_desc2,
- acpi_operand_object **actual_return_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object *obj_desc2,
+ union acpi_operand_object **actual_return_desc,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_do_concatenate (
- acpi_operand_object *obj_desc,
- acpi_operand_object *obj_desc2,
- acpi_operand_object **actual_return_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object *obj_desc2,
+ union acpi_operand_object **actual_return_desc,
+ struct acpi_walk_state *walk_state);
u8
acpi_ex_do_logical_op (
- u16 opcode,
- acpi_integer operand0,
- acpi_integer operand1);
+ u16 opcode,
+ acpi_integer operand0,
+ acpi_integer operand1);
acpi_integer
acpi_ex_do_math_op (
- u16 opcode,
- acpi_integer operand0,
- acpi_integer operand1);
+ u16 opcode,
+ acpi_integer operand0,
+ acpi_integer operand1);
acpi_status
acpi_ex_create_mutex (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_create_processor (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_create_power_resource (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_create_region (
- u8 *aml_start,
- u32 aml_length,
- u8 region_space,
- acpi_walk_state *walk_state);
+ u8 *aml_start,
+ u32 aml_length,
+ u8 region_space,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_create_table_region (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_create_event (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_create_alias (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_create_method (
- u8 *aml_start,
- u32 aml_length,
- acpi_walk_state *walk_state);
+ u8 *aml_start,
+ u32 aml_length,
+ struct acpi_walk_state *walk_state);
/*
@@ -272,24 +272,24 @@ acpi_ex_create_method (
acpi_status
acpi_ex_add_table (
- acpi_table_header *table,
- acpi_namespace_node *parent_node,
- acpi_operand_object **ddb_handle);
+ struct acpi_table_header *table,
+ struct acpi_namespace_node *parent_node,
+ union acpi_operand_object **ddb_handle);
acpi_status
acpi_ex_load_op (
- acpi_operand_object *obj_desc,
- acpi_operand_object *target,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *obj_desc,
+ union acpi_operand_object *target,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_load_table_op (
- acpi_walk_state *walk_state,
- acpi_operand_object **return_desc);
+ struct acpi_walk_state *walk_state,
+ union acpi_operand_object **return_desc);
acpi_status
acpi_ex_unload_table (
- acpi_operand_object *ddb_handle);
+ union acpi_operand_object *ddb_handle);
/*
@@ -298,27 +298,27 @@ acpi_ex_unload_table (
acpi_status
acpi_ex_acquire_mutex (
- acpi_operand_object *time_desc,
- acpi_operand_object *obj_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *time_desc,
+ union acpi_operand_object *obj_desc,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_release_mutex (
- acpi_operand_object *obj_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *obj_desc,
+ struct acpi_walk_state *walk_state);
void
acpi_ex_release_all_mutexes (
- acpi_thread_state *thread);
+ struct acpi_thread_state *thread);
void
acpi_ex_unlink_mutex (
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
void
acpi_ex_link_mutex (
- acpi_operand_object *obj_desc,
- acpi_thread_state *thread);
+ union acpi_operand_object *obj_desc,
+ struct acpi_thread_state *thread);
/*
* exprep - ACPI AML (p-code) execution - prep utilities
@@ -326,15 +326,15 @@ acpi_ex_link_mutex (
acpi_status
acpi_ex_prep_common_field_object (
- acpi_operand_object *obj_desc,
- u8 field_flags,
- u8 field_attribute,
- u32 field_bit_position,
- u32 field_bit_length);
+ union acpi_operand_object *obj_desc,
+ u8 field_flags,
+ u8 field_attribute,
+ u32 field_bit_position,
+ u32 field_bit_length);
acpi_status
acpi_ex_prep_field_value (
- acpi_create_field_info *info);
+ struct acpi_create_field_info *info);
/*
* exsystem - Interface to OS services
@@ -342,43 +342,43 @@ acpi_ex_prep_field_value (
acpi_status
acpi_ex_system_do_notify_op (
- acpi_operand_object *value,
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *value,
+ union acpi_operand_object *obj_desc);
acpi_status
acpi_ex_system_do_suspend(
- u32 time);
+ u32 time);
acpi_status
acpi_ex_system_do_stall (
- u32 time);
+ u32 time);
acpi_status
acpi_ex_system_acquire_mutex(
- acpi_operand_object *time,
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *time,
+ union acpi_operand_object *obj_desc);
acpi_status
acpi_ex_system_release_mutex(
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
acpi_status
acpi_ex_system_signal_event(
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
acpi_status
acpi_ex_system_wait_event(
- acpi_operand_object *time,
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *time,
+ union acpi_operand_object *obj_desc);
acpi_status
acpi_ex_system_reset_event(
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
acpi_status
acpi_ex_system_wait_semaphore (
- acpi_handle semaphore,
- u16 timeout);
+ acpi_handle semaphore,
+ u16 timeout);
/*
@@ -387,19 +387,19 @@ acpi_ex_system_wait_semaphore (
acpi_status
acpi_ex_opcode_1A_0T_0R (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_1A_0T_1R (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_1A_1T_1R (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_1A_1T_0R (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
/*
* exdyadic - ACPI AML (p-code) execution, dyadic operators
@@ -407,19 +407,19 @@ acpi_ex_opcode_1A_1T_0R (
acpi_status
acpi_ex_opcode_2A_0T_0R (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_2A_0T_1R (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_2A_1T_1R (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_opcode_2A_2T_1R (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
/*
@@ -428,18 +428,18 @@ acpi_ex_opcode_2A_2T_1R (
acpi_status
acpi_ex_resolve_to_value (
- acpi_operand_object **stack_ptr,
- acpi_walk_state *walk_state);
+ union acpi_operand_object **stack_ptr,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_resolve_node_to_value (
- acpi_namespace_node **stack_ptr,
- acpi_walk_state *walk_state);
+ struct acpi_namespace_node **stack_ptr,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_resolve_object_to_value (
- acpi_operand_object **stack_ptr,
- acpi_walk_state *walk_state);
+ union acpi_operand_object **stack_ptr,
+ struct acpi_walk_state *walk_state);
/*
@@ -448,47 +448,47 @@ acpi_ex_resolve_object_to_value (
void
acpi_ex_dump_operand (
- acpi_operand_object *entry_desc);
+ union acpi_operand_object *entry_desc);
void
acpi_ex_dump_operands (
- acpi_operand_object **operands,
- acpi_interpreter_mode interpreter_mode,
- char *ident,
- u32 num_levels,
- char *note,
- char *module_name,
- u32 line_number);
+ union acpi_operand_object **operands,
+ acpi_interpreter_mode interpreter_mode,
+ char *ident,
+ u32 num_levels,
+ char *note,
+ char *module_name,
+ u32 line_number);
void
acpi_ex_dump_object_descriptor (
- acpi_operand_object *object,
- u32 flags);
+ union acpi_operand_object *object,
+ u32 flags);
void
acpi_ex_dump_node (
- acpi_namespace_node *node,
- u32 flags);
+ struct acpi_namespace_node *node,
+ u32 flags);
void
acpi_ex_out_string (
- char *title,
- char *value);
+ char *title,
+ char *value);
void
acpi_ex_out_pointer (
- char *title,
- void *value);
+ char *title,
+ void *value);
void
acpi_ex_out_integer (
- char *title,
- u32 value);
+ char *title,
+ u32 value);
void
acpi_ex_out_address (
- char *title,
- acpi_physical_address value);
+ char *title,
+ acpi_physical_address value);
/*
@@ -497,29 +497,29 @@ acpi_ex_out_address (
char *
acpi_ex_allocate_name_string (
- u32 prefix_count,
- u32 num_name_segs);
+ u32 prefix_count,
+ u32 num_name_segs);
u32
acpi_ex_good_char (
- u32 character);
+ u32 character);
acpi_status
acpi_ex_name_segment (
- u8 **in_aml_address,
- char *name_string);
+ u8 **in_aml_address,
+ char *name_string);
acpi_status
acpi_ex_get_name_string (
- acpi_object_type data_type,
- u8 *in_aml_address,
- char **out_name_string,
- u32 *out_name_length);
+ acpi_object_type data_type,
+ u8 *in_aml_address,
+ char **out_name_string,
+ u32 *out_name_length);
acpi_status
acpi_ex_do_name (
- acpi_object_type data_type,
- acpi_interpreter_mode load_exec_mode);
+ acpi_object_type data_type,
+ acpi_interpreter_mode load_exec_mode);
/*
@@ -528,21 +528,21 @@ acpi_ex_do_name (
acpi_status
acpi_ex_store (
- acpi_operand_object *val_desc,
- acpi_operand_object *dest_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *val_desc,
+ union acpi_operand_object *dest_desc,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_store_object_to_index (
- acpi_operand_object *val_desc,
- acpi_operand_object *dest_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *val_desc,
+ union acpi_operand_object *dest_desc,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_store_object_to_node (
- acpi_operand_object *source_desc,
- acpi_namespace_node *node,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *source_desc,
+ struct acpi_namespace_node *node,
+ struct acpi_walk_state *walk_state);
/*
@@ -551,16 +551,16 @@ acpi_ex_store_object_to_node (
acpi_status
acpi_ex_resolve_object (
- acpi_operand_object **source_desc_ptr,
- acpi_object_type target_type,
- acpi_walk_state *walk_state);
+ union acpi_operand_object **source_desc_ptr,
+ acpi_object_type target_type,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ex_store_object_to_object (
- acpi_operand_object *source_desc,
- acpi_operand_object *dest_desc,
- acpi_operand_object **new_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *dest_desc,
+ union acpi_operand_object **new_desc,
+ struct acpi_walk_state *walk_state);
/*
@@ -569,33 +569,33 @@ acpi_ex_store_object_to_object (
acpi_status
acpi_ex_store_buffer_to_buffer (
- acpi_operand_object *source_desc,
- acpi_operand_object *target_desc);
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *target_desc);
acpi_status
acpi_ex_store_string_to_string (
- acpi_operand_object *source_desc,
- acpi_operand_object *target_desc);
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *target_desc);
acpi_status
acpi_ex_copy_integer_to_index_field (
- acpi_operand_object *source_desc,
- acpi_operand_object *target_desc);
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *target_desc);
acpi_status
acpi_ex_copy_integer_to_bank_field (
- acpi_operand_object *source_desc,
- acpi_operand_object *target_desc);
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *target_desc);
acpi_status
acpi_ex_copy_data_to_named_field (
- acpi_operand_object *source_desc,
- acpi_namespace_node *node);
+ union acpi_operand_object *source_desc,
+ struct acpi_namespace_node *node);
acpi_status
acpi_ex_copy_integer_to_buffer_field (
- acpi_operand_object *source_desc,
- acpi_operand_object *target_desc);
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *target_desc);
/*
* exutils - interpreter/scanner utilities
@@ -611,30 +611,30 @@ acpi_ex_exit_interpreter (
void
acpi_ex_truncate_for32bit_table (
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
u8
acpi_ex_acquire_global_lock (
- u32 rule);
+ u32 rule);
void
acpi_ex_release_global_lock (
- u8 locked);
+ u8 locked);
u32
acpi_ex_digits_needed (
- acpi_integer value,
- u32 base);
+ acpi_integer value,
+ u32 base);
void
acpi_ex_eisa_id_to_string (
- u32 numeric_id,
- char *out_string);
+ u32 numeric_id,
+ char *out_string);
void
acpi_ex_unsigned_integer_to_string (
- acpi_integer value,
- char *out_string);
+ acpi_integer value,
+ char *out_string);
/*
@@ -643,75 +643,75 @@ acpi_ex_unsigned_integer_to_string (
acpi_status
acpi_ex_system_memory_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context);
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context);
acpi_status
acpi_ex_system_io_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context);
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context);
acpi_status
acpi_ex_pci_config_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context);
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context);
acpi_status
acpi_ex_cmos_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context);
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context);
acpi_status
acpi_ex_pci_bar_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context);
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context);
acpi_status
acpi_ex_embedded_controller_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context);
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context);
acpi_status
acpi_ex_sm_bus_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context);
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context);
acpi_status
acpi_ex_data_table_space_handler (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context);
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context);
#endif /* __INTERP_H__ */
diff --git a/drivers/acpi/include/aclocal.h b/drivers/acpi/include/aclocal.h
index c4c39b1ba19f..1e3e9640af28 100644
--- a/drivers/acpi/include/aclocal.h
+++ b/drivers/acpi/include/aclocal.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -28,8 +28,8 @@
#define ACPI_WAIT_FOREVER 0xFFFF /* u16, as per ACPI spec */
-typedef void* acpi_mutex;
-typedef u32 acpi_mutex_handle;
+typedef void * acpi_mutex;
+typedef u32 acpi_mutex_handle;
/* Total number of aml opcodes defined */
@@ -77,7 +77,7 @@ typedef u32 acpi_mutex_handle;
/* Names for the mutexes used in the subsystem */
-static char *acpi_gbl_mutex_names[] =
+static char *acpi_gbl_mutex_names[] =
{
"ACPI_MTX_Execute",
"ACPI_MTX_Interpreter",
@@ -100,13 +100,12 @@ static char *acpi_gbl_mutex_names[] =
/* Table for the global mutexes */
-typedef struct acpi_mutex_info
+struct acpi_mutex_info
{
- acpi_mutex mutex;
- u32 use_count;
- u32 owner_id;
-
-} acpi_mutex_info;
+ acpi_mutex mutex;
+ u32 use_count;
+ u32 owner_id;
+};
/* This owner ID means that the mutex is not in use (unlocked) */
@@ -119,7 +118,7 @@ typedef struct acpi_mutex_info
#define ACPI_MTX_LOCK 1
-typedef u16 acpi_owner_id;
+typedef u16 acpi_owner_id;
#define ACPI_OWNER_TYPE_TABLE 0x0
#define ACPI_OWNER_TYPE_METHOD 0x1
#define ACPI_FIRST_METHOD_ID 0x0000
@@ -163,27 +162,26 @@ typedef enum
* be the first byte in this structure.
*/
-typedef union acpi_name_union
+union acpi_name_union
{
- u32 integer;
- char ascii[4];
-} acpi_name_union;
+ u32 integer;
+ char ascii[4];
+};
-typedef struct acpi_node
+struct acpi_namespace_node
{
- u8 descriptor; /* Used to differentiate object descriptor types */
- u8 type; /* Type associated with this name */
- u16 owner_id;
- acpi_name_union name; /* ACPI Name, always 4 chars per ACPI spec */
+ u8 descriptor; /* Used to differentiate object descriptor types */
+ u8 type; /* Type associated with this name */
+ u16 owner_id;
+ union acpi_name_union name; /* ACPI Name, always 4 chars per ACPI spec */
- union acpi_operand_obj *object; /* Pointer to attached ACPI object (optional) */
- struct acpi_node *child; /* first child */
- struct acpi_node *peer; /* Next peer*/
- u16 reference_count; /* Current count of references and children */
- u8 flags;
-
-} acpi_namespace_node;
+ union acpi_operand_object *object; /* Pointer to attached ACPI object (optional) */
+ struct acpi_namespace_node *child; /* first child */
+ struct acpi_namespace_node *peer; /* Next peer*/
+ u16 reference_count; /* Current count of references and children */
+ u8 flags;
+};
#define ACPI_ENTRY_NOT_FOUND NULL
@@ -205,50 +203,47 @@ typedef struct acpi_node
/*
* ACPI Table Descriptor. One per ACPI table
*/
-typedef struct acpi_table_desc
-{
- struct acpi_table_desc *prev;
- struct acpi_table_desc *next;
- struct acpi_table_desc *installed_desc;
- acpi_table_header *pointer;
- u8 *aml_start;
- u64 physical_address;
- u32 aml_length;
- acpi_size length;
- u32 count;
- acpi_owner_id table_id;
- u8 type;
- u8 allocation;
- u8 loaded_into_namespace;
-
-} acpi_table_desc;
+struct acpi_table_desc
+{
+ struct acpi_table_desc *prev;
+ struct acpi_table_desc *next;
+ struct acpi_table_desc *installed_desc;
+ struct acpi_table_header *pointer;
+ u8 *aml_start;
+ u64 physical_address;
+ u32 aml_length;
+ acpi_size length;
+ u32 count;
+ acpi_owner_id table_id;
+ u8 type;
+ u8 allocation;
+ u8 loaded_into_namespace;
+};
-typedef struct
+struct acpi_find_context
{
- char *search_for;
- acpi_handle *list;
- u32 *count;
-
-} acpi_find_context;
+ char *search_for;
+ acpi_handle *list;
+ u32 *count;
+};
-typedef struct
+struct acpi_ns_search_data
{
- acpi_namespace_node *node;
-} acpi_ns_search_data;
+ struct acpi_namespace_node *node;
+};
/*
* Predefined Namespace items
*/
-typedef struct
+struct acpi_predefined_names
{
- char *name;
- u8 type;
- char *val;
-
-} acpi_predefined_names;
+ char *name;
+ u8 type;
+ char *val;
+};
/* Object types used during package copies */
@@ -259,35 +254,33 @@ typedef struct
/* Info structure used to convert external<->internal namestrings */
-typedef struct acpi_namestring_info
+struct acpi_namestring_info
{
- char *external_name;
- char *next_external_char;
- char *internal_name;
- u32 length;
- u32 num_segments;
- u32 num_carats;
- u8 fully_qualified;
-
-} acpi_namestring_info;
+ char *external_name;
+ char *next_external_char;
+ char *internal_name;
+ u32 length;
+ u32 num_segments;
+ u32 num_carats;
+ u8 fully_qualified;
+};
/* Field creation info */
-typedef struct
-{
- acpi_namespace_node *region_node;
- acpi_namespace_node *field_node;
- acpi_namespace_node *register_node;
- acpi_namespace_node *data_register_node;
- u32 bank_value;
- u32 field_bit_position;
- u32 field_bit_length;
- u8 field_flags;
- u8 attribute;
- u8 field_type;
-
-} acpi_create_field_info;
+struct acpi_create_field_info
+{
+ struct acpi_namespace_node *region_node;
+ struct acpi_namespace_node *field_node;
+ struct acpi_namespace_node *register_node;
+ struct acpi_namespace_node *data_register_node;
+ u32 bank_value;
+ u32 field_bit_position;
+ u32 field_bit_length;
+ u8 field_flags;
+ u8 attribute;
+ u8 field_type;
+};
/*****************************************************************************
@@ -298,26 +291,24 @@ typedef struct
/* Information about each GPE register block */
-typedef struct
+struct acpi_gpe_block_info
{
- acpi_generic_address *block_address;
- u16 register_count;
- u8 block_base_number;
-
-} acpi_gpe_block_info;
+ struct acpi_generic_address *block_address;
+ u16 register_count;
+ u8 block_base_number;
+};
/* Information about a particular GPE register pair */
-typedef struct
+struct acpi_gpe_register_info
{
- acpi_generic_address status_address; /* Address of status reg */
- acpi_generic_address enable_address; /* Address of enable reg */
- u8 status; /* Current value of status reg */
- u8 enable; /* Current value of enable reg */
- u8 wake_enable; /* Mask of bits to keep enabled when sleeping */
- u8 base_gpe_number; /* Base GPE number for this register */
-
-} acpi_gpe_register_info;
+ struct acpi_generic_address status_address; /* Address of status reg */
+ struct acpi_generic_address enable_address; /* Address of enable reg */
+ u8 status; /* Current value of status reg */
+ u8 enable; /* Current value of enable reg */
+ u8 wake_enable; /* Mask of bits to keep enabled when sleeping */
+ u8 base_gpe_number; /* Base GPE number for this register */
+};
#define ACPI_GPE_LEVEL_TRIGGERED 1
@@ -326,52 +317,46 @@ typedef struct
/* Information about each particular GPE level */
-typedef struct
+struct acpi_gpe_number_info
{
- acpi_namespace_node *method_node; /* Method node for this GPE level */
- acpi_gpe_handler handler; /* Address of handler, if any */
- void *context; /* Context to be passed to handler */
- u8 type; /* Level or Edge */
- u8 bit_mask;
-
-
-} acpi_gpe_number_info;
+ struct acpi_namespace_node *method_node; /* Method node for this GPE level */
+ acpi_gpe_handler handler; /* Address of handler, if any */
+ void *context; /* Context to be passed to handler */
+ u8 type; /* Level or Edge */
+ u8 bit_mask;
+};
-typedef struct
+struct acpi_gpe_index_info
{
- u8 number_index;
-
-} acpi_gpe_index_info;
+ u8 number_index;
+};
/* Information about each particular fixed event */
-typedef struct
+struct acpi_fixed_event_handler
{
- acpi_event_handler handler; /* Address of handler. */
- void *context; /* Context to be passed to handler */
-
-} acpi_fixed_event_handler;
+ acpi_event_handler handler; /* Address of handler. */
+ void *context; /* Context to be passed to handler */
+};
-typedef struct
+struct acpi_fixed_event_info
{
- u8 status_register_id;
- u8 enable_register_id;
- u16 status_bit_mask;
- u16 enable_bit_mask;
-
-} acpi_fixed_event_info;
+ u8 status_register_id;
+ u8 enable_register_id;
+ u16 status_bit_mask;
+ u16 enable_bit_mask;
+};
/* Information used during field processing */
-typedef struct
+struct acpi_field_info
{
- u8 skip_field;
- u8 field_flag;
- u32 pkg_length;
-
-} acpi_field_info;
+ u8 skip_field;
+ u8 field_flag;
+ u32 pkg_length;
+};
/*****************************************************************************
@@ -389,157 +374,148 @@ typedef struct
/* Forward declarations */
-struct acpi_walk_state;
+struct acpi_walk_state ;
struct acpi_obj_mutex;
-union acpi_parse_obj;
+union acpi_parse_object ;
#define ACPI_STATE_COMMON /* Two 32-bit fields and a pointer */\
- u8 data_type; /* To differentiate various internal objs */\
- u8 flags; \
- u16 value; \
- u16 state; \
- u16 reserved; \
- void *next; \
+ u8 data_type; /* To differentiate various internal objs */\
+ u8 flags; \
+ u16 value; \
+ u16 state; \
+ u16 reserved; \
+ void *next; \
-typedef struct acpi_common_state
+struct acpi_common_state
{
ACPI_STATE_COMMON
-} acpi_common_state;
+};
/*
* Update state - used to traverse complex objects such as packages
*/
-typedef struct acpi_update_state
+struct acpi_update_state
{
ACPI_STATE_COMMON
- union acpi_operand_obj *object;
-
-} acpi_update_state;
+ union acpi_operand_object *object;
+};
/*
* Pkg state - used to traverse nested package structures
*/
-typedef struct acpi_pkg_state
+struct acpi_pkg_state
{
ACPI_STATE_COMMON
- union acpi_operand_obj *source_object;
- union acpi_operand_obj *dest_object;
- struct acpi_walk_state *walk_state;
- void *this_target_obj;
- u32 num_packages;
- u16 index;
-
-} acpi_pkg_state;
+ union acpi_operand_object *source_object;
+ union acpi_operand_object *dest_object;
+ struct acpi_walk_state *walk_state;
+ void *this_target_obj;
+ u32 num_packages;
+ u16 index;
+};
/*
* Control state - one per if/else and while constructs.
* Allows nesting of these constructs
*/
-typedef struct acpi_control_state
+struct acpi_control_state
{
ACPI_STATE_COMMON
- union acpi_parse_obj *predicate_op;
- u8 *aml_predicate_start; /* Start of if/while predicate */
- u8 *package_end; /* End of if/while block */
- u16 opcode;
-
-} acpi_control_state;
+ union acpi_parse_object *predicate_op;
+ u8 *aml_predicate_start; /* Start of if/while predicate */
+ u8 *package_end; /* End of if/while block */
+ u16 opcode;
+};
/*
* Scope state - current scope during namespace lookups
*/
-typedef struct acpi_scope_state
+struct acpi_scope_state
{
ACPI_STATE_COMMON
- acpi_namespace_node *node;
-
-} acpi_scope_state;
+ struct acpi_namespace_node *node;
+};
-typedef struct acpi_pscope_state
+struct acpi_pscope_state
{
ACPI_STATE_COMMON
- union acpi_parse_obj *op; /* current op being parsed */
- u8 *arg_end; /* current argument end */
- u8 *pkg_end; /* current package end */
- u32 arg_list; /* next argument to parse */
- u32 arg_count; /* Number of fixed arguments */
-
-} acpi_pscope_state;
+ union acpi_parse_object *op; /* current op being parsed */
+ u8 *arg_end; /* current argument end */
+ u8 *pkg_end; /* current package end */
+ u32 arg_list; /* next argument to parse */
+ u32 arg_count; /* Number of fixed arguments */
+};
/*
* Thread state - one per thread across multiple walk states. Multiple walk
* states are created when there are nested control methods executing.
*/
-typedef struct acpi_thread_state
+struct acpi_thread_state
{
ACPI_STATE_COMMON
- struct acpi_walk_state *walk_state_list; /* Head of list of walk_states for this thread */
- union acpi_operand_obj *acquired_mutex_list; /* List of all currently acquired mutexes */
- u32 thread_id; /* Running thread ID */
- u16 current_sync_level; /* Mutex Sync (nested acquire) level */
-
-} acpi_thread_state;
+ struct acpi_walk_state *walk_state_list; /* Head of list of walk_states for this thread */
+ union acpi_operand_object *acquired_mutex_list; /* List of all currently acquired mutexes */
+ u32 thread_id; /* Running thread ID */
+ u16 current_sync_level; /* Mutex Sync (nested acquire) level */
+};
/*
* Result values - used to accumulate the results of nested
* AML arguments
*/
-typedef struct acpi_result_values
+struct acpi_result_values
{
ACPI_STATE_COMMON
- union acpi_operand_obj *obj_desc [ACPI_OBJ_NUM_OPERANDS];
- u8 num_results;
- u8 last_insert;
-
-} acpi_result_values;
+ union acpi_operand_object *obj_desc [ACPI_OBJ_NUM_OPERANDS];
+ u8 num_results;
+ u8 last_insert;
+};
typedef
acpi_status (*acpi_parse_downwards) (
- struct acpi_walk_state *walk_state,
- union acpi_parse_obj **out_op);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object **out_op);
typedef
acpi_status (*acpi_parse_upwards) (
- struct acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
/*
* Notify info - used to pass info to the deferred notify
* handler/dispatcher.
*/
-typedef struct acpi_notify_info
+struct acpi_notify_info
{
ACPI_STATE_COMMON
- acpi_namespace_node *node;
- union acpi_operand_obj *handler_obj;
-
-} acpi_notify_info;
+ struct acpi_namespace_node *node;
+ union acpi_operand_object *handler_obj;
+};
/* Generic state is union of structs above */
-typedef union acpi_gen_state
-{
- acpi_common_state common;
- acpi_control_state control;
- acpi_update_state update;
- acpi_scope_state scope;
- acpi_pscope_state parse_scope;
- acpi_pkg_state pkg;
- acpi_thread_state thread;
- acpi_result_values results;
- acpi_notify_info notify;
-
-} acpi_generic_state;
+union acpi_generic_state
+{
+ struct acpi_common_state common;
+ struct acpi_control_state control;
+ struct acpi_update_state update;
+ struct acpi_scope_state scope;
+ struct acpi_pscope_state parse_scope;
+ struct acpi_pkg_state pkg;
+ struct acpi_thread_state thread;
+ struct acpi_result_values results;
+ struct acpi_notify_info notify;
+};
/*****************************************************************************
@@ -550,7 +526,7 @@ typedef union acpi_gen_state
typedef
acpi_status (*ACPI_EXECUTE_OP) (
- struct acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
/*****************************************************************************
@@ -562,51 +538,50 @@ acpi_status (*ACPI_EXECUTE_OP) (
/*
* AML opcode, name, and argument layout
*/
-typedef struct acpi_opcode_info
+struct acpi_opcode_info
{
#if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG_OUTPUT)
- char *name; /* Opcode name (disassembler/debug only) */
+ char *name; /* Opcode name (disassembler/debug only) */
#endif
- u32 parse_args; /* Grammar/Parse time arguments */
- u32 runtime_args; /* Interpret time arguments */
- u32 flags; /* Misc flags */
- u8 object_type; /* Corresponding internal object type */
- u8 class; /* Opcode class */
- u8 type; /* Opcode type */
-
-} acpi_opcode_info;
+ u32 parse_args; /* Grammar/Parse time arguments */
+ u32 runtime_args; /* Interpret time arguments */
+ u32 flags; /* Misc flags */
+ u8 object_type; /* Corresponding internal object type */
+ u8 class; /* Opcode class */
+ u8 type; /* Opcode type */
+};
-typedef union acpi_parse_val
+union acpi_parse_value
{
- acpi_integer integer; /* integer constant (Up to 64 bits) */
- uint64_struct integer64; /* Structure overlay for 2 32-bit Dwords */
- u32 integer32; /* integer constant, 32 bits only */
- u16 integer16; /* integer constant, 16 bits only */
- u8 integer8; /* integer constant, 8 bits only */
- u32 size; /* bytelist or field size */
- char *string; /* NULL terminated string */
- u8 *buffer; /* buffer or string */
- char *name; /* NULL terminated string */
- union acpi_parse_obj *arg; /* arguments and contained ops */
-
-} acpi_parse_value;
+ acpi_integer integer; /* integer constant (Up to 64 bits) */
+ struct uint64_struct integer64; /* Structure overlay for 2 32-bit Dwords */
+ u32 integer32; /* integer constant, 32 bits only */
+ u16 integer16; /* integer constant, 16 bits only */
+ u8 integer8; /* integer constant, 8 bits only */
+ u32 size; /* bytelist or field size */
+ char *string; /* NULL terminated string */
+ u8 *buffer; /* buffer or string */
+ char *name; /* NULL terminated string */
+ union acpi_parse_object *arg; /* arguments and contained ops */
+};
#define ACPI_PARSE_COMMON \
- u8 data_type; /* To differentiate various internal objs */\
- u8 flags; /* Type of Op */\
- u16 aml_opcode; /* AML opcode */\
- u32 aml_offset; /* offset of declaration in AML */\
- union acpi_parse_obj *parent; /* parent op */\
- union acpi_parse_obj *next; /* next op */\
+ u8 data_type; /* To differentiate various internal objs */\
+ u8 flags; /* Type of Op */\
+ u16 aml_opcode; /* AML opcode */\
+ u32 aml_offset; /* offset of declaration in AML */\
+ union acpi_parse_object *parent; /* parent op */\
+ union acpi_parse_object *next; /* next op */\
ACPI_DISASM_ONLY_MEMBERS (\
- u8 disasm_flags; /* Used during AML disassembly */\
- u8 disasm_opcode; /* Subtype used for disassembly */\
- char aml_op_name[16]) /* op name (debug only) */\
- /* NON-DEBUG members below: */\
- acpi_namespace_node *node; /* for use by interpreter */\
- acpi_parse_value value; /* Value or args associated with the opcode */\
+ u8 disasm_flags; /* Used during AML disassembly */\
+ u8 disasm_opcode; /* Subtype used for disassembly */\
+ char aml_op_name[16]) /* op name (debug only) */\
+ /* NON-DEBUG members below: */\
+ struct acpi_namespace_node *node; /* for use by interpreter */\
+ union acpi_parse_value value; /* Value or args associated with the opcode */\
+
#define ACPI_DASM_BUFFER 0x00
#define ACPI_DASM_RESOURCE 0x01
@@ -618,90 +593,83 @@ typedef union acpi_parse_val
/*
* generic operation (for example: If, While, Store)
*/
-typedef struct acpi_parseobj_common
+struct acpi_parse_obj_common
{
ACPI_PARSE_COMMON
-} acpi_parse_obj_common;
+};
/*
* Extended Op for named ops (Scope, Method, etc.), deferred ops (Methods and op_regions),
* and bytelists.
*/
-typedef struct acpi_parseobj_named
+struct acpi_parse_obj_named
{
ACPI_PARSE_COMMON
- u8 *path;
- u8 *data; /* AML body or bytelist data */
- u32 length; /* AML length */
- u32 name; /* 4-byte name or zero if no name */
-
-} acpi_parse_obj_named;
+ u8 *path;
+ u8 *data; /* AML body or bytelist data */
+ u32 length; /* AML length */
+ u32 name; /* 4-byte name or zero if no name */
+};
/* The parse node is the fundamental element of the parse tree */
-typedef struct acpi_parseobj_asl
+struct acpi_parse_obj_asl
{
ACPI_PARSE_COMMON
-
- union acpi_parse_obj *child;
-
-
- union acpi_parse_obj *parent_method;
- char *filename;
- char *external_name;
- char *namepath;
- char name_seg[4];
- u32 extra_value;
- u32 column;
- u32 line_number;
- u32 logical_line_number;
- u32 logical_byte_offset;
- u32 end_line;
- u32 end_logical_line;
- u32 acpi_btype;
- u32 aml_length;
- u32 aml_subtree_length;
- u32 final_aml_length;
- u32 final_aml_offset;
- u32 compile_flags;
- u16 parse_opcode;
- u8 aml_opcode_length;
- u8 aml_pkg_len_bytes;
- u8 extra;
- char parse_op_name[12];
-
-} acpi_parse_obj_asl;
+ union acpi_parse_object *child;
+ union acpi_parse_object *parent_method;
+ char *filename;
+ char *external_name;
+ char *namepath;
+ char name_seg[4];
+ u32 extra_value;
+ u32 column;
+ u32 line_number;
+ u32 logical_line_number;
+ u32 logical_byte_offset;
+ u32 end_line;
+ u32 end_logical_line;
+ u32 acpi_btype;
+ u32 aml_length;
+ u32 aml_subtree_length;
+ u32 final_aml_length;
+ u32 final_aml_offset;
+ u32 compile_flags;
+ u16 parse_opcode;
+ u8 aml_opcode_length;
+ u8 aml_pkg_len_bytes;
+ u8 extra;
+ char parse_op_name[12];
+};
-typedef union acpi_parse_obj
+union acpi_parse_object
{
- acpi_parse_obj_common common;
- acpi_parse_obj_named named;
- acpi_parse_obj_asl asl;
-
-} acpi_parse_object;
+ struct acpi_parse_obj_common common;
+ struct acpi_parse_obj_named named;
+ struct acpi_parse_obj_asl asl;
+};
/*
* Parse state - one state per parser invocation and each control
* method.
*/
-typedef struct acpi_parse_state
-{
- u32 aml_size;
- u8 *aml_start; /* first AML byte */
- u8 *aml; /* next AML byte */
- u8 *aml_end; /* (last + 1) AML byte */
- u8 *pkg_start; /* current package begin */
- u8 *pkg_end; /* current package end */
- union acpi_parse_obj *start_op; /* root of parse tree */
- struct acpi_node *start_node;
- union acpi_gen_state *scope; /* current scope */
- union acpi_parse_obj *start_scope;
-
-} acpi_parse_state;
+struct acpi_parse_state
+{
+ u32 aml_size;
+ u8 *aml_start; /* first AML byte */
+ u8 *aml; /* next AML byte */
+ u8 *aml_end; /* (last + 1) AML byte */
+ u8 *pkg_start; /* current package begin */
+ u8 *pkg_end; /* current package end */
+ union acpi_parse_object *start_op; /* root of parse tree */
+ struct acpi_namespace_node *start_node;
+ union acpi_generic_state *scope; /* current scope */
+ union acpi_parse_object *start_scope;
+};
/* Parse object flags */
@@ -728,13 +696,12 @@ typedef struct acpi_parse_state
#define PCI_ROOT_HID_STRING "PNP0A03"
-typedef struct
+struct acpi_bit_register_info
{
- u8 parent_register;
- u8 bit_position;
- u16 access_bit_mask;
-
-} acpi_bit_register_info;
+ u8 parent_register;
+ u8 bit_position;
+ u16 access_bit_mask;
+};
/*
@@ -864,11 +831,10 @@ typedef struct
#define ACPI_DEVICE_ID_LENGTH 0x09
-typedef struct
+struct acpi_device_id
{
- char buffer[ACPI_DEVICE_ID_LENGTH];
-
-} acpi_device_id;
+ char buffer[ACPI_DEVICE_ID_LENGTH];
+};
/*****************************************************************************
@@ -886,16 +852,21 @@ typedef struct
*
****************************************************************************/
-typedef struct dbmethodinfo
+struct acpi_db_method_info
{
- acpi_handle thread_gate;
- char *name;
- char **args;
- u32 flags;
- u32 num_loops;
- char pathname[128];
+ acpi_handle thread_gate;
+ char *name;
+ char **args;
+ u32 flags;
+ u32 num_loops;
+ char pathname[128];
+};
-} acpi_db_method_info;
+struct acpi_integrity_info
+{
+ u32 nodes;
+ u32 objects;
+};
#define ACPI_DB_REDIRECTABLE_OUTPUT 0x01
@@ -909,13 +880,12 @@ typedef struct dbmethodinfo
*
****************************************************************************/
-typedef struct
+struct acpi_debug_print_info
{
- u32 component_id;
- char *proc_name;
- char *module_name;
-
-} acpi_debug_print_info;
+ u32 component_id;
+ char *proc_name;
+ char *module_name;
+};
/* Entry for a memory allocation (debug only) */
@@ -925,26 +895,24 @@ typedef struct
#define ACPI_MAX_MODULE_NAME 16
#define ACPI_COMMON_DEBUG_MEM_HEADER \
- struct acpi_debug_mem_block *previous; \
- struct acpi_debug_mem_block *next; \
- u32 size; \
- u32 component; \
- u32 line; \
- char module[ACPI_MAX_MODULE_NAME]; \
- u8 alloc_type;
+ struct acpi_debug_mem_block *previous; \
+ struct acpi_debug_mem_block *next; \
+ u32 size; \
+ u32 component; \
+ u32 line; \
+ char module[ACPI_MAX_MODULE_NAME]; \
+ u8 alloc_type;
-typedef struct
+struct acpi_debug_mem_header
{
ACPI_COMMON_DEBUG_MEM_HEADER
+};
-} acpi_debug_mem_header;
-
-typedef struct acpi_debug_mem_block
+struct acpi_debug_mem_block
{
ACPI_COMMON_DEBUG_MEM_HEADER
- u64 user_space;
-
-} acpi_debug_mem_block;
+ u64 user_space;
+};
#define ACPI_MEM_LIST_GLOBAL 0
@@ -960,27 +928,26 @@ typedef struct acpi_debug_mem_block
#define ACPI_NUM_MEM_LISTS 7
-typedef struct
+struct acpi_memory_list
{
- void *list_head;
- u16 link_offset;
- u16 max_cache_depth;
- u16 cache_depth;
- u16 object_size;
+ void *list_head;
+ u16 link_offset;
+ u16 max_cache_depth;
+ u16 cache_depth;
+ u16 object_size;
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
/* Statistics for debug memory tracking only */
- u32 total_allocated;
- u32 total_freed;
- u32 current_total_size;
- u32 cache_requests;
- u32 cache_hits;
- char *list_name;
+ u32 total_allocated;
+ u32 total_freed;
+ u32 current_total_size;
+ u32 cache_requests;
+ u32 cache_hits;
+ char *list_name;
#endif
-
-} acpi_memory_list;
+};
#endif /* __ACLOCAL_H__ */
diff --git a/drivers/acpi/include/acmacros.h b/drivers/acpi/include/acmacros.h
index 52d78fe31c09..4d7a45733589 100644
--- a/drivers/acpi/include/acmacros.h
+++ b/drivers/acpi/include/acmacros.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -67,7 +67,7 @@
* Full 64-bit address/integer on both 32-bit and 64-bit platforms
*/
#define ACPI_LODWORD(l) ((u32)(u64)(l))
-#define ACPI_HIDWORD(l) ((u32)(((*(uint64_struct *)(void *)(&l))).hi))
+#define ACPI_HIDWORD(l) ((u32)(((*(struct uint64_struct *)(void *)(&l))).hi))
#define ACPI_GET_ADDRESS(a) (a)
#define ACPI_STORE_ADDRESS(a,b) ((a)=(acpi_physical_address)(b))
@@ -249,19 +249,19 @@
#define ACPI_REGISTER_INSERT_VALUE(reg, pos, mask, val) reg = (reg & (~(mask))) | ACPI_REGISTER_PREPARE_BITS(val, pos, mask)
/*
- * An acpi_namespace_node * can appear in some contexts,
- * where a pointer to an acpi_operand_object can also
+ * An struct acpi_namespace_node * can appear in some contexts,
+ * where a pointer to an union acpi_operand_object can also
* appear. This macro is used to distinguish them.
*
* The "Descriptor" field is the first field in both structures.
*/
-#define ACPI_GET_DESCRIPTOR_TYPE(d) (((acpi_descriptor *)(void *)(d))->descriptor_id)
-#define ACPI_SET_DESCRIPTOR_TYPE(d,t) (((acpi_descriptor *)(void *)(d))->descriptor_id = t)
+#define ACPI_GET_DESCRIPTOR_TYPE(d) (((union acpi_descriptor *)(void *)(d))->descriptor_id)
+#define ACPI_SET_DESCRIPTOR_TYPE(d,t) (((union acpi_descriptor *)(void *)(d))->descriptor_id = t)
/* Macro to test the object type */
-#define ACPI_GET_OBJECT_TYPE(d) (((acpi_operand_object *)(void *)(d))->common.type)
+#define ACPI_GET_OBJECT_TYPE(d) (((union acpi_operand_object *)(void *)(d))->common.type)
/* Macro to check the table flags for SINGLE or MULTIPLE tables are allowed */
@@ -389,7 +389,7 @@
* as a local string ("_proc_name) so that it can be also used by the function exit macros below.
*/
-#define ACPI_FUNCTION_NAME(a) acpi_debug_print_info _dbg; \
+#define ACPI_FUNCTION_NAME(a) struct acpi_debug_print_info _dbg; \
_dbg.component_id = _COMPONENT; \
_dbg.proc_name = a; \
_dbg.module_name = _THIS_MODULE;
diff --git a/drivers/acpi/include/acnamesp.h b/drivers/acpi/include/acnamesp.h
index 64de3dbb9776..af362fbac444 100644
--- a/drivers/acpi/include/acnamesp.h
+++ b/drivers/acpi/include/acnamesp.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -78,60 +78,60 @@ acpi_ns_initialize_devices (
acpi_status
acpi_ns_init_one_device (
- acpi_handle obj_handle,
- u32 nesting_level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 nesting_level,
+ void *context,
+ void **return_value);
acpi_status
acpi_ns_init_one_object (
- acpi_handle obj_handle,
- u32 level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 level,
+ void *context,
+ void **return_value);
acpi_status
acpi_ns_walk_namespace (
- acpi_object_type type,
- acpi_handle start_object,
- u32 max_depth,
- u8 unlock_before_callback,
- acpi_walk_callback user_function,
- void *context,
- void **return_value);
-
-acpi_namespace_node *
+ acpi_object_type type,
+ acpi_handle start_object,
+ u32 max_depth,
+ u8 unlock_before_callback,
+ acpi_walk_callback user_function,
+ void *context,
+ void **return_value);
+
+struct acpi_namespace_node *
acpi_ns_get_next_node (
- acpi_object_type type,
- acpi_namespace_node *parent,
- acpi_namespace_node *child);
+ acpi_object_type type,
+ struct acpi_namespace_node *parent,
+ struct acpi_namespace_node *child);
void
acpi_ns_delete_namespace_by_owner (
- u16 table_id);
+ u16 table_id);
/* Namespace loading - nsload */
acpi_status
acpi_ns_one_complete_parse (
- u32 pass_number,
- acpi_table_desc *table_desc);
+ u32 pass_number,
+ struct acpi_table_desc *table_desc);
acpi_status
acpi_ns_parse_table (
- acpi_table_desc *table_desc,
- acpi_namespace_node *scope);
+ struct acpi_table_desc *table_desc,
+ struct acpi_namespace_node *scope);
acpi_status
acpi_ns_load_table (
- acpi_table_desc *table_desc,
- acpi_namespace_node *node);
+ struct acpi_table_desc *table_desc,
+ struct acpi_namespace_node *node);
acpi_status
acpi_ns_load_table_by_type (
- acpi_table_type table_type);
+ acpi_table_type table_type);
/*
@@ -144,43 +144,43 @@ acpi_ns_root_initialize (
acpi_status
acpi_ns_lookup (
- acpi_generic_state *scope_info,
- char *name,
- acpi_object_type type,
- acpi_interpreter_mode interpreter_mode,
- u32 flags,
- acpi_walk_state *walk_state,
- acpi_namespace_node **ret_node);
+ union acpi_generic_state *scope_info,
+ char *name,
+ acpi_object_type type,
+ acpi_interpreter_mode interpreter_mode,
+ u32 flags,
+ struct acpi_walk_state *walk_state,
+ struct acpi_namespace_node **ret_node);
/*
* Named object allocation/deallocation - nsalloc
*/
-acpi_namespace_node *
+struct acpi_namespace_node *
acpi_ns_create_node (
- u32 name);
+ u32 name);
void
acpi_ns_delete_node (
- acpi_namespace_node *node);
+ struct acpi_namespace_node *node);
void
acpi_ns_delete_namespace_subtree (
- acpi_namespace_node *parent_handle);
+ struct acpi_namespace_node *parent_handle);
void
acpi_ns_detach_object (
- acpi_namespace_node *node);
+ struct acpi_namespace_node *node);
void
acpi_ns_delete_children (
- acpi_namespace_node *parent);
+ struct acpi_namespace_node *parent);
int
acpi_ns_compare_names (
- char *name1,
- char *name2);
+ char *name1,
+ char *name2);
/*
* Namespace modification - nsmodify
@@ -188,11 +188,11 @@ acpi_ns_compare_names (
acpi_status
acpi_ns_unload_namespace (
- acpi_handle handle);
+ acpi_handle handle);
acpi_status
acpi_ns_delete_subtree (
- acpi_handle start_handle);
+ acpi_handle start_handle);
/*
@@ -201,32 +201,32 @@ acpi_ns_delete_subtree (
void
acpi_ns_dump_tables (
- acpi_handle search_base,
- u32 max_depth);
+ acpi_handle search_base,
+ u32 max_depth);
void
acpi_ns_dump_entry (
- acpi_handle handle,
- u32 debug_level);
+ acpi_handle handle,
+ u32 debug_level);
void
acpi_ns_dump_pathname (
- acpi_handle handle,
- char *msg,
- u32 level,
- u32 component);
+ acpi_handle handle,
+ char *msg,
+ u32 level,
+ u32 component);
void
acpi_ns_print_pathname (
- u32 num_segments,
- char *pathname);
+ u32 num_segments,
+ char *pathname);
acpi_status
acpi_ns_dump_one_device (
- acpi_handle obj_handle,
- u32 level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 level,
+ void *context,
+ void **return_value);
void
acpi_ns_dump_root_devices (
@@ -234,18 +234,18 @@ acpi_ns_dump_root_devices (
acpi_status
acpi_ns_dump_one_object (
- acpi_handle obj_handle,
- u32 level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 level,
+ void *context,
+ void **return_value);
void
acpi_ns_dump_objects (
- acpi_object_type type,
- u8 display_type,
- u32 max_depth,
- u32 ownder_id,
- acpi_handle start_handle);
+ acpi_object_type type,
+ u8 display_type,
+ u32 max_depth,
+ u32 ownder_id,
+ acpi_handle start_handle);
/*
@@ -254,33 +254,33 @@ acpi_ns_dump_objects (
acpi_status
acpi_ns_evaluate_by_handle (
- acpi_namespace_node *prefix_node,
- acpi_operand_object **params,
- acpi_operand_object **return_object);
+ struct acpi_namespace_node *prefix_node,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_object);
acpi_status
acpi_ns_evaluate_by_name (
- char *pathname,
- acpi_operand_object **params,
- acpi_operand_object **return_object);
+ char *pathname,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_object);
acpi_status
acpi_ns_evaluate_relative (
- acpi_namespace_node *prefix_node,
- char *pathname,
- acpi_operand_object **params,
- acpi_operand_object **return_object);
+ struct acpi_namespace_node *prefix_node,
+ char *pathname,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_object);
acpi_status
acpi_ns_execute_control_method (
- acpi_namespace_node *method_node,
- acpi_operand_object **params,
- acpi_operand_object **return_obj_desc);
+ struct acpi_namespace_node *method_node,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_obj_desc);
acpi_status
acpi_ns_get_object_value (
- acpi_namespace_node *object_node,
- acpi_operand_object **return_obj_desc);
+ struct acpi_namespace_node *object_node,
+ union acpi_operand_object **return_obj_desc);
/*
@@ -289,7 +289,7 @@ acpi_ns_get_object_value (
acpi_name
acpi_ns_find_parent_name (
- acpi_namespace_node *node_to_search);
+ struct acpi_namespace_node *node_to_search);
/*
@@ -298,42 +298,42 @@ acpi_ns_find_parent_name (
u32
acpi_ns_opens_scope (
- acpi_object_type type);
+ acpi_object_type type);
void
acpi_ns_build_external_path (
- acpi_namespace_node *node,
- acpi_size size,
- char *name_buffer);
+ struct acpi_namespace_node *node,
+ acpi_size size,
+ char *name_buffer);
char *
acpi_ns_get_external_pathname (
- acpi_namespace_node *node);
+ struct acpi_namespace_node *node);
char *
acpi_ns_name_of_current_scope (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ns_handle_to_pathname (
- acpi_handle target_handle,
- acpi_buffer *buffer);
+ acpi_handle target_handle,
+ struct acpi_buffer *buffer);
u8
acpi_ns_pattern_match (
- acpi_namespace_node *obj_node,
- char *search_for);
+ struct acpi_namespace_node *obj_node,
+ char *search_for);
acpi_status
acpi_ns_get_node_by_path (
- char *external_pathname,
- acpi_namespace_node *in_prefix_node,
- u32 flags,
- acpi_namespace_node **out_node);
+ char *external_pathname,
+ struct acpi_namespace_node *in_prefix_node,
+ u32 flags,
+ struct acpi_namespace_node **out_node);
acpi_size
acpi_ns_get_pathname_length (
- acpi_namespace_node *node);
+ struct acpi_namespace_node *node);
/*
@@ -342,34 +342,34 @@ acpi_ns_get_pathname_length (
acpi_status
acpi_ns_attach_object (
- acpi_namespace_node *node,
- acpi_operand_object *object,
- acpi_object_type type);
+ struct acpi_namespace_node *node,
+ union acpi_operand_object *object,
+ acpi_object_type type);
-acpi_operand_object *
+union acpi_operand_object *
acpi_ns_get_attached_object (
- acpi_namespace_node *node);
+ struct acpi_namespace_node *node);
-acpi_operand_object *
+union acpi_operand_object *
acpi_ns_get_secondary_object (
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
acpi_status
acpi_ns_attach_data (
- acpi_namespace_node *node,
- acpi_object_handler handler,
- void *data);
+ struct acpi_namespace_node *node,
+ acpi_object_handler handler,
+ void *data);
acpi_status
acpi_ns_detach_data (
- acpi_namespace_node *node,
- acpi_object_handler handler);
+ struct acpi_namespace_node *node,
+ acpi_object_handler handler);
acpi_status
acpi_ns_get_attached_data (
- acpi_namespace_node *node,
- acpi_object_handler handler,
- void **data);
+ struct acpi_namespace_node *node,
+ acpi_object_handler handler,
+ void **data);
/*
@@ -378,27 +378,27 @@ acpi_ns_get_attached_data (
acpi_status
acpi_ns_search_and_enter (
- u32 entry_name,
- acpi_walk_state *walk_state,
- acpi_namespace_node *node,
- acpi_interpreter_mode interpreter_mode,
- acpi_object_type type,
- u32 flags,
- acpi_namespace_node **ret_node);
+ u32 entry_name,
+ struct acpi_walk_state *walk_state,
+ struct acpi_namespace_node *node,
+ acpi_interpreter_mode interpreter_mode,
+ acpi_object_type type,
+ u32 flags,
+ struct acpi_namespace_node **ret_node);
acpi_status
acpi_ns_search_node (
- u32 entry_name,
- acpi_namespace_node *node,
- acpi_object_type type,
- acpi_namespace_node **ret_node);
+ u32 entry_name,
+ struct acpi_namespace_node *node,
+ acpi_object_type type,
+ struct acpi_namespace_node **ret_node);
void
acpi_ns_install_node (
- acpi_walk_state *walk_state,
- acpi_namespace_node *parent_node,
- acpi_namespace_node *node,
- acpi_object_type type);
+ struct acpi_walk_state *walk_state,
+ struct acpi_namespace_node *parent_node,
+ struct acpi_namespace_node *node,
+ acpi_object_type type);
/*
@@ -407,83 +407,83 @@ acpi_ns_install_node (
u8
acpi_ns_valid_root_prefix (
- char prefix);
+ char prefix);
u8
acpi_ns_valid_path_separator (
- char sep);
+ char sep);
acpi_object_type
acpi_ns_get_type (
- acpi_namespace_node *node);
+ struct acpi_namespace_node *node);
u32
acpi_ns_local (
- acpi_object_type type);
+ acpi_object_type type);
void
acpi_ns_report_error (
- char *module_name,
- u32 line_number,
- u32 component_id,
- char *internal_name,
- acpi_status lookup_status);
+ char *module_name,
+ u32 line_number,
+ u32 component_id,
+ char *internal_name,
+ acpi_status lookup_status);
void
acpi_ns_report_method_error (
- char *module_name,
- u32 line_number,
- u32 component_id,
- char *message,
- acpi_namespace_node *node,
- char *path,
- acpi_status lookup_status);
+ char *module_name,
+ u32 line_number,
+ u32 component_id,
+ char *message,
+ struct acpi_namespace_node *node,
+ char *path,
+ acpi_status lookup_status);
void
acpi_ns_print_node_pathname (
- acpi_namespace_node *node,
- char *msg);
+ struct acpi_namespace_node *node,
+ char *msg);
acpi_status
acpi_ns_build_internal_name (
- acpi_namestring_info *info);
+ struct acpi_namestring_info *info);
void
acpi_ns_get_internal_name_length (
- acpi_namestring_info *info);
+ struct acpi_namestring_info *info);
acpi_status
acpi_ns_internalize_name (
- char *dotted_name,
- char **converted_name);
+ char *dotted_name,
+ char **converted_name);
acpi_status
acpi_ns_externalize_name (
- u32 internal_name_length,
- char *internal_name,
- u32 *converted_name_length,
- char **converted_name);
+ u32 internal_name_length,
+ char *internal_name,
+ u32 *converted_name_length,
+ char **converted_name);
-acpi_namespace_node *
+struct acpi_namespace_node *
acpi_ns_map_handle_to_node (
- acpi_handle handle);
+ acpi_handle handle);
acpi_handle
acpi_ns_convert_entry_to_handle(
- acpi_namespace_node *node);
+ struct acpi_namespace_node *node);
void
acpi_ns_terminate (
void);
-acpi_namespace_node *
+struct acpi_namespace_node *
acpi_ns_get_parent_node (
- acpi_namespace_node *node);
+ struct acpi_namespace_node *node);
-acpi_namespace_node *
+struct acpi_namespace_node *
acpi_ns_get_next_valid_node (
- acpi_namespace_node *node);
+ struct acpi_namespace_node *node);
#endif /* __ACNAMESP_H__ */
diff --git a/drivers/acpi/include/acobject.h b/drivers/acpi/include/acobject.h
index 16dad1171b1d..72d3ca520ab9 100644
--- a/drivers/acpi/include/acobject.h
+++ b/drivers/acpi/include/acobject.h
@@ -1,12 +1,12 @@
/******************************************************************************
*
- * Name: acobject.h - Definition of acpi_operand_object (Internal object only)
+ * Name: acobject.h - Definition of union acpi_operand_object (Internal object only)
*
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@
/*
- * The acpi_operand_object is used to pass AML operands from the dispatcher
+ * The union acpi_operand_object is used to pass AML operands from the dispatcher
* to the interpreter, and to keep track of the various handlers such as
* address space handlers and notify handlers. The object is a constant
* size in order to allow it to be cached and reused.
@@ -46,12 +46,12 @@
* data_type is used to differentiate between internal descriptors, and MUST
* be the first byte in this structure.
*/
-#define ACPI_OBJECT_COMMON_HEADER /* SIZE/ALIGNMENT: 32 bits, one ptr plus trailing 8-bit flag */\
- u8 descriptor; /* To differentiate various internal objs */\
- u8 type; /* acpi_object_type */\
- u16 reference_count; /* For object deletion management */\
- union acpi_operand_obj *next_object; /* Objects linked to parent NS node */\
- u8 flags; \
+#define ACPI_OBJECT_COMMON_HEADER /* SIZE/ALIGNMENT: 32 bits, one ptr plus trailing 8-bit flag */\
+ u8 descriptor; /* To differentiate various internal objs */\
+ u8 type; /* acpi_object_type */\
+ u16 reference_count; /* For object deletion management */\
+ union acpi_operand_object *next_object; /* Objects linked to parent NS node */\
+ u8 flags; \
/* Values for flag byte above */
@@ -68,34 +68,34 @@
* "Field Datum" -- a datum from the actual field object
* "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field
*/
-#define ACPI_COMMON_FIELD_INFO /* SIZE/ALIGNMENT: 24 bits + three 32-bit values */\
- u8 field_flags; /* Access, update, and lock bits */\
- u8 attribute; /* From access_as keyword */\
- u8 access_byte_width; /* Read/Write size in bytes */\
- u32 bit_length; /* Length of field in bits */\
- u32 base_byte_offset; /* Byte offset within containing object */\
- u8 start_field_bit_offset;/* Bit offset within first field datum (0-63) */\
- u8 datum_valid_bits; /* Valid bit in first "Field datum" */\
- u8 end_field_valid_bits; /* Valid bits in the last "field datum" */\
- u8 end_buffer_valid_bits; /* Valid bits in the last "buffer datum" */\
- u32 value; /* Value to store into the Bank or Index register */\
- acpi_namespace_node *node; /* Link back to parent node */
+#define ACPI_COMMON_FIELD_INFO /* SIZE/ALIGNMENT: 24 bits + three 32-bit values */\
+ u8 field_flags; /* Access, update, and lock bits */\
+ u8 attribute; /* From access_as keyword */\
+ u8 access_byte_width; /* Read/Write size in bytes */\
+ u32 bit_length; /* Length of field in bits */\
+ u32 base_byte_offset; /* Byte offset within containing object */\
+ u8 start_field_bit_offset;/* Bit offset within first field datum (0-63) */\
+ u8 datum_valid_bits; /* Valid bit in first "Field datum" */\
+ u8 end_field_valid_bits; /* Valid bits in the last "field datum" */\
+ u8 end_buffer_valid_bits; /* Valid bits in the last "buffer datum" */\
+ u32 value; /* Value to store into the Bank or Index register */\
+ struct acpi_namespace_node *node; /* Link back to parent node */
/*
* Fields common to both Strings and Buffers
*/
#define ACPI_COMMON_BUFFER_INFO \
- u32 length;
+ u32 length;
/*
* Common fields for objects that support ASL notifications
*/
#define ACPI_COMMON_NOTIFY_INFO \
- union acpi_operand_obj *sys_handler; /* Handler for system notifies */\
- union acpi_operand_obj *drv_handler; /* Handler for driver notifies */\
- union acpi_operand_obj *addr_handler; /* Handler for Address space */
+ union acpi_operand_object *sys_handler; /* Handler for system notifies */\
+ union acpi_operand_object *drv_handler; /* Handler for driver notifies */\
+ union acpi_operand_object *addr_handler; /* Handler for Address space */
/******************************************************************************
@@ -104,54 +104,48 @@
*
*****************************************************************************/
-typedef struct acpi_object_common
+struct acpi_object_common
{
ACPI_OBJECT_COMMON_HEADER
+};
-} acpi_object_common;
-
-typedef struct acpi_object_integer
+struct acpi_object_integer
{
ACPI_OBJECT_COMMON_HEADER
+ acpi_integer value;
+};
- acpi_integer value;
-
-} acpi_object_integer;
-
-typedef struct acpi_object_string /* Null terminated, ASCII characters only */
+struct acpi_object_string /* Null terminated, ASCII characters only */
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_BUFFER_INFO
- char *pointer; /* String in AML stream or allocated string */
-
-} acpi_object_string;
+ char *pointer; /* String in AML stream or allocated string */
+};
-typedef struct acpi_object_buffer
+struct acpi_object_buffer
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_BUFFER_INFO
- u8 *pointer; /* Buffer in AML stream or allocated buffer */
- acpi_namespace_node *node; /* Link back to parent node */
- u8 *aml_start;
- u32 aml_length;
+ u8 *pointer; /* Buffer in AML stream or allocated buffer */
+ struct acpi_namespace_node *node; /* Link back to parent node */
+ u8 *aml_start;
+ u32 aml_length;
+};
-} acpi_object_buffer;
-
-typedef struct acpi_object_package
+struct acpi_object_package
{
ACPI_OBJECT_COMMON_HEADER
- u32 count; /* # of elements in package */
- u32 aml_length;
- u8 *aml_start;
- acpi_namespace_node *node; /* Link back to parent node */
- union acpi_operand_obj **elements; /* Array of pointers to acpi_objects */
-
-} acpi_object_package;
+ u32 count; /* # of elements in package */
+ u32 aml_length;
+ u8 *aml_start;
+ struct acpi_namespace_node *node; /* Link back to parent node */
+ union acpi_operand_object **elements; /* Array of pointers to acpi_objects */
+};
/******************************************************************************
@@ -160,62 +154,53 @@ typedef struct acpi_object_package
*
*****************************************************************************/
-typedef struct acpi_object_event
+struct acpi_object_event
{
ACPI_OBJECT_COMMON_HEADER
- void *semaphore;
-
-} acpi_object_event;
+ void *semaphore;
+};
#define INFINITE_CONCURRENCY 0xFF
-typedef struct acpi_object_method
+struct acpi_object_method
{
ACPI_OBJECT_COMMON_HEADER
- u8 method_flags;
- u8 param_count;
-
- u32 aml_length;
-
- void *semaphore;
- u8 *aml_start;
-
- u8 concurrency;
- u8 thread_count;
- acpi_owner_id owning_id;
-
-} acpi_object_method;
-
-
-typedef struct acpi_object_mutex
+ u8 method_flags;
+ u8 param_count;
+ u32 aml_length;
+ void *semaphore;
+ u8 *aml_start;
+ u8 concurrency;
+ u8 thread_count;
+ acpi_owner_id owning_id;
+};
+
+
+struct acpi_object_mutex
{
ACPI_OBJECT_COMMON_HEADER
- u16 sync_level;
- u16 acquisition_depth;
+ u16 sync_level;
+ u16 acquisition_depth;
+ struct acpi_thread_state *owner_thread;
+ void *semaphore;
+ union acpi_operand_object *prev; /* Link for list of acquired mutexes */
+ union acpi_operand_object *next; /* Link for list of acquired mutexes */
+ struct acpi_namespace_node *node; /* containing object */
+};
- struct acpi_thread_state *owner_thread;
- void *semaphore;
- union acpi_operand_obj *prev; /* Link for list of acquired mutexes */
- union acpi_operand_obj *next; /* Link for list of acquired mutexes */
- acpi_namespace_node *node; /* containing object */
-} acpi_object_mutex;
-
-
-typedef struct acpi_object_region
+struct acpi_object_region
{
ACPI_OBJECT_COMMON_HEADER
- u8 space_id;
-
- union acpi_operand_obj *addr_handler; /* Handler for system notifies */
- acpi_namespace_node *node; /* containing object */
- union acpi_operand_obj *next;
- u32 length;
- acpi_physical_address address;
-
-} acpi_object_region;
+ u8 space_id;
+ union acpi_operand_object *addr_handler; /* Handler for system notifies */
+ struct acpi_namespace_node *node; /* containing object */
+ union acpi_operand_object *next;
+ u32 length;
+ acpi_physical_address address;
+};
/******************************************************************************
@@ -224,52 +209,44 @@ typedef struct acpi_object_region
*
*****************************************************************************/
-typedef struct acpi_object_notify_common /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
+struct acpi_object_notify_common /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_NOTIFY_INFO
+};
-} acpi_object_notify_common;
-
-typedef struct acpi_object_device
+struct acpi_object_device
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_NOTIFY_INFO
-
-} acpi_object_device;
+};
-typedef struct acpi_object_power_resource
+struct acpi_object_power_resource
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_NOTIFY_INFO
+ u32 system_level;
+ u32 resource_order;
+};
- u32 system_level;
- u32 resource_order;
-
-} acpi_object_power_resource;
-
-typedef struct acpi_object_processor
+struct acpi_object_processor
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_NOTIFY_INFO
-
- u32 proc_id;
- u32 length;
- acpi_io_address address;
-
-} acpi_object_processor;
+ u32 proc_id;
+ u32 length;
+ acpi_io_address address;
+};
-typedef struct acpi_object_thermal_zone
+struct acpi_object_thermal_zone
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_NOTIFY_INFO
-
-
-} acpi_object_thermal_zone;
+};
/******************************************************************************
@@ -278,36 +255,33 @@ typedef struct acpi_object_thermal_zone
*
*****************************************************************************/
-typedef struct acpi_object_field_common /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
+struct acpi_object_field_common /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_FIELD_INFO
- union acpi_operand_obj *region_obj; /* Containing Operation Region object */
- /* (REGION/BANK fields only) */
-} acpi_object_field_common;
+ union acpi_operand_object *region_obj; /* Containing Operation Region object */
+ /* (REGION/BANK fields only) */
+};
-typedef struct acpi_object_region_field
+struct acpi_object_region_field
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_FIELD_INFO
- union acpi_operand_obj *region_obj; /* Containing op_region object */
-
-} acpi_object_region_field;
+ union acpi_operand_object *region_obj; /* Containing op_region object */
+};
-typedef struct acpi_object_bank_field
+struct acpi_object_bank_field
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_FIELD_INFO
+ union acpi_operand_object *region_obj; /* Containing op_region object */
+ union acpi_operand_object *bank_obj; /* bank_select Register object */
+};
- union acpi_operand_obj *region_obj; /* Containing op_region object */
- union acpi_operand_obj *bank_obj; /* bank_select Register object */
-} acpi_object_bank_field;
-
-
-typedef struct acpi_object_index_field
+struct acpi_object_index_field
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_FIELD_INFO
@@ -316,23 +290,19 @@ typedef struct acpi_object_index_field
* No "region_obj" pointer needed since the Index and Data registers
* are each field definitions unto themselves.
*/
- union acpi_operand_obj *index_obj; /* Index register */
- union acpi_operand_obj *data_obj; /* Data register */
-
-
-} acpi_object_index_field;
+ union acpi_operand_object *index_obj; /* Index register */
+ union acpi_operand_object *data_obj; /* Data register */
+};
/* The buffer_field is different in that it is part of a Buffer, not an op_region */
-typedef struct acpi_object_buffer_field
+struct acpi_object_buffer_field
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_FIELD_INFO
-
- union acpi_operand_obj *buffer_obj; /* Containing Buffer object */
-
-} acpi_object_buffer_field;
+ union acpi_operand_object *buffer_obj; /* Containing Buffer object */
+};
/******************************************************************************
@@ -341,15 +311,13 @@ typedef struct acpi_object_buffer_field
*
*****************************************************************************/
-typedef struct acpi_object_notify_handler
+struct acpi_object_notify_handler
{
ACPI_OBJECT_COMMON_HEADER
-
- acpi_namespace_node *node; /* Parent device */
- acpi_notify_handler handler;
- void *context;
-
-} acpi_object_notify_handler;
+ struct acpi_namespace_node *node; /* Parent device */
+ acpi_notify_handler handler;
+ void *context;
+};
/* Flags for address handler */
@@ -357,21 +325,18 @@ typedef struct acpi_object_notify_handler
#define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED 0x1
-typedef struct acpi_object_addr_handler
+struct acpi_object_addr_handler
{
ACPI_OBJECT_COMMON_HEADER
-
- u8 space_id;
- u16 hflags;
- acpi_adr_space_handler handler;
-
- acpi_namespace_node *node; /* Parent device */
- void *context;
- acpi_adr_space_setup setup;
- union acpi_operand_obj *region_list; /* regions using this handler */
- union acpi_operand_obj *next;
-
-} acpi_object_addr_handler;
+ u8 space_id;
+ u16 hflags;
+ acpi_adr_space_handler handler;
+ struct acpi_namespace_node *node; /* Parent device */
+ void *context;
+ acpi_adr_space_setup setup;
+ union acpi_operand_object *region_list; /* regions using this handler */
+ union acpi_operand_object *next;
+};
/******************************************************************************
@@ -384,19 +349,16 @@ typedef struct acpi_object_addr_handler
* The Reference object type is used for these opcodes:
* Arg[0-6], Local[0-7], index_op, name_op, zero_op, one_op, ones_op, debug_op
*/
-typedef struct acpi_object_reference
+struct acpi_object_reference
{
ACPI_OBJECT_COMMON_HEADER
-
- u8 target_type; /* Used for index_op */
- u16 opcode;
- u32 offset; /* Used for arg_op, local_op, and index_op */
-
- void *object; /* name_op=>HANDLE to obj, index_op=>acpi_operand_object */
- acpi_namespace_node *node;
- union acpi_operand_obj **where;
-
-} acpi_object_reference;
+ u8 target_type; /* Used for index_op */
+ u16 opcode;
+ u32 offset; /* Used for arg_op, local_op, and index_op */
+ void *object; /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object */
+ struct acpi_namespace_node *node;
+ union acpi_operand_object **where;
+};
/*
@@ -406,93 +368,83 @@ typedef struct acpi_object_reference
*
* Currently: Region and field_unit types
*/
-typedef struct acpi_object_extra
+struct acpi_object_extra
{
ACPI_OBJECT_COMMON_HEADER
- u8 byte_fill1;
- u16 word_fill1;
- u32 aml_length;
- u8 *aml_start;
- acpi_namespace_node *method_REG; /* _REG method for this region (if any) */
- void *region_context; /* Region-specific data */
-
-} acpi_object_extra;
+ u8 byte_fill1;
+ u16 word_fill1;
+ u32 aml_length;
+ u8 *aml_start;
+ struct acpi_namespace_node *method_REG; /* _REG method for this region (if any) */
+ void *region_context; /* Region-specific data */
+};
/* Additional data that can be attached to namespace nodes */
-typedef struct acpi_object_data
+struct acpi_object_data
{
ACPI_OBJECT_COMMON_HEADER
- acpi_object_handler handler;
- void *pointer;
-
-} acpi_object_data;
+ acpi_object_handler handler;
+ void *pointer;
+};
/* Structure used when objects are cached for reuse */
-typedef struct acpi_object_cache_list
+struct acpi_object_cache_list
{
ACPI_OBJECT_COMMON_HEADER
- union acpi_operand_obj *next; /* Link for object cache and internal lists*/
-
-} acpi_object_cache_list;
+ union acpi_operand_object *next; /* Link for object cache and internal lists*/
+};
/******************************************************************************
*
- * acpi_operand_object Descriptor - a giant union of all of the above
+ * union acpi_operand_object Descriptor - a giant union of all of the above
*
*****************************************************************************/
-typedef union acpi_operand_obj
+union acpi_operand_object
{
- acpi_object_common common;
-
- acpi_object_integer integer;
- acpi_object_string string;
- acpi_object_buffer buffer;
- acpi_object_package package;
-
- acpi_object_event event;
- acpi_object_method method;
- acpi_object_mutex mutex;
- acpi_object_region region;
-
- acpi_object_notify_common common_notify;
- acpi_object_device device;
- acpi_object_power_resource power_resource;
- acpi_object_processor processor;
- acpi_object_thermal_zone thermal_zone;
-
- acpi_object_field_common common_field;
- acpi_object_region_field field;
- acpi_object_buffer_field buffer_field;
- acpi_object_bank_field bank_field;
- acpi_object_index_field index_field;
-
- acpi_object_notify_handler notify_handler;
- acpi_object_addr_handler addr_handler;
-
- acpi_object_reference reference;
- acpi_object_extra extra;
- acpi_object_data data;
- acpi_object_cache_list cache;
-
-} acpi_operand_object;
+ struct acpi_object_common common;
+ struct acpi_object_integer integer;
+ struct acpi_object_string string;
+ struct acpi_object_buffer buffer;
+ struct acpi_object_package package;
+ struct acpi_object_event event;
+ struct acpi_object_method method;
+ struct acpi_object_mutex mutex;
+ struct acpi_object_region region;
+ struct acpi_object_notify_common common_notify;
+ struct acpi_object_device device;
+ struct acpi_object_power_resource power_resource;
+ struct acpi_object_processor processor;
+ struct acpi_object_thermal_zone thermal_zone;
+ struct acpi_object_field_common common_field;
+ struct acpi_object_region_field field;
+ struct acpi_object_buffer_field buffer_field;
+ struct acpi_object_bank_field bank_field;
+ struct acpi_object_index_field index_field;
+ struct acpi_object_notify_handler notify_handler;
+ struct acpi_object_addr_handler addr_handler;
+ struct acpi_object_reference reference;
+ struct acpi_object_extra extra;
+ struct acpi_object_data data;
+ struct acpi_object_cache_list cache;
+};
/******************************************************************************
*
- * acpi_descriptor - objects that share a common descriptor identifier
+ * union acpi_descriptor - objects that share a common descriptor identifier
*
*****************************************************************************/
/* Object descriptor types */
-#define ACPI_DESC_TYPE_CACHED 0x11 /* Used only when object is cached */
+#define ACPI_DESC_TYPE_CACHED 0x11 /* Used only when object is cached */
#define ACPI_DESC_TYPE_STATE 0x20
#define ACPI_DESC_TYPE_STATE_UPDATE 0x21
#define ACPI_DESC_TYPE_STATE_PACKAGE 0x22
@@ -509,14 +461,13 @@ typedef union acpi_operand_obj
#define ACPI_DESC_TYPE_NAMED 0xAA
-typedef union acpi_desc
+union acpi_descriptor
{
- u8 descriptor_id; /* To differentiate various internal objs */\
- acpi_operand_object object;
- acpi_namespace_node node;
- acpi_parse_object op;
-
-} acpi_descriptor;
+ u8 descriptor_id; /* To differentiate various internal objs */\
+ union acpi_operand_object object;
+ struct acpi_namespace_node node;
+ union acpi_parse_object op;
+};
#endif /* _ACOBJECT_H */
diff --git a/drivers/acpi/include/acoutput.h b/drivers/acpi/include/acoutput.h
index 6a88c061d38a..1fceaeb259e1 100644
--- a/drivers/acpi/include/acoutput.h
+++ b/drivers/acpi/include/acoutput.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/drivers/acpi/include/acparser.h b/drivers/acpi/include/acparser.h
index d35af8818255..4c91fd4c54fd 100644
--- a/drivers/acpi/include/acparser.h
+++ b/drivers/acpi/include/acparser.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -49,14 +49,14 @@
acpi_status
acpi_psx_load_table (
- u8 *pcode_addr,
- u32 pcode_length);
+ u8 *pcode_addr,
+ u32 pcode_length);
acpi_status
acpi_psx_execute (
- acpi_namespace_node *method_node,
- acpi_operand_object **params,
- acpi_operand_object **return_obj_desc);
+ struct acpi_namespace_node *method_node,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_obj_desc);
/******************************************************************************
@@ -70,110 +70,110 @@ acpi_psx_execute (
u8 *
acpi_ps_get_next_package_end (
- acpi_parse_state *parser_state);
+ struct acpi_parse_state *parser_state);
u32
acpi_ps_get_next_package_length (
- acpi_parse_state *parser_state);
+ struct acpi_parse_state *parser_state);
char *
acpi_ps_get_next_namestring (
- acpi_parse_state *parser_state);
+ struct acpi_parse_state *parser_state);
void
acpi_ps_get_next_simple_arg (
- acpi_parse_state *parser_state,
- u32 arg_type,
- acpi_parse_object *arg);
+ struct acpi_parse_state *parser_state,
+ u32 arg_type,
+ union acpi_parse_object *arg);
acpi_status
acpi_ps_get_next_namepath (
- acpi_walk_state *walk_state,
- acpi_parse_state *parser_state,
- acpi_parse_object *arg,
- u8 method_call);
+ struct acpi_walk_state *walk_state,
+ struct acpi_parse_state *parser_state,
+ union acpi_parse_object *arg,
+ u8 method_call);
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_get_next_field (
- acpi_parse_state *parser_state);
+ struct acpi_parse_state *parser_state);
acpi_status
acpi_ps_get_next_arg (
- acpi_walk_state *walk_state,
- acpi_parse_state *parser_state,
- u32 arg_type,
- acpi_parse_object **return_arg);
+ struct acpi_walk_state *walk_state,
+ struct acpi_parse_state *parser_state,
+ u32 arg_type,
+ union acpi_parse_object **return_arg);
/* psfind */
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_find_name (
- acpi_parse_object *scope,
- u32 name,
- u32 opcode);
+ union acpi_parse_object *scope,
+ u32 name,
+ u32 opcode);
-acpi_parse_object*
+union acpi_parse_object*
acpi_ps_get_parent (
- acpi_parse_object *op);
+ union acpi_parse_object *op);
/* psopcode - AML Opcode information */
-const acpi_opcode_info *
+const struct acpi_opcode_info *
acpi_ps_get_opcode_info (
- u16 opcode);
+ u16 opcode);
char *
acpi_ps_get_opcode_name (
- u16 opcode);
+ u16 opcode);
/* psparse - top level parsing routines */
u32
acpi_ps_get_opcode_size (
- u32 opcode);
+ u32 opcode);
void
acpi_ps_complete_this_op (
- acpi_walk_state *walk_state,
- acpi_parse_object *op);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op);
acpi_status
acpi_ps_next_parse_state (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- acpi_status callback_status);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ acpi_status callback_status);
acpi_status
acpi_ps_find_object (
- acpi_walk_state *walk_state,
- acpi_parse_object **out_op);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object **out_op);
void
acpi_ps_delete_parse_tree (
- acpi_parse_object *root);
+ union acpi_parse_object *root);
acpi_status
acpi_ps_parse_loop (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ps_parse_aml (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ps_parse_table (
- u8 *aml,
- u32 aml_size,
- acpi_parse_downwards descending_callback,
- acpi_parse_upwards ascending_callback,
- acpi_parse_object **root_object);
+ u8 *aml,
+ u32 aml_size,
+ acpi_parse_downwards descending_callback,
+ acpi_parse_upwards ascending_callback,
+ union acpi_parse_object **root_object);
u16
acpi_ps_peek_opcode (
- acpi_parse_state *state);
+ struct acpi_parse_state *state);
/* psscope - Scope stack management routines */
@@ -181,108 +181,108 @@ acpi_ps_peek_opcode (
acpi_status
acpi_ps_init_scope (
- acpi_parse_state *parser_state,
- acpi_parse_object *root);
+ struct acpi_parse_state *parser_state,
+ union acpi_parse_object *root);
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_get_parent_scope (
- acpi_parse_state *state);
+ struct acpi_parse_state *state);
u8
acpi_ps_has_completed_scope (
- acpi_parse_state *parser_state);
+ struct acpi_parse_state *parser_state);
void
acpi_ps_pop_scope (
- acpi_parse_state *parser_state,
- acpi_parse_object **op,
- u32 *arg_list,
- u32 *arg_count);
+ struct acpi_parse_state *parser_state,
+ union acpi_parse_object **op,
+ u32 *arg_list,
+ u32 *arg_count);
acpi_status
acpi_ps_push_scope (
- acpi_parse_state *parser_state,
- acpi_parse_object *op,
- u32 remaining_args,
- u32 arg_count);
+ struct acpi_parse_state *parser_state,
+ union acpi_parse_object *op,
+ u32 remaining_args,
+ u32 arg_count);
void
acpi_ps_cleanup_scope (
- acpi_parse_state *state);
+ struct acpi_parse_state *state);
/* pstree - parse tree manipulation routines */
void
acpi_ps_append_arg(
- acpi_parse_object *op,
- acpi_parse_object *arg);
+ union acpi_parse_object *op,
+ union acpi_parse_object *arg);
-acpi_parse_object*
+union acpi_parse_object*
acpi_ps_find (
- acpi_parse_object *scope,
- char *path,
- u16 opcode,
- u32 create);
+ union acpi_parse_object *scope,
+ char *path,
+ u16 opcode,
+ u32 create);
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_get_arg(
- acpi_parse_object *op,
- u32 argn);
+ union acpi_parse_object *op,
+ u32 argn);
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_get_child (
- acpi_parse_object *op);
+ union acpi_parse_object *op);
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_get_depth_next (
- acpi_parse_object *origin,
- acpi_parse_object *op);
+ union acpi_parse_object *origin,
+ union acpi_parse_object *op);
/* pswalk - parse tree walk routines */
acpi_status
acpi_ps_walk_parsed_aml (
- acpi_parse_object *start_op,
- acpi_parse_object *end_op,
- acpi_operand_object *mth_desc,
- acpi_namespace_node *start_node,
- acpi_operand_object **params,
- acpi_operand_object **caller_return_desc,
- acpi_owner_id owner_id,
- acpi_parse_downwards descending_callback,
- acpi_parse_upwards ascending_callback);
+ union acpi_parse_object *start_op,
+ union acpi_parse_object *end_op,
+ union acpi_operand_object *mth_desc,
+ struct acpi_namespace_node *start_node,
+ union acpi_operand_object **params,
+ union acpi_operand_object **caller_return_desc,
+ acpi_owner_id owner_id,
+ acpi_parse_downwards descending_callback,
+ acpi_parse_upwards ascending_callback);
acpi_status
acpi_ps_get_next_walk_op (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- acpi_parse_upwards ascending_callback);
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ acpi_parse_upwards ascending_callback);
acpi_status
acpi_ps_delete_completed_op (
- acpi_walk_state *walk_state);
+ struct acpi_walk_state *walk_state);
/* psutils - parser utilities */
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_create_scope_op (
void);
void
acpi_ps_init_op (
- acpi_parse_object *op,
- u16 opcode);
+ union acpi_parse_object *op,
+ u16 opcode);
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_alloc_op (
- u16 opcode);
+ u16 opcode);
void
acpi_ps_free_op (
- acpi_parse_object *op);
+ union acpi_parse_object *op);
void
acpi_ps_delete_parse_cache (
@@ -290,39 +290,39 @@ acpi_ps_delete_parse_cache (
u8
acpi_ps_is_leading_char (
- u32 c);
+ u32 c);
u8
acpi_ps_is_prefix_char (
- u32 c);
+ u32 c);
u32
acpi_ps_get_name(
- acpi_parse_object *op);
+ union acpi_parse_object *op);
void
acpi_ps_set_name(
- acpi_parse_object *op,
- u32 name);
+ union acpi_parse_object *op,
+ u32 name);
/* psdump - display parser tree */
u32
acpi_ps_sprint_path (
- char *buffer_start,
- u32 buffer_size,
- acpi_parse_object *op);
+ char *buffer_start,
+ u32 buffer_size,
+ union acpi_parse_object *op);
u32
acpi_ps_sprint_op (
- char *buffer_start,
- u32 buffer_size,
- acpi_parse_object *op);
+ char *buffer_start,
+ u32 buffer_size,
+ union acpi_parse_object *op);
void
acpi_ps_show (
- acpi_parse_object *op);
+ union acpi_parse_object *op);
#endif /* __ACPARSER_H__ */
diff --git a/drivers/acpi/include/acpi.h b/drivers/acpi/include/acpi.h
index f415da65f17b..3647f1005917 100644
--- a/drivers/acpi/include/acpi.h
+++ b/drivers/acpi/include/acpi.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/drivers/acpi/include/acpiosxf.h b/drivers/acpi/include/acpiosxf.h
index 2bf4e3f0e9a4..8309e692eff0 100644
--- a/drivers/acpi/include/acpiosxf.h
+++ b/drivers/acpi/include/acpiosxf.h
@@ -9,7 +9,7 @@
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -49,13 +49,12 @@
#define ACPI_SIGNAL_FATAL 0
#define ACPI_SIGNAL_BREAKPOINT 1
-typedef struct acpi_fatal_info
+struct acpi_signal_fatal_info
{
- u32 type;
- u32 code;
- u32 argument;
-
-} acpi_signal_fatal_info;
+ u32 type;
+ u32 code;
+ u32 argument;
+};
/*
@@ -64,11 +63,11 @@ typedef struct acpi_fatal_info
typedef u32
(ACPI_SYSTEM_XFACE *OSD_HANDLER) (
- void *context);
+ void *context);
typedef void
(ACPI_SYSTEM_XFACE *OSD_EXECUTION_CALLBACK) (
- void *context);
+ void *context);
/*
@@ -90,13 +89,13 @@ acpi_os_terminate (
acpi_status
acpi_os_get_root_pointer (
- u32 flags,
- acpi_pointer *address);
+ u32 flags,
+ struct acpi_pointer *address);
acpi_status
acpi_os_table_override (
- acpi_table_header *existing_table,
- acpi_table_header **new_table);
+ struct acpi_table_header *existing_table,
+ struct acpi_table_header **new_table);
/*
@@ -105,24 +104,24 @@ acpi_os_table_override (
acpi_status
acpi_os_create_semaphore (
- u32 max_units,
- u32 initial_units,
- acpi_handle *out_handle);
+ u32 max_units,
+ u32 initial_units,
+ acpi_handle *out_handle);
acpi_status
acpi_os_delete_semaphore (
- acpi_handle handle);
+ acpi_handle handle);
acpi_status
acpi_os_wait_semaphore (
- acpi_handle handle,
- u32 units,
- u16 timeout);
+ acpi_handle handle,
+ u32 units,
+ u16 timeout);
acpi_status
acpi_os_signal_semaphore (
- acpi_handle handle,
- u32 units);
+ acpi_handle handle,
+ u32 units);
/*
@@ -131,27 +130,27 @@ acpi_os_signal_semaphore (
void *
acpi_os_allocate (
- acpi_size size);
+ acpi_size size);
void
acpi_os_free (
- void * memory);
+ void * memory);
acpi_status
acpi_os_map_memory (
- acpi_physical_address physical_address,
- acpi_size size,
- void **logical_address);
+ acpi_physical_address physical_address,
+ acpi_size size,
+ void **logical_address);
void
acpi_os_unmap_memory (
- void *logical_address,
- acpi_size size);
+ void *logical_address,
+ acpi_size size);
acpi_status
acpi_os_get_physical_address (
- void *logical_address,
- acpi_physical_address *physical_address);
+ void *logical_address,
+ acpi_physical_address *physical_address);
/*
@@ -160,13 +159,13 @@ acpi_os_get_physical_address (
acpi_status
acpi_os_install_interrupt_handler (
- u32 interrupt_number,
+ u32 interrupt_number,
OSD_HANDLER service_routine,
- void *context);
+ void *context);
acpi_status
acpi_os_remove_interrupt_handler (
- u32 interrupt_number,
+ u32 interrupt_number,
OSD_HANDLER service_routine);
@@ -180,18 +179,18 @@ acpi_os_get_thread_id (
acpi_status
acpi_os_queue_for_execution (
- u32 priority,
+ u32 priority,
OSD_EXECUTION_CALLBACK function,
- void *context);
+ void *context);
void
acpi_os_sleep (
- u32 seconds,
- u32 milliseconds);
+ u32 seconds,
+ u32 milliseconds);
void
acpi_os_stall (
- u32 microseconds);
+ u32 microseconds);
/*
@@ -200,15 +199,15 @@ acpi_os_stall (
acpi_status
acpi_os_read_port (
- acpi_io_address address,
- void *value,
- u32 width);
+ acpi_io_address address,
+ void *value,
+ u32 width);
acpi_status
acpi_os_write_port (
- acpi_io_address address,
- acpi_integer value,
- u32 width);
+ acpi_io_address address,
+ acpi_integer value,
+ u32 width);
/*
@@ -217,15 +216,15 @@ acpi_os_write_port (
acpi_status
acpi_os_read_memory (
- acpi_physical_address address,
- void *value,
- u32 width);
+ acpi_physical_address address,
+ void *value,
+ u32 width);
acpi_status
acpi_os_write_memory (
- acpi_physical_address address,
- acpi_integer value,
- u32 width);
+ acpi_physical_address address,
+ acpi_integer value,
+ u32 width);
/*
@@ -234,26 +233,26 @@ acpi_os_write_memory (
acpi_status
acpi_os_read_pci_configuration (
- acpi_pci_id *pci_id,
- u32 reg,
- void *value,
- u32 width);
+ struct acpi_pci_id *pci_id,
+ u32 register,
+ void *value,
+ u32 width);
acpi_status
acpi_os_write_pci_configuration (
- acpi_pci_id *pci_id,
- u32 reg,
- acpi_integer value,
- u32 width);
+ struct acpi_pci_id *pci_id,
+ u32 register,
+ acpi_integer value,
+ u32 width);
/*
* Interim function needed for PCI IRQ routing
*/
void
acpi_os_derive_pci_id(
- acpi_handle rhandle,
- acpi_handle chandle,
- acpi_pci_id **pci_id);
+ acpi_handle rhandle,
+ acpi_handle chandle,
+ struct acpi_pci_id **pci_id);
/*
* Miscellaneous
@@ -261,13 +260,13 @@ acpi_os_derive_pci_id(
u8
acpi_os_readable (
- void *pointer,
- u32 length);
+ void *pointer,
+ u32 length);
u8
acpi_os_writable (
- void *pointer,
- u32 length);
+ void *pointer,
+ u32 length);
u32
acpi_os_get_timer (
@@ -275,8 +274,8 @@ acpi_os_get_timer (
acpi_status
acpi_os_signal (
- u32 function,
- void *info);
+ u32 function,
+ void *info);
/*
* Debug print routines
@@ -284,17 +283,17 @@ acpi_os_signal (
void ACPI_INTERNAL_VAR_XFACE
acpi_os_printf (
- const char *format,
+ const char *format,
...);
void
acpi_os_vprintf (
- const char *format,
+ const char *format,
va_list args);
void
acpi_os_redirect_output (
- void *destination);
+ void *destination);
/*
@@ -303,8 +302,25 @@ acpi_os_redirect_output (
u32
acpi_os_get_line (
- char *buffer);
+ char *buffer);
+
+
+/*
+ * Directory manipulation
+ */
+void *
+acpi_os_open_directory (
+ char *pathname,
+ char *wildcard_spec);
+
+char *
+acpi_os_get_next_filename (
+ void *dir_handle);
+
+void
+acpi_os_close_directory (
+ void *dir_handle);
/*
* Debug
@@ -312,10 +328,10 @@ acpi_os_get_line (
void
acpi_os_dbg_assert(
- void *failed_assertion,
- void *file_name,
- u32 line_number,
- char *message);
+ void *failed_assertion,
+ void *file_name,
+ u32 line_number,
+ char *message);
#endif /* __ACPIOSXF_H__ */
diff --git a/drivers/acpi/include/acpixf.h b/drivers/acpi/include/acpixf.h
index c7bea9467413..145e66097aa5 100644
--- a/drivers/acpi/include/acpixf.h
+++ b/drivers/acpi/include/acpixf.h
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -41,11 +41,11 @@ acpi_initialize_subsystem (
acpi_status
acpi_enable_subsystem (
- u32 flags);
+ u32 flags);
acpi_status
acpi_initialize_objects (
- u32 flags);
+ u32 flags);
acpi_status
acpi_terminate (
@@ -65,11 +65,11 @@ acpi_disable (
acpi_status
acpi_get_system_info (
- acpi_buffer *ret_buffer);
+ struct acpi_buffer *ret_buffer);
const char *
acpi_format_exception (
- acpi_status exception);
+ acpi_status exception);
acpi_status
acpi_purge_cached_objects (
@@ -77,8 +77,8 @@ acpi_purge_cached_objects (
acpi_status
acpi_install_initialization_handler (
- acpi_init_handler handler,
- u32 function);
+ acpi_init_handler handler,
+ u32 function);
/*
* ACPI Memory manager
@@ -86,15 +86,15 @@ acpi_install_initialization_handler (
void *
acpi_allocate (
- u32 size);
+ u32 size);
void *
acpi_callocate (
- u32 size);
+ u32 size);
void
acpi_free (
- void *address);
+ void *address);
/*
@@ -103,8 +103,8 @@ acpi_free (
acpi_status
acpi_find_root_pointer (
- u32 flags,
- acpi_pointer *rsdp_address);
+ u32 flags,
+ struct acpi_pointer *rsdp_address);
acpi_status
acpi_load_tables (
@@ -112,30 +112,30 @@ acpi_load_tables (
acpi_status
acpi_load_table (
- acpi_table_header *table_ptr);
+ struct acpi_table_header *table_ptr);
acpi_status
acpi_unload_table (
- acpi_table_type table_type);
+ acpi_table_type table_type);
acpi_status
acpi_get_table_header (
- acpi_table_type table_type,
- u32 instance,
- acpi_table_header *out_table_header);
+ acpi_table_type table_type,
+ u32 instance,
+ struct acpi_table_header *out_table_header);
acpi_status
acpi_get_table (
- acpi_table_type table_type,
- u32 instance,
- acpi_buffer *ret_buffer);
+ acpi_table_type table_type,
+ u32 instance,
+ struct acpi_buffer *ret_buffer);
acpi_status
acpi_get_firmware_table (
- acpi_string signature,
- u32 instance,
- u32 flags,
- acpi_table_header **table_pointer);
+ acpi_string signature,
+ u32 instance,
+ u32 flags,
+ struct acpi_table_header **table_pointer);
/*
@@ -144,48 +144,48 @@ acpi_get_firmware_table (
acpi_status
acpi_walk_namespace (
- acpi_object_type type,
- acpi_handle start_object,
- u32 max_depth,
- acpi_walk_callback user_function,
- void *context,
- void * *return_value);
+ acpi_object_type type,
+ acpi_handle start_object,
+ u32 max_depth,
+ acpi_walk_callback user_function,
+ void *context,
+ void **return_value);
acpi_status
acpi_get_devices (
- char *HID,
- acpi_walk_callback user_function,
- void *context,
- void **return_value);
+ char *HID,
+ acpi_walk_callback user_function,
+ void *context,
+ void **return_value);
acpi_status
acpi_get_name (
- acpi_handle handle,
- u32 name_type,
- acpi_buffer *ret_path_ptr);
+ acpi_handle handle,
+ u32 name_type,
+ struct acpi_buffer *ret_path_ptr);
acpi_status
acpi_get_handle (
- acpi_handle parent,
- acpi_string pathname,
- acpi_handle *ret_handle);
+ acpi_handle parent,
+ acpi_string pathname,
+ acpi_handle *ret_handle);
acpi_status
acpi_attach_data (
- acpi_handle obj_handle,
- acpi_object_handler handler,
- void *data);
+ acpi_handle obj_handle,
+ acpi_object_handler handler,
+ void *data);
acpi_status
acpi_detach_data (
- acpi_handle obj_handle,
- acpi_object_handler handler);
+ acpi_handle obj_handle,
+ acpi_object_handler handler);
acpi_status
acpi_get_data (
- acpi_handle obj_handle,
- acpi_object_handler handler,
- void **data);
+ acpi_handle obj_handle,
+ acpi_object_handler handler,
+ void **data);
/*
@@ -194,40 +194,40 @@ acpi_get_data (
acpi_status
acpi_evaluate_object (
- acpi_handle object,
- acpi_string pathname,
- acpi_object_list *parameter_objects,
- acpi_buffer *return_object_buffer);
+ acpi_handle object,
+ acpi_string pathname,
+ struct acpi_object_list *parameter_objects,
+ struct acpi_buffer *return_object_buffer);
acpi_status
acpi_evaluate_object_typed (
- acpi_handle object,
- acpi_string pathname,
- acpi_object_list *external_params,
- acpi_buffer *return_buffer,
- acpi_object_type return_type);
+ acpi_handle object,
+ acpi_string pathname,
+ struct acpi_object_list *external_params,
+ struct acpi_buffer *return_buffer,
+ acpi_object_type return_type);
acpi_status
acpi_get_object_info (
- acpi_handle device,
- acpi_device_info *info);
+ acpi_handle device,
+ struct acpi_device_info *info);
acpi_status
acpi_get_next_object (
- acpi_object_type type,
- acpi_handle parent,
- acpi_handle child,
- acpi_handle *out_handle);
+ acpi_object_type type,
+ acpi_handle parent,
+ acpi_handle child,
+ acpi_handle *out_handle);
acpi_status
acpi_get_type (
- acpi_handle object,
- acpi_object_type *out_type);
+ acpi_handle object,
+ acpi_object_type *out_type);
acpi_status
acpi_get_parent (
- acpi_handle object,
- acpi_handle *out_handle);
+ acpi_handle object,
+ acpi_handle *out_handle);
/*
@@ -236,85 +236,85 @@ acpi_get_parent (
acpi_status
acpi_install_fixed_event_handler (
- u32 acpi_event,
- acpi_event_handler handler,
- void *context);
+ u32 acpi_event,
+ acpi_event_handler handler,
+ void *context);
acpi_status
acpi_remove_fixed_event_handler (
- u32 acpi_event,
- acpi_event_handler handler);
+ u32 acpi_event,
+ acpi_event_handler handler);
acpi_status
acpi_install_notify_handler (
- acpi_handle device,
- u32 handler_type,
- acpi_notify_handler handler,
- void *context);
+ acpi_handle device,
+ u32 handler_type,
+ acpi_notify_handler handler,
+ void *context);
acpi_status
acpi_remove_notify_handler (
- acpi_handle device,
- u32 handler_type,
- acpi_notify_handler handler);
+ acpi_handle device,
+ u32 handler_type,
+ acpi_notify_handler handler);
acpi_status
acpi_install_address_space_handler (
- acpi_handle device,
- acpi_adr_space_type space_id,
- acpi_adr_space_handler handler,
- acpi_adr_space_setup setup,
- void *context);
+ acpi_handle device,
+ acpi_adr_space_type space_id,
+ acpi_adr_space_handler handler,
+ acpi_adr_space_setup setup,
+ void *context);
acpi_status
acpi_remove_address_space_handler (
- acpi_handle device,
- acpi_adr_space_type space_id,
- acpi_adr_space_handler handler);
+ acpi_handle device,
+ acpi_adr_space_type space_id,
+ acpi_adr_space_handler handler);
acpi_status
acpi_install_gpe_handler (
- u32 gpe_number,
- u32 type,
- acpi_gpe_handler handler,
- void *context);
+ u32 gpe_number,
+ u32 type,
+ acpi_gpe_handler handler,
+ void *context);
acpi_status
acpi_acquire_global_lock (
- u16 timeout,
- u32 *handle);
+ u16 timeout,
+ u32 *handle);
acpi_status
acpi_release_global_lock (
- u32 handle);
+ u32 handle);
acpi_status
acpi_remove_gpe_handler (
- u32 gpe_number,
- acpi_gpe_handler handler);
+ u32 gpe_number,
+ acpi_gpe_handler handler);
acpi_status
acpi_enable_event (
- u32 acpi_event,
- u32 type,
- u32 flags);
+ u32 acpi_event,
+ u32 type,
+ u32 flags);
acpi_status
acpi_disable_event (
- u32 acpi_event,
- u32 type,
- u32 flags);
+ u32 acpi_event,
+ u32 type,
+ u32 flags);
acpi_status
acpi_clear_event (
- u32 acpi_event,
- u32 type);
+ u32 acpi_event,
+ u32 type);
acpi_status
acpi_get_event_status (
- u32 acpi_event,
- u32 type,
- acpi_event_status *event_status);
+ u32 acpi_event,
+ u32 type,
+ acpi_event_status *event_status);
/*
* Resource interfaces
@@ -322,23 +322,23 @@ acpi_get_event_status (
acpi_status
acpi_get_current_resources(
- acpi_handle device_handle,
- acpi_buffer *ret_buffer);
+ acpi_handle device_handle,
+ struct acpi_buffer *ret_buffer);
acpi_status
acpi_get_possible_resources(
- acpi_handle device_handle,
- acpi_buffer *ret_buffer);
+ acpi_handle device_handle,
+ struct acpi_buffer *ret_buffer);
acpi_status
acpi_set_current_resources (
- acpi_handle device_handle,
- acpi_buffer *in_buffer);
+ acpi_handle device_handle,
+ struct acpi_buffer *in_buffer);
acpi_status
acpi_get_irq_routing_table (
- acpi_handle bus_device_handle,
- acpi_buffer *ret_buffer);
+ acpi_handle bus_device_handle,
+ struct acpi_buffer *ret_buffer);
/*
@@ -347,41 +347,41 @@ acpi_get_irq_routing_table (
acpi_status
acpi_get_register (
- u32 register_id,
- u32 *return_value,
- u32 flags);
+ u32 register_id,
+ u32 *return_value,
+ u32 flags);
acpi_status
acpi_set_register (
- u32 register_id,
- u32 value,
- u32 flags);
+ u32 register_id,
+ u32 value,
+ u32 flags);
acpi_status
acpi_set_firmware_waking_vector (
- acpi_physical_address physical_address);
+ acpi_physical_address physical_address);
acpi_status
acpi_get_firmware_waking_vector (
- acpi_physical_address *physical_address);
+ acpi_physical_address *physical_address);
acpi_status
acpi_get_sleep_type_data (
- u8 sleep_state,
- u8 *slp_typ_a,
- u8 *slp_typ_b);
+ u8 sleep_state,
+ u8 *slp_typ_a,
+ u8 *slp_typ_b);
acpi_status
acpi_enter_sleep_state_prep (
- u8 sleep_state);
+ u8 sleep_state);
acpi_status
acpi_enter_sleep_state (
- u8 sleep_state);
+ u8 sleep_state);
acpi_status
acpi_leave_sleep_state (
- u8 sleep_state);
+ u8 sleep_state);
#endif /* __ACXFACE_H__ */
diff --git a/drivers/acpi/include/acresrc.h b/drivers/acpi/include/acresrc.h
index e57e646c3905..342d1a4be573 100644
--- a/drivers/acpi/include/acresrc.h
+++ b/drivers/acpi/include/acresrc.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -32,39 +32,39 @@
acpi_status
acpi_rs_get_prt_method_data (
- acpi_handle handle,
- acpi_buffer *ret_buffer);
+ acpi_handle handle,
+ struct acpi_buffer *ret_buffer);
acpi_status
acpi_rs_get_crs_method_data (
- acpi_handle handle,
- acpi_buffer *ret_buffer);
+ acpi_handle handle,
+ struct acpi_buffer *ret_buffer);
acpi_status
acpi_rs_get_prs_method_data (
- acpi_handle handle,
- acpi_buffer *ret_buffer);
+ acpi_handle handle,
+ struct acpi_buffer *ret_buffer);
acpi_status
acpi_rs_set_srs_method_data (
- acpi_handle handle,
- acpi_buffer *ret_buffer);
+ acpi_handle handle,
+ struct acpi_buffer *ret_buffer);
acpi_status
acpi_rs_create_resource_list (
- acpi_operand_object *byte_stream_buffer,
- acpi_buffer *output_buffer);
+ union acpi_operand_object *byte_stream_buffer,
+ struct acpi_buffer *output_buffer);
acpi_status
acpi_rs_create_byte_stream (
- acpi_resource *linked_list_buffer,
- acpi_buffer *output_buffer);
+ struct acpi_resource *linked_list_buffer,
+ struct acpi_buffer *output_buffer);
acpi_status
acpi_rs_create_pci_routing_table (
- acpi_operand_object *package_object,
- acpi_buffer *output_buffer);
+ union acpi_operand_object *package_object,
+ struct acpi_buffer *output_buffer);
/*
@@ -72,295 +72,295 @@ acpi_rs_create_pci_routing_table (
*/
void
acpi_rs_dump_irq (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_address16 (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_address32 (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_address64 (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_dma (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_io (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_extended_irq (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_fixed_io (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_fixed_memory32 (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_memory24 (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_memory32 (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_start_depend_fns (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_vendor_specific (
- acpi_resource_data *data);
+ union acpi_resource_data *data);
void
acpi_rs_dump_resource_list (
- acpi_resource *resource);
+ struct acpi_resource *resource);
void
acpi_rs_dump_irq_list (
- u8 *route_table);
+ u8 *route_table);
acpi_status
acpi_rs_get_byte_stream_start (
- u8 *byte_stream_buffer,
- u8 **byte_stream_start,
- u32 *size);
+ u8 *byte_stream_buffer,
+ u8 **byte_stream_start,
+ u32 *size);
acpi_status
acpi_rs_get_list_length (
- u8 *byte_stream_buffer,
- u32 byte_stream_buffer_length,
- acpi_size *size_needed);
+ u8 *byte_stream_buffer,
+ u32 byte_stream_buffer_length,
+ acpi_size *size_needed);
acpi_status
acpi_rs_get_byte_stream_length (
- acpi_resource *linked_list_buffer,
- acpi_size *size_needed);
+ struct acpi_resource *linked_list_buffer,
+ acpi_size *size_needed);
acpi_status
acpi_rs_get_pci_routing_table_length (
- acpi_operand_object *package_object,
- acpi_size *buffer_size_needed);
+ union acpi_operand_object *package_object,
+ acpi_size *buffer_size_needed);
acpi_status
acpi_rs_byte_stream_to_list (
- u8 *byte_stream_buffer,
- u32 byte_stream_buffer_length,
- u8 *output_buffer);
+ u8 *byte_stream_buffer,
+ u32 byte_stream_buffer_length,
+ u8 *output_buffer);
acpi_status
acpi_rs_list_to_byte_stream (
- acpi_resource *linked_list,
- acpi_size byte_stream_size_needed,
- u8 *output_buffer);
+ struct acpi_resource *linked_list,
+ acpi_size byte_stream_size_needed,
+ u8 *output_buffer);
acpi_status
acpi_rs_io_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_fixed_io_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_io_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_fixed_io_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_irq_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_irq_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_dma_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_dma_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_address16_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_address16_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_address32_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_address32_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_address64_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_address64_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_start_depend_fns_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_end_depend_fns_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_start_depend_fns_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_end_depend_fns_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_memory24_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_memory24_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_memory32_range_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_fixed_memory32_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_memory32_range_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_fixed_memory32_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_extended_irq_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_extended_irq_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_end_tag_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_end_tag_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
acpi_status
acpi_rs_vendor_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size);
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size);
acpi_status
acpi_rs_vendor_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed);
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed);
u8
acpi_rs_get_resource_type (
- u8 resource_start_byte);
+ u8 resource_start_byte);
#endif /* __ACRESRC_H__ */
diff --git a/drivers/acpi/include/acstruct.h b/drivers/acpi/include/acstruct.h
index 92ee30f70593..66764cb48002 100644
--- a/drivers/acpi/include/acstruct.h
+++ b/drivers/acpi/include/acstruct.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -47,145 +47,137 @@
#define ACPI_WALK_CONST_REQUIRED 3
#define ACPI_WALK_CONST_OPTIONAL 4
-typedef struct acpi_walk_state
+struct acpi_walk_state
{
- u8 data_type; /* To differentiate various internal objs MUST BE FIRST!*/\
- acpi_owner_id owner_id; /* Owner of objects created during the walk */
- u8 last_predicate; /* Result of last predicate */
- u8 current_result; /* */
- u8 next_op_info; /* Info about next_op */
- u8 num_operands; /* Stack pointer for Operands[] array */
- u8 return_used;
- u8 walk_type;
- u16 opcode; /* Current AML opcode */
- u8 scope_depth;
- u8 reserved1;
- u32 arg_count; /* push for fixed or var args */
- u32 aml_offset;
- u32 arg_types;
- u32 method_breakpoint; /* For single stepping */
- u32 user_breakpoint; /* User AML breakpoint */
- u32 parse_flags;
- u32 prev_arg_types;
-
-
- u8 *aml_last_while;
- struct acpi_node arguments[ACPI_METHOD_NUM_ARGS]; /* Control method arguments */
- union acpi_operand_obj **caller_return_desc;
- acpi_generic_state *control_state; /* List of control states (nested IFs) */
- struct acpi_node local_variables[ACPI_METHOD_NUM_LOCALS]; /* Control method locals */
- struct acpi_node *method_call_node; /* Called method Node*/
- acpi_parse_object *method_call_op; /* method_call Op if running a method */
- union acpi_operand_obj *method_desc; /* Method descriptor if running a method */
- struct acpi_node *method_node; /* Method Node if running a method */
- acpi_parse_object *op; /* Current parser op */
- union acpi_operand_obj *operands[ACPI_OBJ_NUM_OPERANDS+1]; /* Operands passed to the interpreter (+1 for NULL terminator) */
- const acpi_opcode_info *op_info; /* Info on current opcode */
- acpi_parse_object *origin; /* Start of walk [Obsolete] */
- union acpi_operand_obj **params;
- acpi_parse_state parser_state; /* Current state of parser */
- union acpi_operand_obj *result_obj;
- acpi_generic_state *results; /* Stack of accumulated results */
- union acpi_operand_obj *return_desc; /* Return object, if any */
- acpi_generic_state *scope_info; /* Stack of nested scopes */
-
- acpi_parse_object *prev_op; /* Last op that was processed */
- acpi_parse_object *next_op; /* next op to be processed */
- acpi_parse_downwards descending_callback;
- acpi_parse_upwards ascending_callback;
- acpi_thread_state *thread;
- struct acpi_walk_state *next; /* Next walk_state in list */
-
-
-} acpi_walk_state;
+ u8 data_type; /* To differentiate various internal objs MUST BE FIRST!*/\
+ acpi_owner_id owner_id; /* Owner of objects created during the walk */
+ u8 last_predicate; /* Result of last predicate */
+ u8 current_result; /* */
+ u8 next_op_info; /* Info about next_op */
+ u8 num_operands; /* Stack pointer for Operands[] array */
+ u8 return_used;
+ u8 walk_type;
+ u16 opcode; /* Current AML opcode */
+ u8 scope_depth;
+ u8 reserved1;
+ u32 arg_count; /* push for fixed or var args */
+ u32 aml_offset;
+ u32 arg_types;
+ u32 method_breakpoint; /* For single stepping */
+ u32 user_breakpoint; /* User AML breakpoint */
+ u32 parse_flags;
+ u32 prev_arg_types;
+
+ u8 *aml_last_while;
+ struct acpi_namespace_node arguments[ACPI_METHOD_NUM_ARGS]; /* Control method arguments */
+ union acpi_operand_object **caller_return_desc;
+ union acpi_generic_state *control_state; /* List of control states (nested IFs) */
+ struct acpi_namespace_node local_variables[ACPI_METHOD_NUM_LOCALS]; /* Control method locals */
+ struct acpi_namespace_node *method_call_node; /* Called method Node*/
+ union acpi_parse_object *method_call_op; /* method_call Op if running a method */
+ union acpi_operand_object *method_desc; /* Method descriptor if running a method */
+ struct acpi_namespace_node *method_node; /* Method Node if running a method */
+ union acpi_parse_object *op; /* Current parser op */
+ union acpi_operand_object *operands[ACPI_OBJ_NUM_OPERANDS+1]; /* Operands passed to the interpreter (+1 for NULL terminator) */
+ const struct acpi_opcode_info *op_info; /* Info on current opcode */
+ union acpi_parse_object *origin; /* Start of walk [Obsolete] */
+ union acpi_operand_object **params;
+ struct acpi_parse_state parser_state; /* Current state of parser */
+ union acpi_operand_object *result_obj;
+ union acpi_generic_state *results; /* Stack of accumulated results */
+ union acpi_operand_object *return_desc; /* Return object, if any */
+ union acpi_generic_state *scope_info; /* Stack of nested scopes */
+
+ union acpi_parse_object *prev_op; /* Last op that was processed */
+ union acpi_parse_object *next_op; /* next op to be processed */
+ acpi_parse_downwards descending_callback;
+ acpi_parse_upwards ascending_callback;
+ struct acpi_thread_state *thread;
+ struct acpi_walk_state *next; /* Next walk_state in list */
+};
/* Info used by acpi_ps_init_objects */
-typedef struct acpi_init_walk_info
+struct acpi_init_walk_info
{
- u16 method_count;
- u16 device_count;
- u16 op_region_count;
- u16 field_count;
- u16 buffer_count;
- u16 package_count;
- u16 op_region_init;
- u16 field_init;
- u16 buffer_init;
- u16 package_init;
- u16 object_count;
- acpi_table_desc *table_desc;
-
-} acpi_init_walk_info;
+ u16 method_count;
+ u16 device_count;
+ u16 op_region_count;
+ u16 field_count;
+ u16 buffer_count;
+ u16 package_count;
+ u16 op_region_init;
+ u16 field_init;
+ u16 buffer_init;
+ u16 package_init;
+ u16 object_count;
+ struct acpi_table_desc *table_desc;
+};
/* Info used by acpi_ns_initialize_devices */
-typedef struct acpi_device_walk_info
+struct acpi_device_walk_info
{
- u16 device_count;
- u16 num_STA;
- u16 num_INI;
- acpi_table_desc *table_desc;
-
-} acpi_device_walk_info;
+ u16 device_count;
+ u16 num_STA;
+ u16 num_INI;
+ struct acpi_table_desc *table_desc;
+};
/* TBD: [Restructure] Merge with struct above */
-typedef struct acpi_walk_info
+struct acpi_walk_info
{
- u32 debug_level;
- u32 owner_id;
- u8 display_type;
-
-} acpi_walk_info;
+ u32 debug_level;
+ u32 owner_id;
+ u8 display_type;
+};
/* Display Types */
#define ACPI_DISPLAY_SUMMARY 0
#define ACPI_DISPLAY_OBJECTS 1
-typedef struct acpi_get_devices_info
+struct acpi_get_devices_info
{
- acpi_walk_callback user_function;
- void *context;
- char *hid;
+ acpi_walk_callback user_function;
+ void *context;
+ char *hid;
+};
-} acpi_get_devices_info;
-
-typedef union acpi_aml_operands
+union acpi_aml_operands
{
- acpi_operand_object *operands[7];
+ union acpi_operand_object *operands[7];
struct
{
- acpi_object_integer *type;
- acpi_object_integer *code;
- acpi_object_integer *argument;
+ struct acpi_object_integer *type;
+ struct acpi_object_integer *code;
+ struct acpi_object_integer *argument;
} fatal;
struct
{
- acpi_operand_object *source;
- acpi_object_integer *index;
- acpi_operand_object *target;
+ union acpi_operand_object *source;
+ struct acpi_object_integer *index;
+ union acpi_operand_object *target;
} index;
struct
{
- acpi_operand_object *source;
- acpi_object_integer *index;
- acpi_object_integer *length;
- acpi_operand_object *target;
+ union acpi_operand_object *source;
+ struct acpi_object_integer *index;
+ struct acpi_object_integer *length;
+ union acpi_operand_object *target;
} mid;
-
-} acpi_aml_operands;
+};
#endif
diff --git a/drivers/acpi/include/actables.h b/drivers/acpi/include/actables.h
index f8a6eebbdd4e..685ea7a36421 100644
--- a/drivers/acpi/include/actables.h
+++ b/drivers/acpi/include/actables.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -33,8 +33,8 @@
acpi_status
acpi_tb_handle_to_object (
- u16 table_id,
- acpi_table_desc **table_desc);
+ u16 table_id,
+ struct acpi_table_desc **table_desc);
/*
* tbconvrt - Table conversion routines
@@ -42,7 +42,7 @@ acpi_tb_handle_to_object (
acpi_status
acpi_tb_convert_to_xsdt (
- acpi_table_desc *table_info);
+ struct acpi_table_desc *table_info);
acpi_status
acpi_tb_convert_table_fadt (
@@ -50,12 +50,12 @@ acpi_tb_convert_table_fadt (
acpi_status
acpi_tb_build_common_facs (
- acpi_table_desc *table_info);
+ struct acpi_table_desc *table_info);
u32
acpi_tb_get_table_count (
- rsdp_descriptor *RSDP,
- acpi_table_header *RSDT);
+ struct rsdp_descriptor *RSDP,
+ struct acpi_table_header *RSDT);
/*
* tbget - Table "get" routines
@@ -63,48 +63,48 @@ acpi_tb_get_table_count (
acpi_status
acpi_tb_get_table (
- acpi_pointer *address,
- acpi_table_desc *table_info);
+ struct acpi_pointer *address,
+ struct acpi_table_desc *table_info);
acpi_status
acpi_tb_get_table_header (
- acpi_pointer *address,
- acpi_table_header *return_header);
+ struct acpi_pointer *address,
+ struct acpi_table_header *return_header);
acpi_status
acpi_tb_get_table_body (
- acpi_pointer *address,
- acpi_table_header *header,
- acpi_table_desc *table_info);
+ struct acpi_pointer *address,
+ struct acpi_table_header *header,
+ struct acpi_table_desc *table_info);
acpi_status
acpi_tb_get_this_table (
- acpi_pointer *address,
- acpi_table_header *header,
- acpi_table_desc *table_info);
+ struct acpi_pointer *address,
+ struct acpi_table_header *header,
+ struct acpi_table_desc *table_info);
acpi_status
acpi_tb_table_override (
- acpi_table_header *header,
- acpi_table_desc *table_info);
+ struct acpi_table_header *header,
+ struct acpi_table_desc *table_info);
acpi_status
acpi_tb_get_table_ptr (
- acpi_table_type table_type,
- u32 instance,
- acpi_table_header **table_ptr_loc);
+ acpi_table_type table_type,
+ u32 instance,
+ struct acpi_table_header **table_ptr_loc);
acpi_status
acpi_tb_verify_rsdp (
- acpi_pointer *address);
+ struct acpi_pointer *address);
void
acpi_tb_get_rsdt_address (
- acpi_pointer *out_address);
+ struct acpi_pointer *out_address);
acpi_status
acpi_tb_validate_rsdt (
- acpi_table_header *table_ptr);
+ struct acpi_table_header *table_ptr);
acpi_status
acpi_tb_get_required_tables (
@@ -112,14 +112,14 @@ acpi_tb_get_required_tables (
acpi_status
acpi_tb_get_primary_table (
- acpi_pointer *address,
- acpi_table_desc *table_info);
+ struct acpi_pointer *address,
+ struct acpi_table_desc *table_info);
acpi_status
acpi_tb_get_secondary_table (
- acpi_pointer *address,
- acpi_string signature,
- acpi_table_desc *table_info);
+ struct acpi_pointer *address,
+ acpi_string signature,
+ struct acpi_table_desc *table_info);
/*
* tbinstall - Table installation
@@ -127,23 +127,23 @@ acpi_tb_get_secondary_table (
acpi_status
acpi_tb_install_table (
- acpi_table_desc *table_info);
+ struct acpi_table_desc *table_info);
acpi_status
acpi_tb_match_signature (
- char *signature,
- acpi_table_desc *table_info,
- u8 search_type);
+ char *signature,
+ struct acpi_table_desc *table_info,
+ u8 search_type);
acpi_status
acpi_tb_recognize_table (
- acpi_table_desc *table_info,
- u8 search_type);
+ struct acpi_table_desc *table_info,
+ u8 search_type);
acpi_status
acpi_tb_init_table_descriptor (
- acpi_table_type table_type,
- acpi_table_desc *table_info);
+ acpi_table_type table_type,
+ struct acpi_table_desc *table_info);
/*
@@ -156,19 +156,19 @@ acpi_tb_delete_acpi_tables (
void
acpi_tb_delete_acpi_table (
- acpi_table_type type);
+ acpi_table_type type);
void
acpi_tb_delete_single_table (
- acpi_table_desc *table_desc);
+ struct acpi_table_desc *table_desc);
-acpi_table_desc *
+struct acpi_table_desc *
acpi_tb_uninstall_table (
- acpi_table_desc *table_desc);
+ struct acpi_table_desc *table_desc);
void
acpi_tb_free_acpi_tables_of_type (
- acpi_table_desc *table_info);
+ struct acpi_table_desc *table_info);
/*
@@ -181,13 +181,13 @@ acpi_tb_get_table_rsdt (
u8 *
acpi_tb_scan_memory_for_rsdp (
- u8 *start_address,
- u32 length);
+ u8 *start_address,
+ u32 length);
acpi_status
acpi_tb_find_rsdp (
- acpi_table_desc *table_info,
- u32 flags);
+ struct acpi_table_desc *table_info,
+ u32 flags);
/*
@@ -196,23 +196,23 @@ acpi_tb_find_rsdp (
acpi_status
acpi_tb_find_table (
- char *signature,
- char *oem_id,
- char *oem_table_id,
- acpi_table_header **table_ptr);
+ char *signature,
+ char *oem_id,
+ char *oem_table_id,
+ struct acpi_table_header **table_ptr);
acpi_status
acpi_tb_verify_table_checksum (
- acpi_table_header *table_header);
+ struct acpi_table_header *table_header);
u8
acpi_tb_checksum (
- void *buffer,
- u32 length);
+ void *buffer,
+ u32 length);
acpi_status
acpi_tb_validate_table_header (
- acpi_table_header *table_header);
+ struct acpi_table_header *table_header);
#endif /* __ACTABLES_H__ */
diff --git a/drivers/acpi/include/actbl.h b/drivers/acpi/include/actbl.h
index 2c3c69d0818a..22865adb8e60 100644
--- a/drivers/acpi/include/actbl.h
+++ b/drivers/acpi/include/actbl.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -51,7 +51,7 @@
#define DUAL_PIC 0
#define MULTIPLE_APIC 1
-/* values of Type in APIC_HEADER */
+/* values of Type in struct apic_header */
#define APIC_PROC 0
#define APIC_IO 1
@@ -61,10 +61,10 @@
* Common table types. The base code can remain
* constant if the underlying tables are changed
*/
-#define RSDT_DESCRIPTOR RSDT_DESCRIPTOR_REV2
-#define xsdt_descriptor XSDT_DESCRIPTOR_REV2
-#define FACS_DESCRIPTOR facs_descriptor_rev2
-#define FADT_DESCRIPTOR fadt_descriptor_rev2
+#define RSDT_DESCRIPTOR struct rsdt_descriptor_rev2
+#define XSDT_DESCRIPTOR struct xsdt_descriptor_rev2
+#define FACS_DESCRIPTOR struct facs_descriptor_rev2
+#define FADT_DESCRIPTOR struct fadt_descriptor_rev2
#pragma pack(1)
@@ -73,83 +73,77 @@
* Architecture-independent tables
* The architecture dependent tables are in separate files
*/
-typedef struct /* Root System Descriptor Pointer */
+struct rsdp_descriptor /* Root System Descriptor Pointer */
{
- char signature [8]; /* ACPI signature, contains "RSD PTR " */
- u8 checksum; /* To make sum of struct == 0 */
- char oem_id [6]; /* OEM identification */
- u8 revision; /* Must be 0 for 1.0, 2 for 2.0 */
- u32 rsdt_physical_address; /* 32-bit physical address of RSDT */
- u32 length; /* XSDT Length in bytes including hdr */
- u64 xsdt_physical_address; /* 64-bit physical address of XSDT */
- u8 extended_checksum; /* Checksum of entire table */
- char reserved [3]; /* Reserved field must be 0 */
-
-} rsdp_descriptor;
-
-
-typedef struct /* ACPI common table header */
+ char signature [8]; /* ACPI signature, contains "RSD PTR " */
+ u8 checksum; /* To make sum of struct == 0 */
+ char oem_id [6]; /* OEM identification */
+ u8 revision; /* Must be 0 for 1.0, 2 for 2.0 */
+ u32 rsdt_physical_address; /* 32-bit physical address of RSDT */
+ u32 length; /* XSDT Length in bytes including hdr */
+ u64 xsdt_physical_address; /* 64-bit physical address of XSDT */
+ u8 extended_checksum; /* Checksum of entire table */
+ char reserved [3]; /* Reserved field must be 0 */
+};
+
+
+struct acpi_table_header /* ACPI common table header */
{
- char signature [4]; /* ACPI signature (4 ASCII characters) */
- u32 length; /* Length of table, in bytes, including header */
- u8 revision; /* ACPI Specification minor version # */
- u8 checksum; /* To make sum of entire table == 0 */
- char oem_id [6]; /* OEM identification */
- char oem_table_id [8]; /* OEM table identification */
- u32 oem_revision; /* OEM revision number */
- char asl_compiler_id [4]; /* ASL compiler vendor ID */
- u32 asl_compiler_revision; /* ASL compiler revision number */
-
-} acpi_table_header;
-
-
-typedef struct /* Common FACS for internal use */
+ char signature [4]; /* ACPI signature (4 ASCII characters) */
+ u32 length; /* Length of table, in bytes, including header */
+ u8 revision; /* ACPI Specification minor version # */
+ u8 checksum; /* To make sum of entire table == 0 */
+ char oem_id [6]; /* OEM identification */
+ char oem_table_id [8]; /* OEM table identification */
+ u32 oem_revision; /* OEM revision number */
+ char asl_compiler_id [4]; /* ASL compiler vendor ID */
+ u32 asl_compiler_revision; /* ASL compiler revision number */
+};
+
+
+struct acpi_common_facs /* Common FACS for internal use */
{
- u32 *global_lock;
- u64 *firmware_waking_vector;
- u8 vector_width;
+ u32 *global_lock;
+ u64 *firmware_waking_vector;
+ u8 vector_width;
+};
-} acpi_common_facs;
-
-typedef struct /* APIC Table */
+struct apic_table
{
- acpi_table_header header; /* ACPI table header */
- u32 local_apic_address; /* Physical address for accessing local APICs */
- u32 PCATcompat : 1; /* a one indicates system also has dual 8259s */
- u32 reserved1 : 31;
-
-} APIC_TABLE;
+ struct acpi_table_header header; /* ACPI table header */
+ u32 local_apic_address; /* Physical address for accessing local APICs */
+ u32 PCATcompat : 1; /* a one indicates system also has dual 8259s */
+ u32 reserved1 : 31;
+};
-typedef struct /* APIC Header */
+struct apic_header
{
- u8 type; /* APIC type. Either APIC_PROC or APIC_IO */
- u8 length; /* Length of APIC structure */
-
-} APIC_HEADER;
+ u8 type; /* APIC type. Either APIC_PROC or APIC_IO */
+ u8 length; /* Length of APIC structure */
+};
-typedef struct /* Processor APIC */
+struct processor_apic
{
- APIC_HEADER header;
- u8 processor_apic_id; /* ACPI processor id */
- u8 local_apic_id; /* Processor's local APIC id */
- u32 processor_enabled: 1; /* Processor is usable if set */
- u32 reserved1 : 31;
+ struct apic_header header;
+ u8 processor_apic_id; /* ACPI processor id */
+ u8 local_apic_id; /* Processor's local APIC id */
+ u32 processor_enabled: 1; /* Processor is usable if set */
+ u32 reserved1 : 31;
+};
-} PROCESSOR_APIC;
-
-typedef struct /* IO APIC */
+struct io_apic
{
- APIC_HEADER header;
- u8 io_apic_id; /* I/O APIC ID */
- u8 reserved; /* Reserved - must be zero */
- u32 io_apic_address; /* APIC's physical address */
- u32 vector; /* Interrupt vector index where INTI
+ struct apic_header header;
+ u8 io_apic_id; /* I/O APIC ID */
+ u8 reserved; /* Reserved - must be zero */
+ u32 io_apic_address; /* APIC's physical address */
+ u32 vector; /* Interrupt vector index where INTI
* lines start */
-} IO_APIC;
+};
/*
@@ -160,14 +154,13 @@ typedef struct /* IO APIC */
* IA64 TBD: Modify Smart Battery Description to comply with ACPI IA64
* extensions.
*/
-typedef struct /* Smart Battery Description Table */
+struct smart_battery_description_table
{
- acpi_table_header header;
- u32 warning_level;
- u32 low_level;
- u32 critical_level;
-
-} SMART_BATTERY_DESCRIPTION_TABLE;
+ struct acpi_table_header header;
+ u32 warning_level;
+ u32 low_level;
+ u32 critical_level;
+};
#pragma pack()
@@ -182,7 +175,7 @@ typedef struct /* Smart Battery Description Table */
#define ACPI_MEM_ALLOCATED 1
#define ACPI_MEM_MAPPED 2
-/* Definitions for the Flags bitfield member of ACPI_TABLE_SUPPORT */
+/* Definitions for the Flags bitfield member of struct acpi_table_support */
#define ACPI_TABLE_SINGLE 0x00
#define ACPI_TABLE_MULTIPLE 0x01
@@ -196,15 +189,14 @@ typedef struct /* Smart Battery Description Table */
/* Data about each known table type */
-typedef struct _acpi_table_support
+struct acpi_table_support
{
- char *name;
- char *signature;
- void **global_ptr;
- u8 sig_length;
- u8 flags;
-
-} ACPI_TABLE_SUPPORT;
+ char *name;
+ char *signature;
+ void **global_ptr;
+ u8 sig_length;
+ u8 flags;
+};
/*
diff --git a/drivers/acpi/include/actbl1.h b/drivers/acpi/include/actbl1.h
index 2eb31e167d4e..aad526a5ab92 100644
--- a/drivers/acpi/include/actbl1.h
+++ b/drivers/acpi/include/actbl1.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -30,87 +30,85 @@
/*
* ACPI 1.0 Root System Description Table (RSDT)
*/
-typedef struct
+struct rsdt_descriptor_rev1
{
- acpi_table_header header; /* ACPI Table header */
- u32 table_offset_entry [1]; /* Array of pointers to other */
+ struct acpi_table_header header; /* ACPI Table header */
+ u32 table_offset_entry [1]; /* Array of pointers to other */
/* ACPI tables */
-} RSDT_DESCRIPTOR_REV1;
+};
/*
* ACPI 1.0 Firmware ACPI Control Structure (FACS)
*/
-typedef struct
+struct facs_descriptor_rev1
{
- char signature[4]; /* ACPI Signature */
- u32 length; /* Length of structure, in bytes */
- u32 hardware_signature; /* Hardware configuration signature */
- u32 firmware_waking_vector; /* ACPI OS waking vector */
- u32 global_lock; /* Global Lock */
- u32 S4bios_f : 1; /* Indicates if S4BIOS support is present */
- u32 reserved1 : 31; /* Must be 0 */
- u8 resverved3 [40]; /* Reserved - must be zero */
-
-} facs_descriptor_rev1;
+ char signature[4]; /* ACPI Signature */
+ u32 length; /* Length of structure, in bytes */
+ u32 hardware_signature; /* Hardware configuration signature */
+ u32 firmware_waking_vector; /* ACPI OS waking vector */
+ u32 global_lock; /* Global Lock */
+ u32 S4bios_f : 1; /* Indicates if S4BIOS support is present */
+ u32 reserved1 : 31; /* Must be 0 */
+ u8 resverved3 [40]; /* Reserved - must be zero */
+};
/*
* ACPI 1.0 Fixed ACPI Description Table (FADT)
*/
-typedef struct
+struct fadt_descriptor_rev1
{
- acpi_table_header header; /* ACPI Table header */
- u32 firmware_ctrl; /* Physical address of FACS */
- u32 dsdt; /* Physical address of DSDT */
- u8 model; /* System Interrupt Model */
- u8 reserved1; /* Reserved */
- u16 sci_int; /* System vector of SCI interrupt */
- u32 smi_cmd; /* Port address of SMI command port */
- u8 acpi_enable; /* Value to write to smi_cmd to enable ACPI */
- u8 acpi_disable; /* Value to write to smi_cmd to disable ACPI */
- u8 S4bios_req; /* Value to write to SMI CMD to enter S4BIOS state */
- u8 reserved2; /* Reserved - must be zero */
- u32 pm1a_evt_blk; /* Port address of Power Mgt 1a acpi_event Reg Blk */
- u32 pm1b_evt_blk; /* Port address of Power Mgt 1b acpi_event Reg Blk */
- u32 pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */
- u32 pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */
- u32 pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */
- u32 pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */
- u32 gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */
- u32 gpe1_blk; /* Port addr of General Purpose acpi_event 1 Reg Blk */
- u8 pm1_evt_len; /* Byte length of ports at pm1_x_evt_blk */
- u8 pm1_cnt_len; /* Byte length of ports at pm1_x_cnt_blk */
- u8 pm2_cnt_len; /* Byte Length of ports at pm2_cnt_blk */
- u8 pm_tm_len; /* Byte Length of ports at pm_tm_blk */
- u8 gpe0_blk_len; /* Byte Length of ports at gpe0_blk */
- u8 gpe1_blk_len; /* Byte Length of ports at gpe1_blk */
- u8 gpe1_base; /* Offset in gpe model where gpe1 events start */
- u8 reserved3; /* Reserved */
- u16 plvl2_lat; /* Worst case HW latency to enter/exit C2 state */
- u16 plvl3_lat; /* Worst case HW latency to enter/exit C3 state */
- u16 flush_size; /* Size of area read to flush caches */
- u16 flush_stride; /* Stride used in flushing caches */
- u8 duty_offset; /* Bit location of duty cycle field in p_cnt reg */
- u8 duty_width; /* Bit width of duty cycle field in p_cnt reg */
- u8 day_alrm; /* Index to day-of-month alarm in RTC CMOS RAM */
- u8 mon_alrm; /* Index to month-of-year alarm in RTC CMOS RAM */
- u8 century; /* Index to century in RTC CMOS RAM */
- u8 reserved4; /* Reserved */
- u8 reserved4a; /* Reserved */
- u8 reserved4b; /* Reserved */
- u32 wb_invd : 1; /* The wbinvd instruction works properly */
- u32 wb_invd_flush : 1; /* The wbinvd flushes but does not invalidate */
- u32 proc_c1 : 1; /* All processors support C1 state */
- u32 plvl2_up : 1; /* C2 state works on MP system */
- u32 pwr_button : 1; /* Power button is handled as a generic feature */
- u32 sleep_button : 1; /* Sleep button is handled as a generic feature, or not present */
- u32 fixed_rTC : 1; /* RTC wakeup stat not in fixed register space */
- u32 rtcs4 : 1; /* RTC wakeup stat not possible from S4 */
- u32 tmr_val_ext : 1; /* The tmr_val width is 32 bits (0 = 24 bits) */
- u32 reserved5 : 23; /* Reserved - must be zero */
-
-} fadt_descriptor_rev1;
+ struct acpi_table_header header; /* ACPI Table header */
+ u32 firmware_ctrl; /* Physical address of FACS */
+ u32 dsdt; /* Physical address of DSDT */
+ u8 model; /* System Interrupt Model */
+ u8 reserved1; /* Reserved */
+ u16 sci_int; /* System vector of SCI interrupt */
+ u32 smi_cmd; /* Port address of SMI command port */
+ u8 acpi_enable; /* Value to write to smi_cmd to enable ACPI */
+ u8 acpi_disable; /* Value to write to smi_cmd to disable ACPI */
+ u8 S4bios_req; /* Value to write to SMI CMD to enter S4BIOS state */
+ u8 reserved2; /* Reserved - must be zero */
+ u32 pm1a_evt_blk; /* Port address of Power Mgt 1a acpi_event Reg Blk */
+ u32 pm1b_evt_blk; /* Port address of Power Mgt 1b acpi_event Reg Blk */
+ u32 pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */
+ u32 pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */
+ u32 pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */
+ u32 pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */
+ u32 gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */
+ u32 gpe1_blk; /* Port addr of General Purpose acpi_event 1 Reg Blk */
+ u8 pm1_evt_len; /* Byte length of ports at pm1_x_evt_blk */
+ u8 pm1_cnt_len; /* Byte length of ports at pm1_x_cnt_blk */
+ u8 pm2_cnt_len; /* Byte Length of ports at pm2_cnt_blk */
+ u8 pm_tm_len; /* Byte Length of ports at pm_tm_blk */
+ u8 gpe0_blk_len; /* Byte Length of ports at gpe0_blk */
+ u8 gpe1_blk_len; /* Byte Length of ports at gpe1_blk */
+ u8 gpe1_base; /* Offset in gpe model where gpe1 events start */
+ u8 reserved3; /* Reserved */
+ u16 plvl2_lat; /* Worst case HW latency to enter/exit C2 state */
+ u16 plvl3_lat; /* Worst case HW latency to enter/exit C3 state */
+ u16 flush_size; /* Size of area read to flush caches */
+ u16 flush_stride; /* Stride used in flushing caches */
+ u8 duty_offset; /* Bit location of duty cycle field in p_cnt reg */
+ u8 duty_width; /* Bit width of duty cycle field in p_cnt reg */
+ u8 day_alrm; /* Index to day-of-month alarm in RTC CMOS RAM */
+ u8 mon_alrm; /* Index to month-of-year alarm in RTC CMOS RAM */
+ u8 century; /* Index to century in RTC CMOS RAM */
+ u8 reserved4; /* Reserved */
+ u8 reserved4a; /* Reserved */
+ u8 reserved4b; /* Reserved */
+ u32 wb_invd : 1; /* The wbinvd instruction works properly */
+ u32 wb_invd_flush : 1; /* The wbinvd flushes but does not invalidate */
+ u32 proc_c1 : 1; /* All processors support C1 state */
+ u32 plvl2_up : 1; /* C2 state works on MP system */
+ u32 pwr_button : 1; /* Power button is handled as a generic feature */
+ u32 sleep_button : 1; /* Sleep button is handled as a generic feature, or not present */
+ u32 fixed_rTC : 1; /* RTC wakeup stat not in fixed register space */
+ u32 rtcs4 : 1; /* RTC wakeup stat not possible from S4 */
+ u32 tmr_val_ext : 1; /* The tmr_val width is 32 bits (0 = 24 bits) */
+ u32 reserved5 : 23; /* Reserved - must be zero */
+};
#pragma pack()
diff --git a/drivers/acpi/include/actbl2.h b/drivers/acpi/include/actbl2.h
index 57e31da1983b..a5410ffd54a0 100644
--- a/drivers/acpi/include/actbl2.h
+++ b/drivers/acpi/include/actbl2.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -50,133 +50,130 @@
/*
* ACPI 2.0 Root System Description Table (RSDT)
*/
-typedef struct
+struct rsdt_descriptor_rev2
{
- acpi_table_header header; /* ACPI table header */
- u32 table_offset_entry [1]; /* Array of pointers to */
+ struct acpi_table_header header; /* ACPI table header */
+ u32 table_offset_entry [1]; /* Array of pointers to */
/* ACPI table headers */
-} RSDT_DESCRIPTOR_REV2;
+};
/*
* ACPI 2.0 Extended System Description Table (XSDT)
*/
-typedef struct
+struct xsdt_descriptor_rev2
{
- acpi_table_header header; /* ACPI table header */
- u64 table_offset_entry [1]; /* Array of pointers to */
+ struct acpi_table_header header; /* ACPI table header */
+ u64 table_offset_entry [1]; /* Array of pointers to */
/* ACPI table headers */
-} XSDT_DESCRIPTOR_REV2;
+};
/*
* ACPI 2.0 Firmware ACPI Control Structure (FACS)
*/
-typedef struct
+struct facs_descriptor_rev2
{
- char signature[4]; /* ACPI signature */
- u32 length; /* Length of structure, in bytes */
- u32 hardware_signature; /* Hardware configuration signature */
- u32 firmware_waking_vector; /* 32bit physical address of the Firmware Waking Vector. */
- u32 global_lock; /* Global Lock used to synchronize access to shared hardware resources */
- u32 S4bios_f : 1; /* S4Bios_f - Indicates if S4BIOS support is present */
- u32 reserved1 : 31; /* Must be 0 */
- u64 xfirmware_waking_vector; /* 64bit physical address of the Firmware Waking Vector. */
- u8 version; /* Version of this table */
- u8 reserved3 [31]; /* Reserved - must be zero */
-
-} facs_descriptor_rev2;
+ char signature[4]; /* ACPI signature */
+ u32 length; /* Length of structure, in bytes */
+ u32 hardware_signature; /* Hardware configuration signature */
+ u32 firmware_waking_vector; /* 32bit physical address of the Firmware Waking Vector. */
+ u32 global_lock; /* Global Lock used to synchronize access to shared hardware resources */
+ u32 S4bios_f : 1; /* S4Bios_f - Indicates if S4BIOS support is present */
+ u32 reserved1 : 31; /* Must be 0 */
+ u64 xfirmware_waking_vector; /* 64bit physical address of the Firmware Waking Vector. */
+ u8 version; /* Version of this table */
+ u8 reserved3 [31]; /* Reserved - must be zero */
+};
/*
* ACPI 2.0 Generic Address Structure (GAS)
*/
-typedef struct
+struct acpi_generic_address
{
- u8 address_space_id; /* Address space where struct or register exists. */
- u8 register_bit_width; /* Size in bits of given register */
- u8 register_bit_offset; /* Bit offset within the register */
- u8 reserved; /* Must be 0 */
- u64 address; /* 64-bit address of struct or register */
-
-} acpi_generic_address;
+ u8 address_space_id; /* Address space where struct or register exists. */
+ u8 register_bit_width; /* Size in bits of given register */
+ u8 register_bit_offset; /* Bit offset within the register */
+ u8 reserved; /* Must be 0 */
+ u64 address; /* 64-bit address of struct or register */
+};
/*
* ACPI 2.0 Fixed ACPI Description Table (FADT)
*/
-typedef struct
+struct fadt_descriptor_rev2
{
- acpi_table_header header; /* ACPI table header */
- u32 V1_firmware_ctrl; /* 32-bit physical address of FACS */
- u32 V1_dsdt; /* 32-bit physical address of DSDT */
- u8 reserved1; /* System Interrupt Model isn't used in ACPI 2.0*/
- u8 prefer_PM_profile; /* Conveys preferred power management profile to OSPM. */
- u16 sci_int; /* System vector of SCI interrupt */
- u32 smi_cmd; /* Port address of SMI command port */
- u8 acpi_enable; /* Value to write to smi_cmd to enable ACPI */
- u8 acpi_disable; /* Value to write to smi_cmd to disable ACPI */
- u8 S4bios_req; /* Value to write to SMI CMD to enter S4BIOS state */
- u8 pstate_cnt; /* Processor performance state control*/
- u32 V1_pm1a_evt_blk; /* Port address of Power Mgt 1a acpi_event Reg Blk */
- u32 V1_pm1b_evt_blk; /* Port address of Power Mgt 1b acpi_event Reg Blk */
- u32 V1_pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */
- u32 V1_pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */
- u32 V1_pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */
- u32 V1_pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */
- u32 V1_gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */
- u32 V1_gpe1_blk; /* Port addr of General Purpose acpi_event 1 Reg Blk */
- u8 pm1_evt_len; /* Byte length of ports at pm1_x_evt_blk */
- u8 pm1_cnt_len; /* Byte length of ports at pm1_x_cnt_blk */
- u8 pm2_cnt_len; /* Byte Length of ports at pm2_cnt_blk */
- u8 pm_tm_len; /* Byte Length of ports at pm_tm_blk */
- u8 gpe0_blk_len; /* Byte Length of ports at gpe0_blk */
- u8 gpe1_blk_len; /* Byte Length of ports at gpe1_blk */
- u8 gpe1_base; /* Offset in gpe model where gpe1 events start */
- u8 cst_cnt; /* Support for the _CST object and C States change notification.*/
- u16 plvl2_lat; /* Worst case HW latency to enter/exit C2 state */
- u16 plvl3_lat; /* Worst case HW latency to enter/exit C3 state */
- u16 flush_size; /* Number of flush strides that need to be read */
- u16 flush_stride; /* Processor's memory cache line width, in bytes */
- u8 duty_offset; /* Processor's duty cycle index in processor's P_CNT reg*/
- u8 duty_width; /* Processor's duty cycle value bit width in P_CNT register.*/
- u8 day_alrm; /* Index to day-of-month alarm in RTC CMOS RAM */
- u8 mon_alrm; /* Index to month-of-year alarm in RTC CMOS RAM */
- u8 century; /* Index to century in RTC CMOS RAM */
- u16 iapc_boot_arch; /* IA-PC Boot Architecture Flags. See Table 5-10 for description*/
- u8 reserved2; /* Reserved */
- u32 wb_invd : 1; /* The wbinvd instruction works properly */
- u32 wb_invd_flush : 1; /* The wbinvd flushes but does not invalidate */
- u32 proc_c1 : 1; /* All processors support C1 state */
- u32 plvl2_up : 1; /* C2 state works on MP system */
- u32 pwr_button : 1; /* Power button is handled as a generic feature */
- u32 sleep_button : 1; /* Sleep button is handled as a generic feature, or not present */
- u32 fixed_rTC : 1; /* RTC wakeup stat not in fixed register space */
- u32 rtcs4 : 1; /* RTC wakeup stat not possible from S4 */
- u32 tmr_val_ext : 1; /* Indicates tmr_val is 32 bits 0=24-bits*/
- u32 dock_cap : 1; /* Supports Docking */
- u32 reset_reg_sup : 1; /* Indicates system supports system reset via the FADT RESET_REG*/
- u32 sealed_case : 1; /* Indicates system has no internal expansion capabilities and case is sealed. */
- u32 headless : 1; /* Indicates system does not have local video capabilities or local input devices.*/
- u32 cpu_sw_sleep : 1; /* Indicates to OSPM that a processor native instruction */
+ struct acpi_table_header header; /* ACPI table header */
+ u32 V1_firmware_ctrl; /* 32-bit physical address of FACS */
+ u32 V1_dsdt; /* 32-bit physical address of DSDT */
+ u8 reserved1; /* System Interrupt Model isn't used in ACPI 2.0*/
+ u8 prefer_PM_profile; /* Conveys preferred power management profile to OSPM. */
+ u16 sci_int; /* System vector of SCI interrupt */
+ u32 smi_cmd; /* Port address of SMI command port */
+ u8 acpi_enable; /* Value to write to smi_cmd to enable ACPI */
+ u8 acpi_disable; /* Value to write to smi_cmd to disable ACPI */
+ u8 S4bios_req; /* Value to write to SMI CMD to enter S4BIOS state */
+ u8 pstate_cnt; /* Processor performance state control*/
+ u32 V1_pm1a_evt_blk; /* Port address of Power Mgt 1a acpi_event Reg Blk */
+ u32 V1_pm1b_evt_blk; /* Port address of Power Mgt 1b acpi_event Reg Blk */
+ u32 V1_pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */
+ u32 V1_pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */
+ u32 V1_pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */
+ u32 V1_pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */
+ u32 V1_gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */
+ u32 V1_gpe1_blk; /* Port addr of General Purpose acpi_event 1 Reg Blk */
+ u8 pm1_evt_len; /* Byte length of ports at pm1_x_evt_blk */
+ u8 pm1_cnt_len; /* Byte length of ports at pm1_x_cnt_blk */
+ u8 pm2_cnt_len; /* Byte Length of ports at pm2_cnt_blk */
+ u8 pm_tm_len; /* Byte Length of ports at pm_tm_blk */
+ u8 gpe0_blk_len; /* Byte Length of ports at gpe0_blk */
+ u8 gpe1_blk_len; /* Byte Length of ports at gpe1_blk */
+ u8 gpe1_base; /* Offset in gpe model where gpe1 events start */
+ u8 cst_cnt; /* Support for the _CST object and C States change notification.*/
+ u16 plvl2_lat; /* Worst case HW latency to enter/exit C2 state */
+ u16 plvl3_lat; /* Worst case HW latency to enter/exit C3 state */
+ u16 flush_size; /* Number of flush strides that need to be read */
+ u16 flush_stride; /* Processor's memory cache line width, in bytes */
+ u8 duty_offset; /* Processor's duty cycle index in processor's P_CNT reg*/
+ u8 duty_width; /* Processor's duty cycle value bit width in P_CNT register.*/
+ u8 day_alrm; /* Index to day-of-month alarm in RTC CMOS RAM */
+ u8 mon_alrm; /* Index to month-of-year alarm in RTC CMOS RAM */
+ u8 century; /* Index to century in RTC CMOS RAM */
+ u16 iapc_boot_arch; /* IA-PC Boot Architecture Flags. See Table 5-10 for description*/
+ u8 reserved2; /* Reserved */
+ u32 wb_invd : 1; /* The wbinvd instruction works properly */
+ u32 wb_invd_flush : 1; /* The wbinvd flushes but does not invalidate */
+ u32 proc_c1 : 1; /* All processors support C1 state */
+ u32 plvl2_up : 1; /* C2 state works on MP system */
+ u32 pwr_button : 1; /* Power button is handled as a generic feature */
+ u32 sleep_button : 1; /* Sleep button is handled as a generic feature, or not present */
+ u32 fixed_rTC : 1; /* RTC wakeup stat not in fixed register space */
+ u32 rtcs4 : 1; /* RTC wakeup stat not possible from S4 */
+ u32 tmr_val_ext : 1; /* Indicates tmr_val is 32 bits 0=24-bits*/
+ u32 dock_cap : 1; /* Supports Docking */
+ u32 reset_reg_sup : 1; /* Indicates system supports system reset via the FADT RESET_REG*/
+ u32 sealed_case : 1; /* Indicates system has no internal expansion capabilities and case is sealed. */
+ u32 headless : 1; /* Indicates system does not have local video capabilities or local input devices.*/
+ u32 cpu_sw_sleep : 1; /* Indicates to OSPM that a processor native instruction */
/* Must be executed after writing the SLP_TYPx register. */
- u32 reserved6 : 18; /* Reserved - must be zero */
-
- acpi_generic_address reset_register; /* Reset register address in GAS format */
- u8 reset_value; /* Value to write to the reset_register port to reset the system. */
- u8 reserved7[3]; /* These three bytes must be zero */
- u64 xfirmware_ctrl; /* 64-bit physical address of FACS */
- u64 Xdsdt; /* 64-bit physical address of DSDT */
- acpi_generic_address xpm1a_evt_blk; /* Extended Power Mgt 1a acpi_event Reg Blk address */
- acpi_generic_address xpm1b_evt_blk; /* Extended Power Mgt 1b acpi_event Reg Blk address */
- acpi_generic_address xpm1a_cnt_blk; /* Extended Power Mgt 1a Control Reg Blk address */
- acpi_generic_address xpm1b_cnt_blk; /* Extended Power Mgt 1b Control Reg Blk address */
- acpi_generic_address xpm2_cnt_blk; /* Extended Power Mgt 2 Control Reg Blk address */
- acpi_generic_address xpm_tmr_blk; /* Extended Power Mgt Timer Ctrl Reg Blk address */
- acpi_generic_address xgpe0_blk; /* Extended General Purpose acpi_event 0 Reg Blk address */
- acpi_generic_address xgpe1_blk; /* Extended General Purpose acpi_event 1 Reg Blk address */
-
-} fadt_descriptor_rev2;
+ u32 reserved6 : 18; /* Reserved - must be zero */
+
+ struct acpi_generic_address reset_register; /* Reset register address in GAS format */
+ u8 reset_value; /* Value to write to the reset_register port to reset the system. */
+ u8 reserved7[3]; /* These three bytes must be zero */
+ u64 xfirmware_ctrl; /* 64-bit physical address of FACS */
+ u64 Xdsdt; /* 64-bit physical address of DSDT */
+ struct acpi_generic_address xpm1a_evt_blk; /* Extended Power Mgt 1a acpi_event Reg Blk address */
+ struct acpi_generic_address xpm1b_evt_blk; /* Extended Power Mgt 1b acpi_event Reg Blk address */
+ struct acpi_generic_address xpm1a_cnt_blk; /* Extended Power Mgt 1a Control Reg Blk address */
+ struct acpi_generic_address xpm1b_cnt_blk; /* Extended Power Mgt 1b Control Reg Blk address */
+ struct acpi_generic_address xpm2_cnt_blk; /* Extended Power Mgt 2 Control Reg Blk address */
+ struct acpi_generic_address xpm_tmr_blk; /* Extended Power Mgt Timer Ctrl Reg Blk address */
+ struct acpi_generic_address xgpe0_blk; /* Extended General Purpose acpi_event 0 Reg Blk address */
+ struct acpi_generic_address xgpe1_blk; /* Extended General Purpose acpi_event 1 Reg Blk address */
+};
#pragma pack()
diff --git a/drivers/acpi/include/actbl71.h b/drivers/acpi/include/actbl71.h
index 0f2d084b01e1..7b4fb44261f3 100644
--- a/drivers/acpi/include/actbl71.h
+++ b/drivers/acpi/include/actbl71.h
@@ -7,7 +7,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -40,105 +40,103 @@
/* Only for clarity in declarations */
-typedef u64 IO_ADDRESS;
+typedef u64 IO_ADDRESS;
#pragma pack(1)
-typedef struct /* Root System Descriptor Pointer */
+struct /* Root System Descriptor Pointer */
{
NATIVE_CHAR signature [8]; /* contains "RSD PTR " */
- u8 checksum; /* to make sum of struct == 0 */
+ u8 checksum; /* to make sum of struct == 0 */
NATIVE_CHAR oem_id [6]; /* OEM identification */
- u8 reserved; /* Must be 0 for 1.0, 2 for 2.0 */
- u64 rsdt_physical_address; /* 64-bit physical address of RSDT */
-} RSDP_DESCRIPTOR_REV071;
+ u8 reserved; /* Must be 0 for 1.0, 2 for 2.0 */
+ u64 rsdt_physical_address; /* 64-bit physical address of RSDT */
+};
/*****************************************/
/* IA64 Extensions to ACPI Spec Rev 0.71 */
/* for the Root System Description Table */
/*****************************************/
-typedef struct
+struct
{
- acpi_table_header header; /* Table header */
- u32 reserved_pad; /* IA64 alignment, must be 0 */
- u64 table_offset_entry [1]; /* Array of pointers to other */
+ struct acpi_table_header header; /* Table header */
+ u32 reserved_pad; /* IA64 alignment, must be 0 */
+ u64 table_offset_entry [1]; /* Array of pointers to other */
/* tables' headers */
-} RSDT_DESCRIPTOR_REV071;
+};
/*******************************************/
/* IA64 Extensions to ACPI Spec Rev 0.71 */
/* for the Firmware ACPI Control Structure */
/*******************************************/
-typedef struct
+struct
{
NATIVE_CHAR signature[4]; /* signature "FACS" */
- u32 length; /* length of structure, in bytes */
- u32 hardware_signature; /* hardware configuration signature */
- u32 reserved4; /* must be 0 */
- u64 firmware_waking_vector; /* ACPI OS waking vector */
- u64 global_lock; /* Global Lock */
- u32 S4bios_f : 1; /* Indicates if S4BIOS support is present */
- u32 reserved1 : 31; /* must be 0 */
- u8 reserved3 [28]; /* reserved - must be zero */
-
-} facs_descriptor_rev071;
+ u32 length; /* length of structure, in bytes */
+ u32 hardware_signature; /* hardware configuration signature */
+ u32 reserved4; /* must be 0 */
+ u64 firmware_waking_vector; /* ACPI OS waking vector */
+ u64 global_lock; /* Global Lock */
+ u32 S4bios_f : 1; /* Indicates if S4BIOS support is present */
+ u32 reserved1 : 31; /* must be 0 */
+ u8 reserved3 [28]; /* reserved - must be zero */
+};
/******************************************/
/* IA64 Extensions to ACPI Spec Rev 0.71 */
/* for the Fixed ACPI Description Table */
/******************************************/
-typedef struct
+struct
{
- acpi_table_header header; /* table header */
- u32 reserved_pad; /* IA64 alignment, must be 0 */
- u64 firmware_ctrl; /* 64-bit Physical address of FACS */
- u64 dsdt; /* 64-bit Physical address of DSDT */
- u8 model; /* System Interrupt Model */
- u8 address_space; /* Address Space Bitmask */
- u16 sci_int; /* System vector of SCI interrupt */
- u8 acpi_enable; /* value to write to smi_cmd to enable ACPI */
- u8 acpi_disable; /* value to write to smi_cmd to disable ACPI */
- u8 S4bios_req; /* Value to write to SMI CMD to enter S4BIOS state */
- u8 reserved2; /* reserved - must be zero */
- u64 smi_cmd; /* Port address of SMI command port */
- u64 pm1a_evt_blk; /* Port address of Power Mgt 1a acpi_event Reg Blk */
- u64 pm1b_evt_blk; /* Port address of Power Mgt 1b acpi_event Reg Blk */
- u64 pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */
- u64 pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */
- u64 pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */
- u64 pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */
- u64 gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */
- u64 gpe1_blk; /* Port addr of General Purpose acpi_event 1 Reg Blk */
- u8 pm1_evt_len; /* Byte length of ports at pm1_x_evt_blk */
- u8 pm1_cnt_len; /* Byte length of ports at pm1_x_cnt_blk */
- u8 pm2_cnt_len; /* Byte Length of ports at pm2_cnt_blk */
- u8 pm_tm_len; /* Byte Length of ports at pm_tm_blk */
- u8 gpe0_blk_len; /* Byte Length of ports at gpe0_blk */
- u8 gpe1_blk_len; /* Byte Length of ports at gpe1_blk */
- u8 gpe1_base; /* offset in gpe model where gpe1 events start */
- u8 reserved3; /* reserved */
- u16 plvl2_lat; /* worst case HW latency to enter/exit C2 state */
- u16 plvl3_lat; /* worst case HW latency to enter/exit C3 state */
- u8 day_alrm; /* index to day-of-month alarm in RTC CMOS RAM */
- u8 mon_alrm; /* index to month-of-year alarm in RTC CMOS RAM */
- u8 century; /* index to century in RTC CMOS RAM */
- u8 reserved4; /* reserved */
- u32 flush_cash : 1; /* PAL_FLUSH_CACHE is correctly supported */
- u32 reserved5 : 1; /* reserved - must be zero */
- u32 proc_c1 : 1; /* all processors support C1 state */
- u32 plvl2_up : 1; /* C2 state works on MP system */
- u32 pwr_button : 1; /* Power button is handled as a generic feature */
- u32 sleep_button : 1; /* Sleep button is handled as a generic feature, or not present */
- u32 fixed_rTC : 1; /* RTC wakeup stat not in fixed register space */
- u32 rtcs4 : 1; /* RTC wakeup stat not possible from S4 */
- u32 tmr_val_ext : 1; /* tmr_val is 32 bits */
- u32 dock_cap : 1; /* Supports Docking */
- u32 reserved6 : 22; /* reserved - must be zero */
-
-} fadt_descriptor_rev071;
+ struct acpi_table_header header; /* table header */
+ u32 reserved_pad; /* IA64 alignment, must be 0 */
+ u64 firmware_ctrl; /* 64-bit Physical address of FACS */
+ u64 dsdt; /* 64-bit Physical address of DSDT */
+ u8 model; /* System Interrupt Model */
+ u8 address_space; /* Address Space Bitmask */
+ u16 sci_int; /* System vector of SCI interrupt */
+ u8 acpi_enable; /* value to write to smi_cmd to enable ACPI */
+ u8 acpi_disable; /* value to write to smi_cmd to disable ACPI */
+ u8 S4bios_req; /* Value to write to SMI CMD to enter S4BIOS state */
+ u8 reserved2; /* reserved - must be zero */
+ u64 smi_cmd; /* Port address of SMI command port */
+ u64 pm1a_evt_blk; /* Port address of Power Mgt 1a acpi_event Reg Blk */
+ u64 pm1b_evt_blk; /* Port address of Power Mgt 1b acpi_event Reg Blk */
+ u64 pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */
+ u64 pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */
+ u64 pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */
+ u64 pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */
+ u64 gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */
+ u64 gpe1_blk; /* Port addr of General Purpose acpi_event 1 Reg Blk */
+ u8 pm1_evt_len; /* Byte length of ports at pm1_x_evt_blk */
+ u8 pm1_cnt_len; /* Byte length of ports at pm1_x_cnt_blk */
+ u8 pm2_cnt_len; /* Byte Length of ports at pm2_cnt_blk */
+ u8 pm_tm_len; /* Byte Length of ports at pm_tm_blk */
+ u8 gpe0_blk_len; /* Byte Length of ports at gpe0_blk */
+ u8 gpe1_blk_len; /* Byte Length of ports at gpe1_blk */
+ u8 gpe1_base; /* offset in gpe model where gpe1 events start */
+ u8 reserved3; /* reserved */
+ u16 plvl2_lat; /* worst case HW latency to enter/exit C2 state */
+ u16 plvl3_lat; /* worst case HW latency to enter/exit C3 state */
+ u8 day_alrm; /* index to day-of-month alarm in RTC CMOS RAM */
+ u8 mon_alrm; /* index to month-of-year alarm in RTC CMOS RAM */
+ u8 century; /* index to century in RTC CMOS RAM */
+ u8 reserved4; /* reserved */
+ u32 flush_cash : 1; /* PAL_FLUSH_CACHE is correctly supported */
+ u32 reserved5 : 1; /* reserved - must be zero */
+ u32 proc_c1 : 1; /* all processors support C1 state */
+ u32 plvl2_up : 1; /* C2 state works on MP system */
+ u32 pwr_button : 1; /* Power button is handled as a generic feature */
+ u32 sleep_button : 1; /* Sleep button is handled as a generic feature, or not present */
+ u32 fixed_rTC : 1; /* RTC wakeup stat not in fixed register space */
+ u32 rtcs4 : 1; /* RTC wakeup stat not possible from S4 */
+ u32 tmr_val_ext : 1; /* tmr_val is 32 bits */
+ u32 dock_cap : 1; /* Supports Docking */
+ u32 reserved6 : 22; /* reserved - must be zero */
+};
#pragma pack()
diff --git a/drivers/acpi/include/actypes.h b/drivers/acpi/include/actypes.h
index 71696454d00e..16a213377ec2 100644
--- a/drivers/acpi/include/actypes.h
+++ b/drivers/acpi/include/actypes.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -90,13 +90,13 @@ typedef COMPILER_DEPENDENT_UINT64 UINT64;
/*! [End] no source code translation !*/
-typedef s64 acpi_native_int;
-typedef u64 acpi_native_uint;
+typedef s64 acpi_native_int;
+typedef u64 acpi_native_uint;
-typedef u64 acpi_table_ptr;
-typedef u64 acpi_io_address;
-typedef u64 acpi_physical_address;
-typedef u64 acpi_size;
+typedef u64 acpi_table_ptr;
+typedef u64 acpi_io_address;
+typedef u64 acpi_physical_address;
+typedef u64 acpi_size;
#define ALIGNED_ADDRESS_BOUNDARY 0x00000008 /* No hardware alignment support in IA64 */
#define ACPI_USE_NATIVE_DIVIDE /* Native 64-bit integer support */
@@ -118,22 +118,21 @@ typedef long INT32;
typedef int INT16;
typedef unsigned long UINT32;
-typedef struct
+struct
{
UINT32 Lo;
UINT32 Hi;
-
-} UINT64;
+};
/*! [End] no source code translation !*/
-typedef u16 acpi_native_uint;
-typedef s16 acpi_native_int;
+typedef u16 acpi_native_uint;
+typedef s16 acpi_native_int;
-typedef u32 acpi_table_ptr;
-typedef u32 acpi_io_address;
-typedef char *acpi_physical_address;
-typedef u16 acpi_size;
+typedef u32 acpi_table_ptr;
+typedef u32 acpi_io_address;
+typedef char *acpi_physical_address;
+typedef u16 acpi_size;
#define ALIGNED_ADDRESS_BOUNDARY 0x00000002
#define _HW_ALIGNMENT_SUPPORT
@@ -165,13 +164,13 @@ typedef COMPILER_DEPENDENT_UINT64 UINT64;
/*! [End] no source code translation !*/
-typedef s32 acpi_native_int;
-typedef u32 acpi_native_uint;
+typedef s32 acpi_native_int;
+typedef u32 acpi_native_uint;
-typedef u64 acpi_table_ptr;
-typedef u32 acpi_io_address;
-typedef u64 acpi_physical_address;
-typedef u32 acpi_size;
+typedef u64 acpi_table_ptr;
+typedef u32 acpi_io_address;
+typedef u64 acpi_physical_address;
+typedef u32 acpi_size;
#define ALIGNED_ADDRESS_BOUNDARY 0x00000004
#define _HW_ALIGNMENT_SUPPORT
@@ -186,27 +185,25 @@ typedef u32 acpi_size;
/*
* Miscellaneous common types
*/
-typedef u32 UINT32_BIT;
-typedef acpi_native_uint ACPI_PTRDIFF;
+typedef u32 UINT32_BIT;
+typedef acpi_native_uint ACPI_PTRDIFF;
/*
* Pointer overlays to avoid lots of typecasting for
* code that accepts both physical and logical pointers.
*/
-typedef union acpi_ptrs
+union acpi_pointers
{
- acpi_physical_address physical;
- void *logical;
- acpi_table_ptr value;
-
-} acpi_pointers;
+ acpi_physical_address physical;
+ void *logical;
+ acpi_table_ptr value;
+};
-typedef struct acpi_pointer
+struct acpi_pointer
{
- u32 pointer_type;
- union acpi_ptrs pointer;
-
-} acpi_pointer;
+ u32 pointer_type;
+ union acpi_pointers pointer;
+};
/* pointer_types for above */
@@ -245,31 +242,28 @@ typedef struct acpi_pointer
/*
* Local datatypes
*/
-typedef u32 acpi_status; /* All ACPI Exceptions */
-typedef u32 acpi_name; /* 4-byte ACPI name */
-typedef char* acpi_string; /* Null terminated ASCII string */
-typedef void* acpi_handle; /* Actually a ptr to an Node */
+typedef u32 acpi_status; /* All ACPI Exceptions */
+typedef u32 acpi_name; /* 4-byte ACPI name */
+typedef char * acpi_string; /* Null terminated ASCII string */
+typedef void * acpi_handle; /* Actually a ptr to an Node */
-typedef struct
+struct uint64_struct
{
- u32 lo;
- u32 hi;
+ u32 lo;
+ u32 hi;
+};
-} uint64_struct;
-
-typedef union
+union uint64_overlay
{
- u64 full;
- uint64_struct part;
-
-} uint64_overlay;
+ u64 full;
+ struct uint64_struct part;
+};
-typedef struct
+struct uint32_struct
{
- u32 lo;
- u32 hi;
-
-} uint32_struct;
+ u32 lo;
+ u32 hi;
+};
/*
@@ -283,7 +277,7 @@ typedef struct
/* 32-bit integers only, no 64-bit support */
-typedef u32 acpi_integer;
+typedef u32 acpi_integer;
#define ACPI_INTEGER_MAX ACPI_UINT32_MAX
#define ACPI_INTEGER_BIT_SIZE 32
#define ACPI_MAX_BCD_VALUE 99999999
@@ -297,7 +291,7 @@ typedef u32 acpi_integer;
/* 64-bit integers */
-typedef u64 acpi_integer;
+typedef u64 acpi_integer;
#define ACPI_INTEGER_MAX ACPI_UINT64_MAX
#define ACPI_INTEGER_BIT_SIZE 64
#define ACPI_MAX_BCD_VALUE 9999999999999999
@@ -384,7 +378,7 @@ typedef u64 acpi_integer;
/*
* Table types. These values are passed to the table related APIs
*/
-typedef u32 acpi_table_type;
+typedef u32 acpi_table_type;
#define ACPI_TABLE_RSDP (acpi_table_type) 0
#define ACPI_TABLE_DSDT (acpi_table_type) 1
@@ -406,7 +400,7 @@ typedef u32 acpi_table_type;
* Types must be kept in sync with the global acpi_ns_properties
* and acpi_ns_type_names arrays.
*/
-typedef u32 acpi_object_type;
+typedef u32 acpi_object_type;
#define ACPI_TYPE_ANY 0x00
#define ACPI_TYPE_INTEGER 0x01 /* Byte/Word/Dword/Zero/One/Ones */
@@ -450,7 +444,7 @@ typedef u32 acpi_object_type;
/*
* These are special object types that never appear in
- * a Namespace node, only in an acpi_operand_object
+ * a Namespace node, only in an union acpi_operand_object
*/
#define ACPI_TYPE_LOCAL_EXTRA 0x1B
#define ACPI_TYPE_LOCAL_DATA 0x1C
@@ -505,7 +499,7 @@ typedef u32 acpi_object_type;
/*
* acpi_event Types: Fixed & General Purpose
*/
-typedef u32 acpi_event_type;
+typedef u32 acpi_event_type;
#define ACPI_EVENT_FIXED 0
#define ACPI_EVENT_GPE 1
@@ -550,7 +544,7 @@ typedef u32 acpi_event_type;
* | +----- Set?
* +----------- <Reserved>
*/
-typedef u32 acpi_event_status;
+typedef u32 acpi_event_status;
#define ACPI_EVENT_FLAG_DISABLED (acpi_event_status) 0x00
#define ACPI_EVENT_FLAG_ENABLED (acpi_event_status) 0x01
@@ -569,7 +563,7 @@ typedef u32 acpi_event_status;
/* Address Space (Operation Region) Types */
-typedef u8 acpi_adr_space_type;
+typedef u8 acpi_adr_space_type;
#define ACPI_ADR_SPACE_SYSTEM_MEMORY (acpi_adr_space_type) 0
#define ACPI_ADR_SPACE_SYSTEM_IO (acpi_adr_space_type) 1
@@ -579,6 +573,7 @@ typedef u8 acpi_adr_space_type;
#define ACPI_ADR_SPACE_CMOS (acpi_adr_space_type) 5
#define ACPI_ADR_SPACE_PCI_BAR_TARGET (acpi_adr_space_type) 6
#define ACPI_ADR_SPACE_DATA_TABLE (acpi_adr_space_type) 7
+#define ACPI_ADR_SPACE_FIXED_HARDWARE (acpi_adr_space_type) 127
/*
@@ -616,70 +611,68 @@ typedef u8 acpi_adr_space_type;
/*
* External ACPI object definition
*/
-typedef union acpi_obj
+union acpi_object
{
- acpi_object_type type; /* See definition of acpi_ns_type for values */
+ acpi_object_type type; /* See definition of acpi_ns_type for values */
struct
{
- acpi_object_type type;
- acpi_integer value; /* The actual number */
+ acpi_object_type type;
+ acpi_integer value; /* The actual number */
} integer;
struct
{
- acpi_object_type type;
- u32 length; /* # of bytes in string, excluding trailing null */
- char *pointer; /* points to the string value */
+ acpi_object_type type;
+ u32 length; /* # of bytes in string, excluding trailing null */
+ char *pointer; /* points to the string value */
} string;
struct
{
- acpi_object_type type;
- u32 length; /* # of bytes in buffer */
- u8 *pointer; /* points to the buffer */
+ acpi_object_type type;
+ u32 length; /* # of bytes in buffer */
+ u8 *pointer; /* points to the buffer */
} buffer;
struct
{
- acpi_object_type type;
- u32 fill1;
- acpi_handle handle; /* object reference */
+ acpi_object_type type;
+ u32 fill1;
+ acpi_handle handle; /* object reference */
} reference;
struct
{
- acpi_object_type type;
- u32 count; /* # of elements in package */
- union acpi_obj *elements; /* Pointer to an array of ACPI_OBJECTs */
+ acpi_object_type type;
+ u32 count; /* # of elements in package */
+ union acpi_object *elements; /* Pointer to an array of ACPI_OBJECTs */
} package;
struct
{
- acpi_object_type type;
- u32 proc_id;
- acpi_io_address pblk_address;
- u32 pblk_length;
+ acpi_object_type type;
+ u32 proc_id;
+ acpi_io_address pblk_address;
+ u32 pblk_length;
} processor;
struct
{
- acpi_object_type type;
- u32 system_level;
- u32 resource_order;
+ acpi_object_type type;
+ u32 system_level;
+ u32 resource_order;
} power_resource;
-
-} acpi_object;
+};
/*
* List of objects, used as a parameter list for control method evaluation
*/
-typedef struct acpi_obj_list
+struct acpi_object_list
{
- u32 count;
- acpi_object *pointer;
-
-} acpi_object_list;
+ u32 count;
+ union acpi_object *pointer;
+};
/*
@@ -689,12 +682,11 @@ typedef struct acpi_obj_list
#define ACPI_ALLOCATE_BUFFER (acpi_size) (-1)
#define ACPI_ALLOCATE_LOCAL_BUFFER (acpi_size) (-2)
-typedef struct
+struct acpi_buffer
{
- acpi_size length; /* Length in bytes of the buffer */
- void *pointer; /* pointer to buffer */
-
-} acpi_buffer;
+ acpi_size length; /* Length in bytes of the buffer */
+ void *pointer; /* pointer to buffer */
+};
/*
@@ -717,29 +709,27 @@ typedef struct
/*
* ACPI Table Info. One per ACPI table _type_
*/
-typedef struct acpi_table_info
+struct acpi_table_info
{
- u32 count;
-
-} acpi_table_info;
+ u32 count;
+};
/*
* System info returned by acpi_get_system_info()
*/
-typedef struct _acpi_sys_info
+struct acpi_system_info
{
- u32 acpi_ca_version;
- u32 flags;
- u32 timer_resolution;
- u32 reserved1;
- u32 reserved2;
- u32 debug_level;
- u32 debug_layer;
- u32 num_table_types;
- acpi_table_info table_info [NUM_ACPI_TABLES];
-
-} acpi_system_info;
+ u32 acpi_ca_version;
+ u32 flags;
+ u32 timer_resolution;
+ u32 reserved1;
+ u32 reserved2;
+ u32 debug_level;
+ u32 debug_layer;
+ u32 num_table_types;
+ struct acpi_table_info table_info [NUM_ACPI_TABLES];
+};
/*
@@ -747,28 +737,28 @@ typedef struct _acpi_sys_info
*/
typedef
u32 (*acpi_event_handler) (
- void *context);
+ void *context);
typedef
void (*acpi_gpe_handler) (
- void *context);
+ void *context);
typedef
void (*acpi_notify_handler) (
- acpi_handle device,
- u32 value,
- void *context);
+ acpi_handle device,
+ u32 value,
+ void *context);
typedef
void (*acpi_object_handler) (
- acpi_handle object,
- u32 function,
- void *data);
+ acpi_handle object,
+ u32 function,
+ void *data);
typedef
acpi_status (*acpi_init_handler) (
- acpi_handle object,
- u32 function);
+ acpi_handle object,
+ u32 function);
#define ACPI_INIT_DEVICE_INI 1
@@ -777,32 +767,32 @@ acpi_status (*acpi_init_handler) (
typedef
acpi_status (*acpi_adr_space_handler) (
- u32 function,
- acpi_physical_address address,
- u32 bit_width,
- acpi_integer *value,
- void *handler_context,
- void *region_context);
+ u32 function,
+ acpi_physical_address address,
+ u32 bit_width,
+ acpi_integer *value,
+ void *handler_context,
+ void *region_context);
#define ACPI_DEFAULT_HANDLER NULL
typedef
acpi_status (*acpi_adr_space_setup) (
- acpi_handle region_handle,
- u32 function,
- void *handler_context,
- void **region_context);
+ acpi_handle region_handle,
+ u32 function,
+ void *handler_context,
+ void **region_context);
#define ACPI_REGION_ACTIVATE 0
#define ACPI_REGION_DEACTIVATE 1
typedef
acpi_status (*acpi_walk_callback) (
- acpi_handle obj_handle,
- u32 nesting_level,
- void *context,
- void **return_value);
+ acpi_handle obj_handle,
+ u32 nesting_level,
+ void *context,
+ void **return_value);
/* Interrupt handler return values */
@@ -820,47 +810,47 @@ acpi_status (*acpi_walk_callback) (
#define ACPI_COMMON_OBJ_INFO \
- acpi_object_type type; /* ACPI object type */ \
- acpi_name name /* ACPI object Name */
+ acpi_object_type type; /* ACPI object type */ \
+ acpi_name name /* ACPI object Name */
-typedef struct
+struct acpi_obj_info_header
{
ACPI_COMMON_OBJ_INFO;
-} acpi_obj_info_header;
+};
-typedef struct
+struct acpi_device_info
{
ACPI_COMMON_OBJ_INFO;
- u32 valid; /* Are the next bits legit? */
- char hardware_id[9]; /* _HID value if any */
- char unique_id[9]; /* _UID value if any */
- acpi_integer address; /* _ADR value if any */
- u32 current_status; /* _STA value */
-} acpi_device_info;
+ u32 valid; /* Are the next bits legit? */
+ char hardware_id[9]; /* _HID value if any */
+ char unique_id[9]; /* _UID value if any */
+ acpi_integer address; /* _ADR value if any */
+ u32 current_status; /* _STA value */
+};
/* Context structs for address space handlers */
-typedef struct
+struct acpi_pci_id
{
- u16 segment;
- u16 bus;
- u16 device;
- u16 function;
-} acpi_pci_id;
+ u16 segment;
+ u16 bus;
+ u16 device;
+ u16 function;
+};
-typedef struct
+struct acpi_mem_space_context
{
- u32 length;
- acpi_physical_address address;
- acpi_physical_address mapped_physical_address;
- u8 *mapped_logical_address;
- acpi_size mapped_length;
-} acpi_mem_space_context;
+ u32 length;
+ acpi_physical_address address;
+ acpi_physical_address mapped_physical_address;
+ u8 *mapped_logical_address;
+ acpi_size mapped_length;
+};
/*
@@ -947,195 +937,176 @@ typedef struct
/*
* Structures used to describe device resources
*/
-typedef struct
+struct acpi_resource_irq
{
- u32 edge_level;
- u32 active_high_low;
- u32 shared_exclusive;
- u32 number_of_interrupts;
- u32 interrupts[1];
-
-} acpi_resource_irq;
-
-typedef struct
+ u32 edge_level;
+ u32 active_high_low;
+ u32 shared_exclusive;
+ u32 number_of_interrupts;
+ u32 interrupts[1];
+};
+
+struct acpi_resource_dma
{
- u32 type;
- u32 bus_master;
- u32 transfer;
- u32 number_of_channels;
- u32 channels[1];
-
-} acpi_resource_dma;
-
-typedef struct
+ u32 type;
+ u32 bus_master;
+ u32 transfer;
+ u32 number_of_channels;
+ u32 channels[1];
+};
+
+struct acpi_resource_start_dpf
{
- u32 compatibility_priority;
- u32 performance_robustness;
-
-} acpi_resource_start_dpf;
+ u32 compatibility_priority;
+ u32 performance_robustness;
+};
/*
* END_DEPENDENT_FUNCTIONS_RESOURCE struct is not
* needed because it has no fields
*/
-typedef struct
+struct acpi_resource_io
{
- u32 io_decode;
- u32 min_base_address;
- u32 max_base_address;
- u32 alignment;
- u32 range_length;
-
-} acpi_resource_io;
-
-typedef struct
+ u32 io_decode;
+ u32 min_base_address;
+ u32 max_base_address;
+ u32 alignment;
+ u32 range_length;
+};
+
+struct acpi_resource_fixed_io
{
- u32 base_address;
- u32 range_length;
-
-} acpi_resource_fixed_io;
+ u32 base_address;
+ u32 range_length;
+};
-typedef struct
+struct acpi_resource_vendor
{
- u32 length;
- u8 reserved[1];
-
-} acpi_resource_vendor;
+ u32 length;
+ u8 reserved[1];
+};
-typedef struct
+struct acpi_resource_end_tag
{
- u8 checksum;
+ u8 checksum;
+};
-} acpi_resource_end_tag;
-
-typedef struct
+struct acpi_resource_mem24
{
- u32 read_write_attribute;
- u32 min_base_address;
- u32 max_base_address;
- u32 alignment;
- u32 range_length;
-
-} acpi_resource_mem24;
-
-typedef struct
+ u32 read_write_attribute;
+ u32 min_base_address;
+ u32 max_base_address;
+ u32 alignment;
+ u32 range_length;
+};
+
+struct acpi_resource_mem32
{
- u32 read_write_attribute;
- u32 min_base_address;
- u32 max_base_address;
- u32 alignment;
- u32 range_length;
-
-} acpi_resource_mem32;
-
-typedef struct
+ u32 read_write_attribute;
+ u32 min_base_address;
+ u32 max_base_address;
+ u32 alignment;
+ u32 range_length;
+};
+
+struct acpi_resource_fixed_mem32
{
- u32 read_write_attribute;
- u32 range_base_address;
- u32 range_length;
-
-} acpi_resource_fixed_mem32;
+ u32 read_write_attribute;
+ u32 range_base_address;
+ u32 range_length;
+};
-typedef struct
+struct acpi_memory_attribute
{
- u16 cache_attribute;
- u16 read_write_attribute;
+ u16 cache_attribute;
+ u16 read_write_attribute;
+};
-} acpi_memory_attribute;
-
-typedef struct
+struct acpi_io_attribute
{
- u16 range_attribute;
- u16 reserved;
-
-} acpi_io_attribute;
+ u16 range_attribute;
+ u16 reserved;
+};
-typedef struct
+struct acpi_bus_attribute
{
- u16 reserved1;
- u16 reserved2;
+ u16 reserved1;
+ u16 reserved2;
+};
-} acpi_bus_attribute;
-
-typedef union
+union acpi_resource_attribute
{
- acpi_memory_attribute memory;
- acpi_io_attribute io;
- acpi_bus_attribute bus;
-
-} acpi_resource_attribute;
+ struct acpi_memory_attribute memory;
+ struct acpi_io_attribute io;
+ struct acpi_bus_attribute bus;
+};
-typedef struct
+struct acpi_resource_source
{
- u32 index;
- u32 string_length;
- char *string_ptr;
+ u32 index;
+ u32 string_length;
+ char *string_ptr;
+};
-} acpi_resource_source;
-
-typedef struct
+struct acpi_resource_address16
{
- u32 resource_type;
- u32 producer_consumer;
- u32 decode;
- u32 min_address_fixed;
- u32 max_address_fixed;
- acpi_resource_attribute attribute;
- u32 granularity;
- u32 min_address_range;
- u32 max_address_range;
- u32 address_translation_offset;
- u32 address_length;
- acpi_resource_source resource_source;
-
-} acpi_resource_address16;
-
-typedef struct
+ u32 resource_type;
+ u32 producer_consumer;
+ u32 decode;
+ u32 min_address_fixed;
+ u32 max_address_fixed;
+ union acpi_resource_attribute attribute;
+ u32 granularity;
+ u32 min_address_range;
+ u32 max_address_range;
+ u32 address_translation_offset;
+ u32 address_length;
+ struct acpi_resource_source resource_source;
+};
+
+struct acpi_resource_address32
{
- u32 resource_type;
- u32 producer_consumer;
- u32 decode;
- u32 min_address_fixed;
- u32 max_address_fixed;
- acpi_resource_attribute attribute;
- u32 granularity;
- u32 min_address_range;
- u32 max_address_range;
- u32 address_translation_offset;
- u32 address_length;
- acpi_resource_source resource_source;
-
-} acpi_resource_address32;
-
-typedef struct
+ u32 resource_type;
+ u32 producer_consumer;
+ u32 decode;
+ u32 min_address_fixed;
+ u32 max_address_fixed;
+ union acpi_resource_attribute attribute;
+ u32 granularity;
+ u32 min_address_range;
+ u32 max_address_range;
+ u32 address_translation_offset;
+ u32 address_length;
+ struct acpi_resource_source resource_source;
+};
+
+struct acpi_resource_address64
{
- u32 resource_type;
- u32 producer_consumer;
- u32 decode;
- u32 min_address_fixed;
- u32 max_address_fixed;
- acpi_resource_attribute attribute;
- u64 granularity;
- u64 min_address_range;
- u64 max_address_range;
- u64 address_translation_offset;
- u64 address_length;
- acpi_resource_source resource_source;
-
-} acpi_resource_address64;
-
-typedef struct
+ u32 resource_type;
+ u32 producer_consumer;
+ u32 decode;
+ u32 min_address_fixed;
+ u32 max_address_fixed;
+ union acpi_resource_attribute attribute;
+ u64 granularity;
+ u64 min_address_range;
+ u64 max_address_range;
+ u64 address_translation_offset;
+ u64 address_length;
+ struct acpi_resource_source resource_source;
+};
+
+struct acpi_resource_ext_irq
{
- u32 producer_consumer;
- u32 edge_level;
- u32 active_high_low;
- u32 shared_exclusive;
- u32 number_of_interrupts;
- acpi_resource_source resource_source;
- u32 interrupts[1];
-
-} acpi_resource_ext_irq;
+ u32 producer_consumer;
+ u32 edge_level;
+ u32 active_high_low;
+ u32 shared_exclusive;
+ u32 number_of_interrupts;
+ struct acpi_resource_source resource_source;
+ u32 interrupts[1];
+};
/* ACPI_RESOURCE_TYPEs */
@@ -1156,41 +1127,39 @@ typedef struct
#define ACPI_RSTYPE_ADDRESS64 13
#define ACPI_RSTYPE_EXT_IRQ 14
-typedef u32 acpi_resource_type;
+typedef u32 acpi_resource_type;
-typedef union
+union acpi_resource_data
{
- acpi_resource_irq irq;
- acpi_resource_dma dma;
- acpi_resource_start_dpf start_dpf;
- acpi_resource_io io;
- acpi_resource_fixed_io fixed_io;
- acpi_resource_vendor vendor_specific;
- acpi_resource_end_tag end_tag;
- acpi_resource_mem24 memory24;
- acpi_resource_mem32 memory32;
- acpi_resource_fixed_mem32 fixed_memory32;
- acpi_resource_address16 address16;
- acpi_resource_address32 address32;
- acpi_resource_address64 address64;
- acpi_resource_ext_irq extended_irq;
-
-} acpi_resource_data;
-
-typedef struct acpi_resource
+ struct acpi_resource_irq irq;
+ struct acpi_resource_dma dma;
+ struct acpi_resource_start_dpf start_dpf;
+ struct acpi_resource_io io;
+ struct acpi_resource_fixed_io fixed_io;
+ struct acpi_resource_vendor vendor_specific;
+ struct acpi_resource_end_tag end_tag;
+ struct acpi_resource_mem24 memory24;
+ struct acpi_resource_mem32 memory32;
+ struct acpi_resource_fixed_mem32 fixed_memory32;
+ struct acpi_resource_address16 address16;
+ struct acpi_resource_address32 address32;
+ struct acpi_resource_address64 address64;
+ struct acpi_resource_ext_irq extended_irq;
+};
+
+struct acpi_resource
{
- acpi_resource_type id;
- u32 length;
- acpi_resource_data data;
-
-} acpi_resource;
+ acpi_resource_type id;
+ u32 length;
+ union acpi_resource_data data;
+};
#define ACPI_RESOURCE_LENGTH 12
#define ACPI_RESOURCE_LENGTH_NO_DATA 8 /* Id + Length fields */
#define ACPI_SIZEOF_RESOURCE(type) (ACPI_RESOURCE_LENGTH_NO_DATA + sizeof (type))
-#define ACPI_NEXT_RESOURCE(res) (acpi_resource *)((u8 *) res + res->length)
+#define ACPI_NEXT_RESOURCE(res) (struct acpi_resource *)((u8 *) res + res->length)
#ifdef _HW_ALIGNMENT_SUPPORT
#define ACPI_ALIGN_RESOURCE_SIZE(length) (length)
@@ -1203,15 +1172,14 @@ typedef struct acpi_resource
*/
-typedef struct acpi_pci_routing_table
+struct acpi_pci_routing_table
{
- u32 length;
- u32 pin;
- acpi_integer address; /* here for 64-bit alignment */
- u32 source_index;
- char source[4]; /* pad to 64 bits so sizeof() works in all cases */
-
-} acpi_pci_routing_table;
+ u32 length;
+ u32 pin;
+ acpi_integer address; /* here for 64-bit alignment */
+ u32 source_index;
+ char source[4]; /* pad to 64 bits so sizeof() works in all cases */
+};
/*
* END: of definitions for PCI Routing tables
diff --git a/drivers/acpi/include/acutils.h b/drivers/acpi/include/acutils.h
index d63f158e0564..8ef73e7a3889 100644
--- a/drivers/acpi/include/acutils.h
+++ b/drivers/acpi/include/acutils.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -28,27 +28,27 @@
typedef
acpi_status (*acpi_pkg_callback) (
- u8 object_type,
- acpi_operand_object *source_object,
- acpi_generic_state *state,
- void *context);
+ u8 object_type,
+ union acpi_operand_object *source_object,
+ union acpi_generic_state *state,
+ void *context);
acpi_status
acpi_ut_walk_package_tree (
- acpi_operand_object *source_object,
- void *target_object,
- acpi_pkg_callback walk_callback,
- void *context);
+ union acpi_operand_object *source_object,
+ void *target_object,
+ acpi_pkg_callback walk_callback,
+ void *context);
-typedef struct acpi_pkg_info
+struct acpi_pkg_info
{
- u8 *free_space;
- acpi_size length;
- u32 object_space;
- u32 num_packages;
-} acpi_pkg_info;
+ u8 *free_space;
+ acpi_size length;
+ u32 object_space;
+ u32 num_packages;
+};
#define REF_INCREMENT (u16) 0
#define REF_DECREMENT (u16) 1
@@ -97,38 +97,38 @@ acpi_ut_validate_fadt (
char *
acpi_ut_get_mutex_name (
- u32 mutex_id);
+ u32 mutex_id);
#endif
char *
acpi_ut_get_type_name (
- acpi_object_type type);
+ acpi_object_type type);
char *
acpi_ut_get_object_type_name (
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
char *
acpi_ut_get_region_name (
- u8 space_id);
+ u8 space_id);
char *
acpi_ut_get_event_name (
- u32 event_id);
+ u32 event_id);
char
acpi_ut_hex_to_ascii_char (
- acpi_integer integer,
- u32 position);
+ acpi_integer integer,
+ u32 position);
u8
acpi_ut_valid_object_type (
- acpi_object_type type);
+ acpi_object_type type);
acpi_owner_id
acpi_ut_allocate_owner_id (
- u32 id_type);
+ u32 id_type);
/*
@@ -139,71 +139,71 @@ acpi_ut_allocate_owner_id (
acpi_size
acpi_ut_strlen (
- const char *string);
+ const char *string);
char *
acpi_ut_strcpy (
- char *dst_string,
- const char *src_string);
+ char *dst_string,
+ const char *src_string);
char *
acpi_ut_strncpy (
- char *dst_string,
- const char *src_string,
- acpi_size count);
+ char *dst_string,
+ const char *src_string,
+ acpi_size count);
int
acpi_ut_strncmp (
- const char *string1,
- const char *string2,
- acpi_size count);
+ const char *string1,
+ const char *string2,
+ acpi_size count);
int
acpi_ut_strcmp (
- const char *string1,
- const char *string2);
+ const char *string1,
+ const char *string2);
char *
acpi_ut_strcat (
- char *dst_string,
- const char *src_string);
+ char *dst_string,
+ const char *src_string);
char *
acpi_ut_strncat (
- char *dst_string,
- const char *src_string,
- acpi_size count);
+ char *dst_string,
+ const char *src_string,
+ acpi_size count);
u32
acpi_ut_strtoul (
- const char *string,
- char **terminator,
- u32 base);
+ const char *string,
+ char **terminator,
+ u32 base);
char *
acpi_ut_strstr (
- char *string1,
- char *string2);
+ char *string1,
+ char *string2);
void *
acpi_ut_memcpy (
- void *dest,
- const void *src,
- acpi_size count);
+ void *dest,
+ const void *src,
+ acpi_size count);
void *
acpi_ut_memset (
- void *dest,
- acpi_native_uint value,
- acpi_size count);
+ void *dest,
+ acpi_native_uint value,
+ acpi_size count);
int
acpi_ut_to_upper (
- int c);
+ int c);
int
acpi_ut_to_lower (
- int c);
+ int c);
extern const u8 _acpi_ctype[];
@@ -235,67 +235,67 @@ extern const u8 _acpi_ctype[];
acpi_status
acpi_ut_build_simple_object(
- acpi_operand_object *obj,
- acpi_object *user_obj,
- u8 *data_space,
- u32 *buffer_space_used);
+ union acpi_operand_object *obj,
+ union acpi_object *user_obj,
+ u8 *data_space,
+ u32 *buffer_space_used);
acpi_status
acpi_ut_build_package_object (
- acpi_operand_object *obj,
- u8 *buffer,
- u32 *space_used);
+ union acpi_operand_object *obj,
+ u8 *buffer,
+ u32 *space_used);
acpi_status
acpi_ut_copy_ielement_to_eelement (
- u8 object_type,
- acpi_operand_object *source_object,
- acpi_generic_state *state,
- void *context);
+ u8 object_type,
+ union acpi_operand_object *source_object,
+ union acpi_generic_state *state,
+ void *context);
acpi_status
acpi_ut_copy_ielement_to_ielement (
- u8 object_type,
- acpi_operand_object *source_object,
- acpi_generic_state *state,
- void *context);
+ u8 object_type,
+ union acpi_operand_object *source_object,
+ union acpi_generic_state *state,
+ void *context);
acpi_status
acpi_ut_copy_iobject_to_eobject (
- acpi_operand_object *obj,
- acpi_buffer *ret_buffer);
+ union acpi_operand_object *obj,
+ struct acpi_buffer *ret_buffer);
acpi_status
acpi_ut_copy_esimple_to_isimple(
- acpi_object *user_obj,
- acpi_operand_object **return_obj);
+ union acpi_object *user_obj,
+ union acpi_operand_object **return_obj);
acpi_status
acpi_ut_copy_eobject_to_iobject (
- acpi_object *obj,
- acpi_operand_object **internal_obj);
+ union acpi_object *obj,
+ union acpi_operand_object **internal_obj);
acpi_status
acpi_ut_copy_isimple_to_isimple (
- acpi_operand_object *source_obj,
- acpi_operand_object *dest_obj);
+ union acpi_operand_object *source_obj,
+ union acpi_operand_object *dest_obj);
acpi_status
acpi_ut_copy_ipackage_to_ipackage (
- acpi_operand_object *source_obj,
- acpi_operand_object *dest_obj,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *source_obj,
+ union acpi_operand_object *dest_obj,
+ struct acpi_walk_state *walk_state);
acpi_status
acpi_ut_copy_simple_object (
- acpi_operand_object *source_desc,
- acpi_operand_object *dest_desc);
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *dest_desc);
acpi_status
acpi_ut_copy_iobject_to_iobject (
- acpi_operand_object *source_desc,
- acpi_operand_object **dest_desc,
- acpi_walk_state *walk_state);
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object **dest_desc,
+ struct acpi_walk_state *walk_state);
/*
@@ -304,8 +304,8 @@ acpi_ut_copy_iobject_to_iobject (
acpi_status
acpi_ut_update_object_reference (
- acpi_operand_object *object,
- u16 action);
+ union acpi_operand_object *object,
+ u16 action);
/*
@@ -322,89 +322,89 @@ acpi_ut_track_stack_ptr (
void
acpi_ut_trace (
- u32 line_number,
- acpi_debug_print_info *dbg_info);
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info);
void
acpi_ut_trace_ptr (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- void *pointer);
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ void *pointer);
void
acpi_ut_trace_u32 (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- u32 integer);
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ u32 integer);
void
acpi_ut_trace_str (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- char *string);
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ char *string);
void
acpi_ut_exit (
- u32 line_number,
- acpi_debug_print_info *dbg_info);
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info);
void
acpi_ut_status_exit (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- acpi_status status);
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ acpi_status status);
void
acpi_ut_value_exit (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- acpi_integer value);
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ acpi_integer value);
void
acpi_ut_ptr_exit (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- u8 *ptr);
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ u8 *ptr);
void
acpi_ut_report_info (
- char *module_name,
- u32 line_number,
- u32 component_id);
+ char *module_name,
+ u32 line_number,
+ u32 component_id);
void
acpi_ut_report_error (
- char *module_name,
- u32 line_number,
- u32 component_id);
+ char *module_name,
+ u32 line_number,
+ u32 component_id);
void
acpi_ut_report_warning (
- char *module_name,
- u32 line_number,
- u32 component_id);
+ char *module_name,
+ u32 line_number,
+ u32 component_id);
void
acpi_ut_dump_buffer (
- u8 *buffer,
- u32 count,
- u32 display,
- u32 component_id);
+ u8 *buffer,
+ u32 count,
+ u32 display,
+ u32 component_id);
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_debug_print (
- u32 requested_debug_level,
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- char *format,
+ u32 requested_debug_level,
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ char *format,
...) ACPI_PRINTF_LIKE_FUNC;
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_debug_print_raw (
- u32 requested_debug_level,
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- char *format,
+ u32 requested_debug_level,
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ char *format,
...) ACPI_PRINTF_LIKE_FUNC;
@@ -414,19 +414,19 @@ acpi_ut_debug_print_raw (
void
acpi_ut_delete_internal_obj (
- acpi_operand_object *object);
+ union acpi_operand_object *object);
void
acpi_ut_delete_internal_package_object (
- acpi_operand_object *object);
+ union acpi_operand_object *object);
void
acpi_ut_delete_internal_simple_object (
- acpi_operand_object *object);
+ union acpi_operand_object *object);
void
acpi_ut_delete_internal_object_list (
- acpi_operand_object **obj_list);
+ union acpi_operand_object **obj_list);
/*
@@ -448,36 +448,36 @@ acpi_ut_delete_internal_object_list (
acpi_status
acpi_ut_evaluate_object (
- acpi_namespace_node *prefix_node,
- char *path,
- u32 expected_return_btypes,
- acpi_operand_object **return_desc);
+ struct acpi_namespace_node *prefix_node,
+ char *path,
+ u32 expected_return_btypes,
+ union acpi_operand_object **return_desc);
acpi_status
acpi_ut_evaluate_numeric_object (
- char *object_name,
- acpi_namespace_node *device_node,
- acpi_integer *address);
+ char *object_name,
+ struct acpi_namespace_node *device_node,
+ acpi_integer *address);
acpi_status
acpi_ut_execute_HID (
- acpi_namespace_node *device_node,
- acpi_device_id *hid);
+ struct acpi_namespace_node *device_node,
+ struct acpi_device_id *hid);
acpi_status
acpi_ut_execute_CID (
- acpi_namespace_node *device_node,
- acpi_device_id *cid);
+ struct acpi_namespace_node *device_node,
+ struct acpi_device_id *cid);
acpi_status
acpi_ut_execute_STA (
- acpi_namespace_node *device_node,
- u32 *status_flags);
+ struct acpi_namespace_node *device_node,
+ u32 *status_flags);
acpi_status
acpi_ut_execute_UID (
- acpi_namespace_node *device_node,
- acpi_device_id *uid);
+ struct acpi_namespace_node *device_node,
+ struct acpi_device_id *uid);
/*
@@ -494,52 +494,52 @@ acpi_ut_mutex_terminate (
acpi_status
acpi_ut_create_mutex (
- acpi_mutex_handle mutex_id);
+ acpi_mutex_handle mutex_id);
acpi_status
acpi_ut_delete_mutex (
- acpi_mutex_handle mutex_id);
+ acpi_mutex_handle mutex_id);
acpi_status
acpi_ut_acquire_mutex (
- acpi_mutex_handle mutex_id);
+ acpi_mutex_handle mutex_id);
acpi_status
acpi_ut_release_mutex (
- acpi_mutex_handle mutex_id);
+ acpi_mutex_handle mutex_id);
/*
* ut_object - internal object create/delete/cache routines
*/
-acpi_operand_object *
+union acpi_operand_object *
acpi_ut_create_internal_object_dbg (
- char *module_name,
- u32 line_number,
- u32 component_id,
- acpi_object_type type);
+ char *module_name,
+ u32 line_number,
+ u32 component_id,
+ acpi_object_type type);
void *
acpi_ut_allocate_object_desc_dbg (
- char *module_name,
- u32 line_number,
- u32 component_id);
+ char *module_name,
+ u32 line_number,
+ u32 component_id);
#define acpi_ut_create_internal_object(t) acpi_ut_create_internal_object_dbg (_THIS_MODULE,__LINE__,_COMPONENT,t)
#define acpi_ut_allocate_object_desc() acpi_ut_allocate_object_desc_dbg (_THIS_MODULE,__LINE__,_COMPONENT)
void
acpi_ut_delete_object_desc (
- acpi_operand_object *object);
+ union acpi_operand_object *object);
u8
acpi_ut_valid_internal_object (
- void *object);
+ void *object);
-acpi_operand_object *
+union acpi_operand_object *
acpi_ut_create_buffer_object (
- acpi_size buffer_size);
+ acpi_size buffer_size);
/*
@@ -548,11 +548,11 @@ acpi_ut_create_buffer_object (
void
acpi_ut_add_reference (
- acpi_operand_object *object);
+ union acpi_operand_object *object);
void
acpi_ut_remove_reference (
- acpi_operand_object *object);
+ union acpi_operand_object *object);
/*
* ut_size - Object size routines
@@ -560,25 +560,25 @@ acpi_ut_remove_reference (
acpi_status
acpi_ut_get_simple_object_size (
- acpi_operand_object *obj,
- acpi_size *obj_length);
+ union acpi_operand_object *obj,
+ acpi_size *obj_length);
acpi_status
acpi_ut_get_package_object_size (
- acpi_operand_object *obj,
- acpi_size *obj_length);
+ union acpi_operand_object *obj,
+ acpi_size *obj_length);
acpi_status
acpi_ut_get_object_size(
- acpi_operand_object *obj,
- acpi_size *obj_length);
+ union acpi_operand_object *obj,
+ acpi_size *obj_length);
acpi_status
acpi_ut_get_element_length (
- u8 object_type,
- acpi_operand_object *source_object,
- acpi_generic_state *state,
- void *context);
+ u8 object_type,
+ union acpi_operand_object *source_object,
+ union acpi_generic_state *state,
+ void *context);
/*
@@ -587,53 +587,53 @@ acpi_ut_get_element_length (
void
acpi_ut_push_generic_state (
- acpi_generic_state **list_head,
- acpi_generic_state *state);
+ union acpi_generic_state **list_head,
+ union acpi_generic_state *state);
-acpi_generic_state *
+union acpi_generic_state *
acpi_ut_pop_generic_state (
- acpi_generic_state **list_head);
+ union acpi_generic_state **list_head);
-acpi_generic_state *
+union acpi_generic_state *
acpi_ut_create_generic_state (
void);
-acpi_thread_state *
+struct acpi_thread_state *
acpi_ut_create_thread_state (
void);
-acpi_generic_state *
+union acpi_generic_state *
acpi_ut_create_update_state (
- acpi_operand_object *object,
- u16 action);
+ union acpi_operand_object *object,
+ u16 action);
-acpi_generic_state *
+union acpi_generic_state *
acpi_ut_create_pkg_state (
- void *internal_object,
- void *external_object,
- u16 index);
+ void *internal_object,
+ void *external_object,
+ u16 index);
acpi_status
acpi_ut_create_update_state_and_push (
- acpi_operand_object *object,
- u16 action,
- acpi_generic_state **state_list);
+ union acpi_operand_object *object,
+ u16 action,
+ union acpi_generic_state **state_list);
acpi_status
acpi_ut_create_pkg_state_and_push (
- void *internal_object,
- void *external_object,
- u16 index,
- acpi_generic_state **state_list);
+ void *internal_object,
+ void *external_object,
+ u16 index,
+ union acpi_generic_state **state_list);
-acpi_generic_state *
+union acpi_generic_state *
acpi_ut_create_control_state (
void);
void
acpi_ut_delete_generic_state (
- acpi_generic_state *state);
+ union acpi_generic_state *state);
void
acpi_ut_delete_generic_state_cache (
@@ -649,64 +649,64 @@ acpi_ut_delete_object_cache (
void
acpi_ut_print_string (
- char *string,
- u8 max_length);
+ char *string,
+ u8 max_length);
acpi_status
acpi_ut_divide (
- acpi_integer *in_dividend,
- acpi_integer *in_divisor,
- acpi_integer *out_quotient,
- acpi_integer *out_remainder);
+ acpi_integer *in_dividend,
+ acpi_integer *in_divisor,
+ acpi_integer *out_quotient,
+ acpi_integer *out_remainder);
acpi_status
acpi_ut_short_divide (
- acpi_integer *in_dividend,
- u32 divisor,
- acpi_integer *out_quotient,
- u32 *out_remainder);
+ acpi_integer *in_dividend,
+ u32 divisor,
+ acpi_integer *out_quotient,
+ u32 *out_remainder);
u8
acpi_ut_valid_acpi_name (
- u32 name);
+ u32 name);
u8
acpi_ut_valid_acpi_character (
- char character);
+ char character);
acpi_status
acpi_ut_strtoul64 (
- char *string,
- u32 base,
- acpi_integer *ret_integer);
+ char *string,
+ u32 base,
+ acpi_integer *ret_integer);
char *
acpi_ut_strupr (
- char *src_string);
+ char *src_string);
u8 *
acpi_ut_get_resource_end_tag (
- acpi_operand_object *obj_desc);
+ union acpi_operand_object *obj_desc);
u8
acpi_ut_generate_checksum (
- u8 *buffer,
- u32 length);
+ u8 *buffer,
+ u32 length);
u32
acpi_ut_dword_byte_swap (
- u32 value);
+ u32 value);
void
acpi_ut_set_integer_width (
- u8 revision);
+ u8 revision);
#ifdef ACPI_DEBUG_OUTPUT
void
acpi_ut_display_init_pathname (
- u8 type,
- acpi_namespace_node *obj_handle,
- char *path);
+ u8 type,
+ struct acpi_namespace_node *obj_handle,
+ char *path);
#endif
@@ -717,89 +717,89 @@ acpi_ut_display_init_pathname (
void *
acpi_ut_acquire_from_cache (
- u32 list_id);
+ u32 list_id);
void
acpi_ut_release_to_cache (
- u32 list_id,
- void *object);
+ u32 list_id,
+ void *object);
void
acpi_ut_delete_generic_cache (
- u32 list_id);
+ u32 list_id);
acpi_status
acpi_ut_validate_buffer (
- acpi_buffer *buffer);
+ struct acpi_buffer *buffer);
acpi_status
acpi_ut_initialize_buffer (
- acpi_buffer *buffer,
- acpi_size required_length);
+ struct acpi_buffer *buffer,
+ acpi_size required_length);
/* Memory allocation functions */
void *
acpi_ut_allocate (
- acpi_size size,
- u32 component,
- char *module,
- u32 line);
+ acpi_size size,
+ u32 component,
+ char *module,
+ u32 line);
void *
acpi_ut_callocate (
- acpi_size size,
- u32 component,
- char *module,
- u32 line);
+ acpi_size size,
+ u32 component,
+ char *module,
+ u32 line);
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
void *
acpi_ut_allocate_and_track (
- acpi_size size,
- u32 component,
- char *module,
- u32 line);
+ acpi_size size,
+ u32 component,
+ char *module,
+ u32 line);
void *
acpi_ut_callocate_and_track (
- acpi_size size,
- u32 component,
- char *module,
- u32 line);
+ acpi_size size,
+ u32 component,
+ char *module,
+ u32 line);
void
acpi_ut_free_and_track (
- void *address,
- u32 component,
- char *module,
- u32 line);
+ void *address,
+ u32 component,
+ char *module,
+ u32 line);
-acpi_debug_mem_block *
+struct acpi_debug_mem_block *
acpi_ut_find_allocation (
- u32 list_id,
- void *allocation);
+ u32 list_id,
+ void *allocation);
acpi_status
acpi_ut_track_allocation (
- u32 list_id,
- acpi_debug_mem_block *address,
- acpi_size size,
- u8 alloc_type,
- u32 component,
- char *module,
- u32 line);
+ u32 list_id,
+ struct acpi_debug_mem_block *address,
+ acpi_size size,
+ u8 alloc_type,
+ u32 component,
+ char *module,
+ u32 line);
acpi_status
acpi_ut_remove_allocation (
- u32 list_id,
- acpi_debug_mem_block *address,
- u32 component,
- char *module,
- u32 line);
+ u32 list_id,
+ struct acpi_debug_mem_block *address,
+ u32 component,
+ char *module,
+ u32 line);
void
acpi_ut_dump_allocation_info (
@@ -807,8 +807,8 @@ acpi_ut_dump_allocation_info (
void
acpi_ut_dump_allocations (
- u32 component,
- char *module);
+ u32 component,
+ char *module);
#endif
diff --git a/drivers/acpi/include/amlcode.h b/drivers/acpi/include/amlcode.h
index 6af01b0a63da..f11d7338a58c 100644
--- a/drivers/acpi/include/amlcode.h
+++ b/drivers/acpi/include/amlcode.h
@@ -7,7 +7,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/drivers/acpi/include/amlresrc.h b/drivers/acpi/include/amlresrc.h
index 099d174142a9..1fecca50a795 100644
--- a/drivers/acpi/include/amlresrc.h
+++ b/drivers/acpi/include/amlresrc.h
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -69,13 +69,12 @@
#define ASL_RDESC_END_TAG_SIZE 0x01
-typedef struct asl_resource_node
+struct asl_resource_node
{
- u32 buffer_length;
- void *buffer;
- struct asl_resource_node *next;
-
-} asl_resource_node;
+ u32 buffer_length;
+ void *buffer;
+ struct asl_resource_node *next;
+};
/*
@@ -86,213 +85,194 @@ typedef struct asl_resource_node
*/
#pragma pack(1)
-typedef struct asl_irq_format_desc
+struct asl_irq_format_desc
{
- u8 descriptor_type;
- u16 irq_mask;
- u8 flags;
-
-} asl_irq_format_desc;
+ u8 descriptor_type;
+ u16 irq_mask;
+ u8 flags;
+};
-typedef struct asl_irq_noflags_desc
+struct asl_irq_noflags_desc
{
- u8 descriptor_type;
- u16 irq_mask;
-
-} asl_irq_noflags_desc;
+ u8 descriptor_type;
+ u16 irq_mask;
+};
-typedef struct asl_dma_format_desc
+struct asl_dma_format_desc
{
- u8 descriptor_type;
- u8 dma_channel_mask;
- u8 flags;
+ u8 descriptor_type;
+ u8 dma_channel_mask;
+ u8 flags;
+};
-} asl_dma_format_desc;
-
-typedef struct asl_start_dependent_desc
+struct asl_start_dependent_desc
{
- u8 descriptor_type;
- u8 flags;
-
-} asl_start_dependent_desc;
+ u8 descriptor_type;
+ u8 flags;
+};
-typedef struct asl_start_dependent_noprio_desc
+struct asl_start_dependent_noprio_desc
{
- u8 descriptor_type;
+ u8 descriptor_type;
+};
-} asl_start_dependent_noprio_desc;
-
-typedef struct asl_end_dependent_desc
+struct asl_end_dependent_desc
{
- u8 descriptor_type;
-
-} asl_end_dependent_desc;
+ u8 descriptor_type;
+};
-typedef struct asl_io_port_desc
+struct asl_io_port_desc
{
- u8 descriptor_type;
- u8 information;
- u16 address_min;
- u16 address_max;
- u8 alignment;
- u8 length;
+ u8 descriptor_type;
+ u8 information;
+ u16 address_min;
+ u16 address_max;
+ u8 alignment;
+ u8 length;
+};
-} asl_io_port_desc;
-
-typedef struct asl_fixed_io_port_desc
+struct asl_fixed_io_port_desc
{
- u8 descriptor_type;
- u16 base_address;
- u8 length;
-
-} asl_fixed_io_port_desc;
+ u8 descriptor_type;
+ u16 base_address;
+ u8 length;
+};
-typedef struct asl_small_vendor_desc
+struct asl_small_vendor_desc
{
- u8 descriptor_type;
- u8 vendor_defined[7];
+ u8 descriptor_type;
+ u8 vendor_defined[7];
+};
-} asl_small_vendor_desc;
-
-typedef struct asl_end_tag_desc
+struct asl_end_tag_desc
{
- u8 descriptor_type;
- u8 checksum;
-
-} asl_end_tag_desc;
+ u8 descriptor_type;
+ u8 checksum;
+};
/* LARGE descriptors */
-typedef struct asl_memory_24_desc
+struct asl_memory_24_desc
{
- u8 descriptor_type;
- u16 length;
- u8 information;
- u16 address_min;
- u16 address_max;
- u16 alignment;
- u16 range_length;
+ u8 descriptor_type;
+ u16 length;
+ u8 information;
+ u16 address_min;
+ u16 address_max;
+ u16 alignment;
+ u16 range_length;
+};
-} asl_memory_24_desc;
-
-typedef struct asl_large_vendor_desc
+struct asl_large_vendor_desc
{
- u8 descriptor_type;
- u16 length;
- u8 vendor_defined[1];
-
-} asl_large_vendor_desc;
+ u8 descriptor_type;
+ u16 length;
+ u8 vendor_defined[1];
+};
-typedef struct asl_memory_32_desc
+struct asl_memory_32_desc
{
- u8 descriptor_type;
- u16 length;
- u8 information;
- u32 address_min;
- u32 address_max;
- u32 alignment;
- u32 range_length;
+ u8 descriptor_type;
+ u16 length;
+ u8 information;
+ u32 address_min;
+ u32 address_max;
+ u32 alignment;
+ u32 range_length;
+};
-} asl_memory_32_desc;
-
-typedef struct asl_fixed_memory_32_desc
+struct asl_fixed_memory_32_desc
{
- u8 descriptor_type;
- u16 length;
- u8 information;
- u32 base_address;
- u32 range_length;
-
-} asl_fixed_memory_32_desc;
+ u8 descriptor_type;
+ u16 length;
+ u8 information;
+ u32 base_address;
+ u32 range_length;
+};
-typedef struct asl_qword_address_desc
+struct asl_qword_address_desc
{
- u8 descriptor_type;
- u16 length;
- u8 resource_type;
- u8 flags;
- u8 specific_flags;
- u64 granularity;
- u64 address_min;
- u64 address_max;
- u64 translation_offset;
- u64 address_length;
- u8 optional_fields[2];
-
-} asl_qword_address_desc;
-
-
-typedef struct asl_dword_address_desc
+ u8 descriptor_type;
+ u16 length;
+ u8 resource_type;
+ u8 flags;
+ u8 specific_flags;
+ u64 granularity;
+ u64 address_min;
+ u64 address_max;
+ u64 translation_offset;
+ u64 address_length;
+ u8 optional_fields[2];
+};
+
+
+struct asl_dword_address_desc
{
- u8 descriptor_type;
- u16 length;
- u8 resource_type;
- u8 flags;
- u8 specific_flags;
- u32 granularity;
- u32 address_min;
- u32 address_max;
- u32 translation_offset;
- u32 address_length;
- u8 optional_fields[2];
-
-} asl_dword_address_desc;
-
-
-typedef struct asl_word_address_desc
+ u8 descriptor_type;
+ u16 length;
+ u8 resource_type;
+ u8 flags;
+ u8 specific_flags;
+ u32 granularity;
+ u32 address_min;
+ u32 address_max;
+ u32 translation_offset;
+ u32 address_length;
+ u8 optional_fields[2];
+};
+
+
+struct asl_word_address_desc
{
- u8 descriptor_type;
- u16 length;
- u8 resource_type;
- u8 flags;
- u8 specific_flags;
- u16 granularity;
- u16 address_min;
- u16 address_max;
- u16 translation_offset;
- u16 address_length;
- u8 optional_fields[2];
-
-} asl_word_address_desc;
-
-
-typedef struct asl_extended_xrupt_desc
+ u8 descriptor_type;
+ u16 length;
+ u8 resource_type;
+ u8 flags;
+ u8 specific_flags;
+ u16 granularity;
+ u16 address_min;
+ u16 address_max;
+ u16 translation_offset;
+ u16 address_length;
+ u8 optional_fields[2];
+};
+
+
+struct asl_extended_xrupt_desc
{
- u8 descriptor_type;
- u16 length;
- u8 flags;
- u8 table_length;
- u32 interrupt_number[1];
+ u8 descriptor_type;
+ u16 length;
+ u8 flags;
+ u8 table_length;
+ u32 interrupt_number[1];
/* res_source_index, res_source optional fields follow */
+};
-} asl_extended_xrupt_desc;
-
-typedef struct asl_general_register_desc
+struct asl_general_register_desc
{
- u8 descriptor_type;
- u16 length;
- u8 address_space_id;
- u8 bit_width;
- u8 bit_offset;
- u8 reserved;
- u64 address;
-
-} asl_general_register_desc;
+ u8 descriptor_type;
+ u16 length;
+ u8 address_space_id;
+ u8 bit_width;
+ u8 bit_offset;
+ u8 reserved;
+ u64 address;
+};
/* restore default alignment */
@@ -300,31 +280,30 @@ typedef struct asl_general_register_desc
/* Union of all resource descriptors, sow we can allocate the worst case */
-typedef union asl_resource_desc
+union asl_resource_desc
{
- asl_irq_format_desc irq;
- asl_dma_format_desc dma;
- asl_start_dependent_desc std;
- asl_end_dependent_desc end;
- asl_io_port_desc iop;
- asl_fixed_io_port_desc fio;
- asl_small_vendor_desc smv;
- asl_end_tag_desc et;
-
- asl_memory_24_desc M24;
- asl_large_vendor_desc lgv;
- asl_memory_32_desc M32;
- asl_fixed_memory_32_desc F32;
- asl_qword_address_desc qas;
- asl_dword_address_desc das;
- asl_word_address_desc was;
- asl_extended_xrupt_desc exx;
- asl_general_register_desc grg;
- u32 u32_item;
- u16 u16_item;
- u8 U8item;
-
-} asl_resource_desc;
+ struct asl_irq_format_desc irq;
+ struct asl_dma_format_desc dma;
+ struct asl_start_dependent_desc std;
+ struct asl_end_dependent_desc end;
+ struct asl_io_port_desc iop;
+ struct asl_fixed_io_port_desc fio;
+ struct asl_small_vendor_desc smv;
+ struct asl_end_tag_desc et;
+
+ struct asl_memory_24_desc M24;
+ struct asl_large_vendor_desc lgv;
+ struct asl_memory_32_desc M32;
+ struct asl_fixed_memory_32_desc F32;
+ struct asl_qword_address_desc qas;
+ struct asl_dword_address_desc das;
+ struct asl_word_address_desc was;
+ struct asl_extended_xrupt_desc exx;
+ struct asl_general_register_desc grg;
+ u32 u32_item;
+ u16 u16_item;
+ u8 U8item;
+};
#endif
diff --git a/drivers/acpi/include/platform/acenv.h b/drivers/acpi/include/platform/acenv.h
index 82b278b34893..f62fc2693e1b 100644
--- a/drivers/acpi/include/platform/acenv.h
+++ b/drivers/acpi/include/platform/acenv.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/drivers/acpi/include/platform/acgcc.h b/drivers/acpi/include/platform/acgcc.h
index 5be853faf92d..5c04f01f4b42 100644
--- a/drivers/acpi/include/platform/acgcc.h
+++ b/drivers/acpi/include/platform/acgcc.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/drivers/acpi/include/platform/aclinux.h b/drivers/acpi/include/platform/aclinux.h
index b1e8e5fb3870..ae866fa469cc 100644
--- a/drivers/acpi/include/platform/aclinux.h
+++ b/drivers/acpi/include/platform/aclinux.h
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/drivers/acpi/namespace/nsaccess.c b/drivers/acpi/namespace/nsaccess.c
index 5a323c670051..2027f40beff3 100644
--- a/drivers/acpi/namespace/nsaccess.c
+++ b/drivers/acpi/namespace/nsaccess.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -50,10 +50,10 @@
acpi_status
acpi_ns_root_initialize (void)
{
- acpi_status status;
- const acpi_predefined_names *init_val = NULL;
- acpi_namespace_node *new_node;
- acpi_operand_object *obj_desc;
+ acpi_status status;
+ const struct acpi_predefined_names *init_val = NULL;
+ struct acpi_namespace_node *new_node;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_TRACE ("ns_root_initialize");
@@ -232,26 +232,26 @@ unlock_and_exit:
acpi_status
acpi_ns_lookup (
- acpi_generic_state *scope_info,
- char *pathname,
- acpi_object_type type,
- acpi_interpreter_mode interpreter_mode,
- u32 flags,
- acpi_walk_state *walk_state,
- acpi_namespace_node **return_node)
+ union acpi_generic_state *scope_info,
+ char *pathname,
+ acpi_object_type type,
+ acpi_interpreter_mode interpreter_mode,
+ u32 flags,
+ struct acpi_walk_state *walk_state,
+ struct acpi_namespace_node **return_node)
{
- acpi_status status;
- char *path = pathname;
- acpi_namespace_node *prefix_node;
- acpi_namespace_node *current_node = NULL;
- acpi_namespace_node *this_node = NULL;
- u32 num_segments;
- u32 num_carats;
- acpi_name simple_name;
- acpi_object_type type_to_check_for;
- acpi_object_type this_search_type;
- u32 search_parent_flag = ACPI_NS_SEARCH_PARENT;
- u32 local_flags = flags & ~(ACPI_NS_ERROR_IF_FOUND |
+ acpi_status status;
+ char *path = pathname;
+ struct acpi_namespace_node *prefix_node;
+ struct acpi_namespace_node *current_node = NULL;
+ struct acpi_namespace_node *this_node = NULL;
+ u32 num_segments;
+ u32 num_carats;
+ acpi_name simple_name;
+ acpi_object_type type_to_check_for;
+ acpi_object_type this_search_type;
+ u32 search_parent_flag = ACPI_NS_SEARCH_PARENT;
+ u32 local_flags = flags & ~(ACPI_NS_ERROR_IF_FOUND |
ACPI_NS_SEARCH_PARENT);
diff --git a/drivers/acpi/namespace/nsalloc.c b/drivers/acpi/namespace/nsalloc.c
index 7d5894bf1f31..5801666f4436 100644
--- a/drivers/acpi/namespace/nsalloc.c
+++ b/drivers/acpi/namespace/nsalloc.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -43,17 +43,17 @@
*
******************************************************************************/
-acpi_namespace_node *
+struct acpi_namespace_node *
acpi_ns_create_node (
- u32 name)
+ u32 name)
{
- acpi_namespace_node *node;
+ struct acpi_namespace_node *node;
ACPI_FUNCTION_TRACE ("ns_create_node");
- node = ACPI_MEM_CALLOCATE (sizeof (acpi_namespace_node));
+ node = ACPI_MEM_CALLOCATE (sizeof (struct acpi_namespace_node));
if (!node) {
return_PTR (NULL);
}
@@ -82,11 +82,11 @@ acpi_ns_create_node (
void
acpi_ns_delete_node (
- acpi_namespace_node *node)
+ struct acpi_namespace_node *node)
{
- acpi_namespace_node *parent_node;
- acpi_namespace_node *prev_node;
- acpi_namespace_node *next_node;
+ struct acpi_namespace_node *parent_node;
+ struct acpi_namespace_node *prev_node;
+ struct acpi_namespace_node *next_node;
ACPI_FUNCTION_TRACE_PTR ("ns_delete_node", node);
@@ -141,13 +141,13 @@ acpi_ns_delete_node (
int
acpi_ns_compare_names (
- char *name1,
- char *name2)
+ char *name1,
+ char *name2)
{
- char reversed_name1[ACPI_NAME_SIZE];
- char reversed_name2[ACPI_NAME_SIZE];
- u32 i;
- u32 j;
+ char reversed_name1[ACPI_NAME_SIZE];
+ char reversed_name2[ACPI_NAME_SIZE];
+ u32 i;
+ u32 j;
/*
@@ -198,16 +198,16 @@ acpi_ns_compare_names (
void
acpi_ns_install_node (
- acpi_walk_state *walk_state,
- acpi_namespace_node *parent_node, /* Parent */
- acpi_namespace_node *node, /* New Child*/
- acpi_object_type type)
+ struct acpi_walk_state *walk_state,
+ struct acpi_namespace_node *parent_node, /* Parent */
+ struct acpi_namespace_node *node, /* New Child*/
+ acpi_object_type type)
{
- u16 owner_id = TABLE_ID_DSDT;
- acpi_namespace_node *child_node;
+ u16 owner_id = TABLE_ID_DSDT;
+ struct acpi_namespace_node *child_node;
#ifdef ACPI_ALPHABETIC_NAMESPACE
- acpi_namespace_node *previous_child_node;
+ struct acpi_namespace_node *previous_child_node;
#endif
@@ -332,11 +332,11 @@ acpi_ns_install_node (
void
acpi_ns_delete_children (
- acpi_namespace_node *parent_node)
+ struct acpi_namespace_node *parent_node)
{
- acpi_namespace_node *child_node;
- acpi_namespace_node *next_node;
- u8 flags;
+ struct acpi_namespace_node *child_node;
+ struct acpi_namespace_node *next_node;
+ u8 flags;
ACPI_FUNCTION_TRACE_PTR ("ns_delete_children", parent_node);
@@ -412,10 +412,10 @@ acpi_ns_delete_children (
void
acpi_ns_delete_namespace_subtree (
- acpi_namespace_node *parent_node)
+ struct acpi_namespace_node *parent_node)
{
- acpi_namespace_node *child_node = NULL;
- u32 level = 1;
+ struct acpi_namespace_node *child_node = NULL;
+ u32 level = 1;
ACPI_FUNCTION_TRACE ("ns_delete_namespace_subtree");
@@ -495,10 +495,10 @@ acpi_ns_delete_namespace_subtree (
static void
acpi_ns_remove_reference (
- acpi_namespace_node *node)
+ struct acpi_namespace_node *node)
{
- acpi_namespace_node *parent_node;
- acpi_namespace_node *this_node;
+ struct acpi_namespace_node *parent_node;
+ struct acpi_namespace_node *this_node;
ACPI_FUNCTION_ENTRY ();
@@ -548,12 +548,12 @@ acpi_ns_remove_reference (
void
acpi_ns_delete_namespace_by_owner (
- u16 owner_id)
+ u16 owner_id)
{
- acpi_namespace_node *child_node;
- acpi_namespace_node *deletion_node;
- u32 level;
- acpi_namespace_node *parent_node;
+ struct acpi_namespace_node *child_node;
+ struct acpi_namespace_node *deletion_node;
+ u32 level;
+ struct acpi_namespace_node *parent_node;
ACPI_FUNCTION_TRACE_U32 ("ns_delete_namespace_by_owner", owner_id);
diff --git a/drivers/acpi/namespace/nsdump.c b/drivers/acpi/namespace/nsdump.c
index 6d8c32ec71df..ee3391655658 100644
--- a/drivers/acpi/namespace/nsdump.c
+++ b/drivers/acpi/namespace/nsdump.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -47,8 +47,8 @@
void
acpi_ns_print_pathname (
- u32 num_segments,
- char *pathname)
+ u32 num_segments,
+ char *pathname)
{
ACPI_FUNCTION_NAME ("ns_print_pathname");
@@ -91,10 +91,10 @@ acpi_ns_print_pathname (
void
acpi_ns_dump_pathname (
- acpi_handle handle,
- char *msg,
- u32 level,
- u32 component)
+ acpi_handle handle,
+ char *msg,
+ u32 level,
+ u32 component)
{
ACPI_FUNCTION_TRACE ("ns_dump_pathname");
@@ -129,19 +129,19 @@ acpi_ns_dump_pathname (
acpi_status
acpi_ns_dump_one_object (
- acpi_handle obj_handle,
- u32 level,
- void *context,
- void **return_value)
+ acpi_handle obj_handle,
+ u32 level,
+ void *context,
+ void **return_value)
{
- acpi_walk_info *info = (acpi_walk_info *) context;
- acpi_namespace_node *this_node;
- acpi_operand_object *obj_desc = NULL;
- acpi_object_type obj_type;
- acpi_object_type type;
- u32 bytes_to_dump;
- u32 dbg_level;
- u32 i;
+ struct acpi_walk_info *info = (struct acpi_walk_info *) context;
+ struct acpi_namespace_node *this_node;
+ union acpi_operand_object *obj_desc = NULL;
+ acpi_object_type obj_type;
+ acpi_object_type type;
+ u32 bytes_to_dump;
+ u32 dbg_level;
+ u32 i;
ACPI_FUNCTION_NAME ("ns_dump_one_object");
@@ -335,7 +335,7 @@ acpi_ns_dump_one_object (
case ACPI_TYPE_LOCAL_ALIAS:
- acpi_os_printf ("Target %4.4s (%p)\n", ((acpi_namespace_node *) obj_desc)->name.ascii, obj_desc);
+ acpi_os_printf ("Target %4.4s (%p)\n", ((struct acpi_namespace_node *) obj_desc)->name.ascii, obj_desc);
break;
default:
@@ -444,7 +444,7 @@ acpi_ns_dump_one_object (
case ACPI_DESC_TYPE_NAMED:
acpi_os_printf ("(Ptr to Node)\n");
- bytes_to_dump = sizeof (acpi_namespace_node);
+ bytes_to_dump = sizeof (struct acpi_namespace_node);
break;
@@ -459,7 +459,7 @@ acpi_ns_dump_one_object (
else {
acpi_os_printf ("(Ptr to ACPI Object type %s, %X)\n",
acpi_ut_get_type_name (obj_type), obj_type);
- bytes_to_dump = sizeof (acpi_operand_object);
+ bytes_to_dump = sizeof (union acpi_operand_object);
}
break;
@@ -492,7 +492,7 @@ acpi_ns_dump_one_object (
break;
case ACPI_TYPE_BUFFER_FIELD:
- obj_desc = (acpi_operand_object *) obj_desc->buffer_field.buffer_obj;
+ obj_desc = (union acpi_operand_object *) obj_desc->buffer_field.buffer_obj;
break;
case ACPI_TYPE_PACKAGE:
@@ -546,13 +546,13 @@ cleanup:
void
acpi_ns_dump_objects (
- acpi_object_type type,
- u8 display_type,
- u32 max_depth,
- u32 owner_id,
- acpi_handle start_handle)
+ acpi_object_type type,
+ u8 display_type,
+ u32 max_depth,
+ u32 owner_id,
+ acpi_handle start_handle)
{
- acpi_walk_info info;
+ struct acpi_walk_info info;
ACPI_FUNCTION_ENTRY ();
@@ -584,10 +584,10 @@ acpi_ns_dump_objects (
void
acpi_ns_dump_tables (
- acpi_handle search_base,
- u32 max_depth)
+ acpi_handle search_base,
+ u32 max_depth)
{
- acpi_handle search_handle = search_base;
+ acpi_handle search_handle = search_base;
ACPI_FUNCTION_TRACE ("ns_dump_tables");
@@ -629,10 +629,10 @@ acpi_ns_dump_tables (
void
acpi_ns_dump_entry (
- acpi_handle handle,
- u32 debug_level)
+ acpi_handle handle,
+ u32 debug_level)
{
- acpi_walk_info info;
+ struct acpi_walk_info info;
ACPI_FUNCTION_ENTRY ();
diff --git a/drivers/acpi/namespace/nsdumpdv.c b/drivers/acpi/namespace/nsdumpdv.c
index 3485b4b7f28e..72bc5359cdaf 100644
--- a/drivers/acpi/namespace/nsdumpdv.c
+++ b/drivers/acpi/namespace/nsdumpdv.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -48,14 +48,14 @@
acpi_status
acpi_ns_dump_one_device (
- acpi_handle obj_handle,
- u32 level,
- void *context,
- void **return_value)
+ acpi_handle obj_handle,
+ u32 level,
+ void *context,
+ void **return_value)
{
- acpi_device_info info;
- acpi_status status;
- u32 i;
+ struct acpi_device_info info;
+ acpi_status status;
+ u32 i;
ACPI_FUNCTION_NAME ("ns_dump_one_device");
@@ -92,8 +92,8 @@ acpi_ns_dump_one_device (
void
acpi_ns_dump_root_devices (void)
{
- acpi_handle sys_bus_handle;
- acpi_status status;
+ acpi_handle sys_bus_handle;
+ acpi_status status;
ACPI_FUNCTION_NAME ("ns_dump_root_devices");
diff --git a/drivers/acpi/namespace/nseval.c b/drivers/acpi/namespace/nseval.c
index 37bcdedb57be..bff8b6a02421 100644
--- a/drivers/acpi/namespace/nseval.c
+++ b/drivers/acpi/namespace/nseval.c
@@ -6,7 +6,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -58,16 +58,16 @@
acpi_status
acpi_ns_evaluate_relative (
- acpi_namespace_node *handle,
- char *pathname,
- acpi_operand_object **params,
- acpi_operand_object **return_object)
+ struct acpi_namespace_node *handle,
+ char *pathname,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_object)
{
- acpi_namespace_node *prefix_node;
- acpi_status status;
- acpi_namespace_node *node = NULL;
- char *internal_path = NULL;
- acpi_generic_state scope_info;
+ struct acpi_namespace_node *prefix_node;
+ acpi_status status;
+ struct acpi_namespace_node *node = NULL;
+ char *internal_path = NULL;
+ union acpi_generic_state scope_info;
ACPI_FUNCTION_TRACE ("ns_evaluate_relative");
@@ -157,13 +157,13 @@ cleanup:
acpi_status
acpi_ns_evaluate_by_name (
- char *pathname,
- acpi_operand_object **params,
- acpi_operand_object **return_object)
+ char *pathname,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_object)
{
- acpi_status status;
- acpi_namespace_node *node = NULL;
- char *internal_path = NULL;
+ acpi_status status;
+ struct acpi_namespace_node *node = NULL;
+ char *internal_path = NULL;
ACPI_FUNCTION_TRACE ("ns_evaluate_by_name");
@@ -241,13 +241,13 @@ cleanup:
acpi_status
acpi_ns_evaluate_by_handle (
- acpi_namespace_node *handle,
- acpi_operand_object **params,
- acpi_operand_object **return_object)
+ struct acpi_namespace_node *handle,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_object)
{
- acpi_namespace_node *node;
- acpi_status status;
- acpi_operand_object *local_return_object;
+ struct acpi_namespace_node *node;
+ acpi_status status;
+ union acpi_operand_object *local_return_object;
ACPI_FUNCTION_TRACE ("ns_evaluate_by_handle");
@@ -361,12 +361,12 @@ acpi_ns_evaluate_by_handle (
acpi_status
acpi_ns_execute_control_method (
- acpi_namespace_node *method_node,
- acpi_operand_object **params,
- acpi_operand_object **return_obj_desc)
+ struct acpi_namespace_node *method_node,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_obj_desc)
{
- acpi_status status;
- acpi_operand_object *obj_desc;
+ acpi_status status;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_TRACE ("ns_execute_control_method");
@@ -433,11 +433,11 @@ acpi_ns_execute_control_method (
acpi_status
acpi_ns_get_object_value (
- acpi_namespace_node *node,
- acpi_operand_object **return_obj_desc)
+ struct acpi_namespace_node *node,
+ union acpi_operand_object **return_obj_desc)
{
- acpi_status status = AE_OK;
- acpi_namespace_node *resolved_node = node;
+ acpi_status status = AE_OK;
+ struct acpi_namespace_node *resolved_node = node;
ACPI_FUNCTION_TRACE ("ns_get_object_value");
@@ -483,7 +483,7 @@ acpi_ns_get_object_value (
if (ACPI_SUCCESS (status)) {
status = AE_CTRL_RETURN_VALUE;
- *return_obj_desc = ACPI_CAST_PTR (acpi_operand_object, resolved_node);
+ *return_obj_desc = ACPI_CAST_PTR (union acpi_operand_object, resolved_node);
ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Returning object %p [%s]\n",
*return_obj_desc, acpi_ut_get_object_type_name (*return_obj_desc)));
}
diff --git a/drivers/acpi/namespace/nsinit.c b/drivers/acpi/namespace/nsinit.c
index 45b2e3f27c3a..ec554372ac03 100644
--- a/drivers/acpi/namespace/nsinit.c
+++ b/drivers/acpi/namespace/nsinit.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -49,8 +49,8 @@ acpi_status
acpi_ns_initialize_objects (
void)
{
- acpi_status status;
- acpi_init_walk_info info;
+ acpi_status status;
+ struct acpi_init_walk_info info;
ACPI_FUNCTION_TRACE ("ns_initialize_objects");
@@ -62,7 +62,7 @@ acpi_ns_initialize_objects (
/* Set all init info to zero */
- ACPI_MEMSET (&info, 0, sizeof (acpi_init_walk_info));
+ ACPI_MEMSET (&info, 0, sizeof (struct acpi_init_walk_info));
/* Walk entire namespace from the supplied root */
@@ -110,8 +110,8 @@ acpi_status
acpi_ns_initialize_devices (
void)
{
- acpi_status status;
- acpi_device_walk_info info;
+ acpi_status status;
+ struct acpi_device_walk_info info;
ACPI_FUNCTION_TRACE ("ns_initialize_devices");
@@ -165,16 +165,16 @@ acpi_ns_initialize_devices (
acpi_status
acpi_ns_init_one_object (
- acpi_handle obj_handle,
- u32 level,
- void *context,
- void **return_value)
+ acpi_handle obj_handle,
+ u32 level,
+ void *context,
+ void **return_value)
{
- acpi_object_type type;
- acpi_status status;
- acpi_init_walk_info *info = (acpi_init_walk_info *) context;
- acpi_namespace_node *node = (acpi_namespace_node *) obj_handle;
- acpi_operand_object *obj_desc;
+ acpi_object_type type;
+ acpi_status status;
+ struct acpi_init_walk_info *info = (struct acpi_init_walk_info *) context;
+ struct acpi_namespace_node *node = (struct acpi_namespace_node *) obj_handle;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_NAME ("ns_init_one_object");
@@ -305,15 +305,15 @@ acpi_ns_init_one_object (
acpi_status
acpi_ns_init_one_device (
- acpi_handle obj_handle,
- u32 nesting_level,
- void *context,
- void **return_value)
+ acpi_handle obj_handle,
+ u32 nesting_level,
+ void *context,
+ void **return_value)
{
- acpi_status status;
- acpi_namespace_node *node;
- u32 flags;
- acpi_device_walk_info *info = (acpi_device_walk_info *) context;
+ acpi_status status;
+ struct acpi_namespace_node *node;
+ u32 flags;
+ struct acpi_device_walk_info *info = (struct acpi_device_walk_info *) context;
ACPI_FUNCTION_TRACE ("ns_init_one_device");
@@ -372,7 +372,7 @@ acpi_ns_init_one_device (
/* Ignore error and move on to next device */
#ifdef ACPI_DEBUG_OUTPUT
- char *scope_name = acpi_ns_get_external_pathname (obj_handle);
+ char *scope_name = acpi_ns_get_external_pathname (obj_handle);
ACPI_DEBUG_PRINT ((ACPI_DB_WARN, "%s._INI failed: %s\n",
scope_name, acpi_format_exception (status)));
diff --git a/drivers/acpi/namespace/nsload.c b/drivers/acpi/namespace/nsload.c
index 885e67aa2f5c..8a9f6657db13 100644
--- a/drivers/acpi/namespace/nsload.c
+++ b/drivers/acpi/namespace/nsload.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -49,10 +49,10 @@
acpi_status
acpi_ns_load_table (
- acpi_table_desc *table_desc,
- acpi_namespace_node *node)
+ struct acpi_table_desc *table_desc,
+ struct acpi_namespace_node *node)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ns_load_table");
@@ -137,11 +137,11 @@ acpi_ns_load_table (
acpi_status
acpi_ns_load_table_by_type (
- acpi_table_type table_type)
+ acpi_table_type table_type)
{
- u32 i;
- acpi_status status;
- acpi_table_desc *table_desc;
+ u32 i;
+ acpi_status status;
+ struct acpi_table_desc *table_desc;
ACPI_FUNCTION_TRACE ("ns_load_table_by_type");
@@ -266,7 +266,7 @@ acpi_status
acpi_ns_load_namespace (
void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_load_name_space");
@@ -319,14 +319,14 @@ acpi_ns_load_namespace (
acpi_status
acpi_ns_delete_subtree (
- acpi_handle start_handle)
+ acpi_handle start_handle)
{
- acpi_status status;
- acpi_handle child_handle;
- acpi_handle parent_handle;
- acpi_handle next_child_handle;
- acpi_handle dummy;
- u32 level;
+ acpi_status status;
+ acpi_handle child_handle;
+ acpi_handle parent_handle;
+ acpi_handle next_child_handle;
+ acpi_handle dummy;
+ u32 level;
ACPI_FUNCTION_TRACE ("ns_delete_subtree");
@@ -407,9 +407,9 @@ acpi_ns_delete_subtree (
acpi_status
acpi_ns_unload_namespace (
- acpi_handle handle)
+ acpi_handle handle)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ns_unload_name_space");
diff --git a/drivers/acpi/namespace/nsnames.c b/drivers/acpi/namespace/nsnames.c
index 3944d3b56e4a..0b6f7c044fc7 100644
--- a/drivers/acpi/namespace/nsnames.c
+++ b/drivers/acpi/namespace/nsnames.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -49,12 +49,12 @@
void
acpi_ns_build_external_path (
- acpi_namespace_node *node,
- acpi_size size,
- char *name_buffer)
+ struct acpi_namespace_node *node,
+ acpi_size size,
+ char *name_buffer)
{
- acpi_size index;
- acpi_namespace_node *parent_node;
+ acpi_size index;
+ struct acpi_namespace_node *parent_node;
ACPI_FUNCTION_NAME ("ns_build_external_path");
@@ -119,10 +119,10 @@ acpi_ns_build_external_path (
char *
acpi_ns_get_external_pathname (
- acpi_namespace_node *node)
+ struct acpi_namespace_node *node)
{
- char *name_buffer;
- acpi_size size;
+ char *name_buffer;
+ acpi_size size;
ACPI_FUNCTION_TRACE_PTR ("ns_get_external_pathname", node);
@@ -162,10 +162,10 @@ acpi_ns_get_external_pathname (
acpi_size
acpi_ns_get_pathname_length (
- acpi_namespace_node *node)
+ struct acpi_namespace_node *node)
{
- acpi_size size;
- acpi_namespace_node *next_node;
+ acpi_size size;
+ struct acpi_namespace_node *next_node;
ACPI_FUNCTION_ENTRY ();
@@ -203,12 +203,12 @@ acpi_ns_get_pathname_length (
acpi_status
acpi_ns_handle_to_pathname (
- acpi_handle target_handle,
- acpi_buffer *buffer)
+ acpi_handle target_handle,
+ struct acpi_buffer *buffer)
{
- acpi_status status;
- acpi_namespace_node *node;
- acpi_size required_size;
+ acpi_status status;
+ struct acpi_namespace_node *node;
+ acpi_size required_size;
ACPI_FUNCTION_TRACE_PTR ("ns_handle_to_pathname", target_handle);
diff --git a/drivers/acpi/namespace/nsobject.c b/drivers/acpi/namespace/nsobject.c
index 5912121e14e8..4b67c8a7d6e9 100644
--- a/drivers/acpi/namespace/nsobject.c
+++ b/drivers/acpi/namespace/nsobject.c
@@ -6,7 +6,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -53,13 +53,13 @@
acpi_status
acpi_ns_attach_object (
- acpi_namespace_node *node,
- acpi_operand_object *object,
- acpi_object_type type)
+ struct acpi_namespace_node *node,
+ union acpi_operand_object *object,
+ acpi_object_type type)
{
- acpi_operand_object *obj_desc;
- acpi_operand_object *last_obj_desc;
- acpi_object_type object_type = ACPI_TYPE_ANY;
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object *last_obj_desc;
+ acpi_object_type object_type = ACPI_TYPE_ANY;
ACPI_FUNCTION_TRACE ("ns_attach_object");
@@ -110,13 +110,13 @@ acpi_ns_attach_object (
* we will use that (attached) object
*/
else if ((ACPI_GET_DESCRIPTOR_TYPE (object) == ACPI_DESC_TYPE_NAMED) &&
- ((acpi_namespace_node *) object)->object) {
+ ((struct acpi_namespace_node *) object)->object) {
/*
* Value passed is a name handle and that name has a
* non-null value. Use that name's value and type.
*/
- obj_desc = ((acpi_namespace_node *) object)->object;
- object_type = ((acpi_namespace_node *) object)->type;
+ obj_desc = ((struct acpi_namespace_node *) object)->object;
+ object_type = ((struct acpi_namespace_node *) object)->type;
}
/*
@@ -124,7 +124,7 @@ acpi_ns_attach_object (
* it first
*/
else {
- obj_desc = (acpi_operand_object *) object;
+ obj_desc = (union acpi_operand_object *) object;
/* Use the given type */
@@ -184,9 +184,9 @@ acpi_ns_attach_object (
void
acpi_ns_detach_object (
- acpi_namespace_node *node)
+ struct acpi_namespace_node *node)
{
- acpi_operand_object *obj_desc;
+ union acpi_operand_object *obj_desc;
ACPI_FUNCTION_TRACE ("ns_detach_object");
@@ -237,9 +237,9 @@ acpi_ns_detach_object (
*
******************************************************************************/
-acpi_operand_object *
+union acpi_operand_object *
acpi_ns_get_attached_object (
- acpi_namespace_node *node)
+ struct acpi_namespace_node *node)
{
ACPI_FUNCTION_TRACE_PTR ("ns_get_attached_object", node);
@@ -273,9 +273,9 @@ acpi_ns_get_attached_object (
*
******************************************************************************/
-acpi_operand_object *
+union acpi_operand_object *
acpi_ns_get_secondary_object (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
ACPI_FUNCTION_TRACE_PTR ("ns_get_secondary_object", obj_desc);
@@ -307,13 +307,13 @@ acpi_ns_get_secondary_object (
acpi_status
acpi_ns_attach_data (
- acpi_namespace_node *node,
- acpi_object_handler handler,
- void *data)
+ struct acpi_namespace_node *node,
+ acpi_object_handler handler,
+ void *data)
{
- acpi_operand_object *prev_obj_desc;
- acpi_operand_object *obj_desc;
- acpi_operand_object *data_desc;
+ union acpi_operand_object *prev_obj_desc;
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object *data_desc;
/* We only allow one attachment per handler */
@@ -369,11 +369,11 @@ acpi_ns_attach_data (
acpi_status
acpi_ns_detach_data (
- acpi_namespace_node *node,
- acpi_object_handler handler)
+ struct acpi_namespace_node *node,
+ acpi_object_handler handler)
{
- acpi_operand_object *obj_desc;
- acpi_operand_object *prev_obj_desc;
+ union acpi_operand_object *obj_desc;
+ union acpi_operand_object *prev_obj_desc;
prev_obj_desc = NULL;
@@ -417,11 +417,11 @@ acpi_ns_detach_data (
acpi_status
acpi_ns_get_attached_data (
- acpi_namespace_node *node,
- acpi_object_handler handler,
- void **data)
+ struct acpi_namespace_node *node,
+ acpi_object_handler handler,
+ void **data)
{
- acpi_operand_object *obj_desc;
+ union acpi_operand_object *obj_desc;
obj_desc = node->object;
diff --git a/drivers/acpi/namespace/nsparse.c b/drivers/acpi/namespace/nsparse.c
index d6cc4bd633df..a83b5a77a21e 100644
--- a/drivers/acpi/namespace/nsparse.c
+++ b/drivers/acpi/namespace/nsparse.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -48,12 +48,12 @@
acpi_status
acpi_ns_one_complete_parse (
- u32 pass_number,
- acpi_table_desc *table_desc)
+ u32 pass_number,
+ struct acpi_table_desc *table_desc)
{
- acpi_parse_object *parse_root;
- acpi_status status;
- acpi_walk_state *walk_state;
+ union acpi_parse_object *parse_root;
+ acpi_status status;
+ struct acpi_walk_state *walk_state;
ACPI_FUNCTION_TRACE ("ns_one_complete_parse");
@@ -108,10 +108,10 @@ acpi_ns_one_complete_parse (
acpi_status
acpi_ns_parse_table (
- acpi_table_desc *table_desc,
- acpi_namespace_node *start_node)
+ struct acpi_table_desc *table_desc,
+ struct acpi_namespace_node *start_node)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ns_parse_table");
diff --git a/drivers/acpi/namespace/nssearch.c b/drivers/acpi/namespace/nssearch.c
index bff2eab7a0f1..1c704465d8da 100644
--- a/drivers/acpi/namespace/nssearch.c
+++ b/drivers/acpi/namespace/nssearch.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -60,12 +60,12 @@
acpi_status
acpi_ns_search_node (
- u32 target_name,
- acpi_namespace_node *node,
- acpi_object_type type,
- acpi_namespace_node **return_node)
+ u32 target_name,
+ struct acpi_namespace_node *node,
+ acpi_object_type type,
+ struct acpi_namespace_node **return_node)
{
- acpi_namespace_node *next_node;
+ struct acpi_namespace_node *next_node;
ACPI_FUNCTION_TRACE ("ns_search_node");
@@ -73,7 +73,7 @@ acpi_ns_search_node (
#ifdef ACPI_DEBUG_OUTPUT
if (ACPI_LV_NAMES & acpi_dbg_level) {
- char *scope_name;
+ char *scope_name;
scope_name = acpi_ns_get_external_pathname (node);
if (scope_name) {
@@ -156,13 +156,13 @@ acpi_ns_search_node (
static acpi_status
acpi_ns_search_parent_tree (
- u32 target_name,
- acpi_namespace_node *node,
- acpi_object_type type,
- acpi_namespace_node **return_node)
+ u32 target_name,
+ struct acpi_namespace_node *node,
+ acpi_object_type type,
+ struct acpi_namespace_node **return_node)
{
- acpi_status status;
- acpi_namespace_node *parent_node;
+ acpi_status status;
+ struct acpi_namespace_node *parent_node;
ACPI_FUNCTION_TRACE ("ns_search_parent_tree");
@@ -247,16 +247,16 @@ acpi_ns_search_parent_tree (
acpi_status
acpi_ns_search_and_enter (
- u32 target_name,
- acpi_walk_state *walk_state,
- acpi_namespace_node *node,
- acpi_interpreter_mode interpreter_mode,
- acpi_object_type type,
- u32 flags,
- acpi_namespace_node **return_node)
+ u32 target_name,
+ struct acpi_walk_state *walk_state,
+ struct acpi_namespace_node *node,
+ acpi_interpreter_mode interpreter_mode,
+ acpi_object_type type,
+ u32 flags,
+ struct acpi_namespace_node **return_node)
{
- acpi_status status;
- acpi_namespace_node *new_node;
+ acpi_status status;
+ struct acpi_namespace_node *new_node;
ACPI_FUNCTION_TRACE ("ns_search_and_enter");
diff --git a/drivers/acpi/namespace/nsutils.c b/drivers/acpi/namespace/nsutils.c
index 4f3a025bc874..51079953f0a3 100644
--- a/drivers/acpi/namespace/nsutils.c
+++ b/drivers/acpi/namespace/nsutils.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -50,14 +50,14 @@
void
acpi_ns_report_error (
- char *module_name,
- u32 line_number,
- u32 component_id,
- char *internal_name,
- acpi_status lookup_status)
+ char *module_name,
+ u32 line_number,
+ u32 component_id,
+ char *internal_name,
+ acpi_status lookup_status)
{
- acpi_status status;
- char *name;
+ acpi_status status;
+ char *name;
/* Convert path to external format */
@@ -102,16 +102,16 @@ acpi_ns_report_error (
void
acpi_ns_report_method_error (
- char *module_name,
- u32 line_number,
- u32 component_id,
- char *message,
- acpi_namespace_node *prefix_node,
- char *path,
- acpi_status method_status)
+ char *module_name,
+ u32 line_number,
+ u32 component_id,
+ char *message,
+ struct acpi_namespace_node *prefix_node,
+ char *path,
+ acpi_status method_status)
{
- acpi_status status;
- acpi_namespace_node *node = prefix_node;
+ acpi_status status;
+ struct acpi_namespace_node *node = prefix_node;
if (path) {
@@ -142,11 +142,11 @@ acpi_ns_report_method_error (
void
acpi_ns_print_node_pathname (
- acpi_namespace_node *node,
- char *msg)
+ struct acpi_namespace_node *node,
+ char *msg)
{
- acpi_buffer buffer;
- acpi_status status;
+ struct acpi_buffer buffer;
+ acpi_status status;
/* Convert handle to a full pathname and print it (with supplied message) */
@@ -175,7 +175,7 @@ acpi_ns_print_node_pathname (
u8
acpi_ns_valid_root_prefix (
- char prefix)
+ char prefix)
{
return ((u8) (prefix == '\\'));
@@ -196,7 +196,7 @@ acpi_ns_valid_root_prefix (
u8
acpi_ns_valid_path_separator (
- char sep)
+ char sep)
{
return ((u8) (sep == '.'));
@@ -215,7 +215,7 @@ acpi_ns_valid_path_separator (
acpi_object_type
acpi_ns_get_type (
- acpi_namespace_node *node)
+ struct acpi_namespace_node *node)
{
ACPI_FUNCTION_TRACE ("ns_get_type");
@@ -242,7 +242,7 @@ acpi_ns_get_type (
u32
acpi_ns_local (
- acpi_object_type type)
+ acpi_object_type type)
{
ACPI_FUNCTION_TRACE ("ns_local");
@@ -274,10 +274,10 @@ acpi_ns_local (
void
acpi_ns_get_internal_name_length (
- acpi_namestring_info *info)
+ struct acpi_namestring_info *info)
{
- char *next_external_char;
- u32 i;
+ char *next_external_char;
+ u32 i;
ACPI_FUNCTION_ENTRY ();
@@ -348,13 +348,13 @@ acpi_ns_get_internal_name_length (
acpi_status
acpi_ns_build_internal_name (
- acpi_namestring_info *info)
+ struct acpi_namestring_info *info)
{
- u32 num_segments = info->num_segments;
- char *internal_name = info->internal_name;
- char *external_name = info->next_external_char;
- char *result = NULL;
- acpi_native_uint i;
+ u32 num_segments = info->num_segments;
+ char *internal_name = info->internal_name;
+ char *external_name = info->next_external_char;
+ char *result = NULL;
+ acpi_native_uint i;
ACPI_FUNCTION_TRACE ("ns_build_internal_name");
@@ -469,12 +469,12 @@ acpi_ns_build_internal_name (
acpi_status
acpi_ns_internalize_name (
- char *external_name,
- char **converted_name)
+ char *external_name,
+ char **converted_name)
{
- char *internal_name;
- acpi_namestring_info info;
- acpi_status status;
+ char *internal_name;
+ struct acpi_namestring_info info;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ns_internalize_name");
@@ -529,17 +529,17 @@ acpi_ns_internalize_name (
acpi_status
acpi_ns_externalize_name (
- u32 internal_name_length,
- char *internal_name,
- u32 *converted_name_length,
- char **converted_name)
+ u32 internal_name_length,
+ char *internal_name,
+ u32 *converted_name_length,
+ char **converted_name)
{
- acpi_native_uint names_index = 0;
- acpi_native_uint num_segments = 0;
- acpi_native_uint required_length;
- acpi_native_uint prefix_length = 0;
- acpi_native_uint i = 0;
- acpi_native_uint j = 0;
+ acpi_native_uint names_index = 0;
+ acpi_native_uint num_segments = 0;
+ acpi_native_uint required_length;
+ acpi_native_uint prefix_length = 0;
+ acpi_native_uint i = 0;
+ acpi_native_uint j = 0;
ACPI_FUNCTION_TRACE ("ns_externalize_name");
@@ -686,9 +686,9 @@ acpi_ns_externalize_name (
*
******************************************************************************/
-acpi_namespace_node *
+struct acpi_namespace_node *
acpi_ns_map_handle_to_node (
- acpi_handle handle)
+ acpi_handle handle)
{
ACPI_FUNCTION_ENTRY ();
@@ -711,7 +711,7 @@ acpi_ns_map_handle_to_node (
return (NULL);
}
- return ((acpi_namespace_node *) handle);
+ return ((struct acpi_namespace_node *) handle);
}
@@ -729,7 +729,7 @@ acpi_ns_map_handle_to_node (
acpi_handle
acpi_ns_convert_entry_to_handle (
- acpi_namespace_node *node)
+ struct acpi_namespace_node *node)
{
@@ -772,8 +772,8 @@ acpi_ns_convert_entry_to_handle (
void
acpi_ns_terminate (void)
{
- acpi_operand_object *obj_desc;
- acpi_namespace_node *this_node;
+ union acpi_operand_object *obj_desc;
+ struct acpi_namespace_node *this_node;
ACPI_FUNCTION_TRACE ("ns_terminate");
@@ -824,7 +824,7 @@ acpi_ns_terminate (void)
u32
acpi_ns_opens_scope (
- acpi_object_type type)
+ acpi_object_type type)
{
ACPI_FUNCTION_TRACE_STR ("ns_opens_scope", acpi_ut_get_type_name (type));
@@ -864,14 +864,14 @@ acpi_ns_opens_scope (
acpi_status
acpi_ns_get_node_by_path (
- char *pathname,
- acpi_namespace_node *start_node,
- u32 flags,
- acpi_namespace_node **return_node)
+ char *pathname,
+ struct acpi_namespace_node *start_node,
+ u32 flags,
+ struct acpi_namespace_node **return_node)
{
- acpi_generic_state scope_info;
- acpi_status status;
- char *internal_path = NULL;
+ union acpi_generic_state scope_info;
+ acpi_status status;
+ char *internal_path = NULL;
ACPI_FUNCTION_TRACE_PTR ("ns_get_node_by_path", pathname);
@@ -935,9 +935,9 @@ acpi_ns_get_node_by_path (
acpi_name
acpi_ns_find_parent_name (
- acpi_namespace_node *child_node)
+ struct acpi_namespace_node *child_node)
{
- acpi_namespace_node *parent_node;
+ struct acpi_namespace_node *parent_node;
ACPI_FUNCTION_TRACE ("ns_find_parent_name");
@@ -978,9 +978,9 @@ acpi_ns_find_parent_name (
******************************************************************************/
-acpi_namespace_node *
+struct acpi_namespace_node *
acpi_ns_get_parent_node (
- acpi_namespace_node *node)
+ struct acpi_namespace_node *node)
{
ACPI_FUNCTION_ENTRY ();
@@ -1020,9 +1020,9 @@ acpi_ns_get_parent_node (
******************************************************************************/
-acpi_namespace_node *
+struct acpi_namespace_node *
acpi_ns_get_next_valid_node (
- acpi_namespace_node *node)
+ struct acpi_namespace_node *node)
{
/* If we are at the end of this peer list, return NULL */
diff --git a/drivers/acpi/namespace/nswalk.c b/drivers/acpi/namespace/nswalk.c
index 80400f9e6b05..a1461ce8cbaa 100644
--- a/drivers/acpi/namespace/nswalk.c
+++ b/drivers/acpi/namespace/nswalk.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@
* child_node - Previous child that was found.
* The NEXT child will be returned
*
- * RETURN: acpi_namespace_node - Pointer to the NEXT child or NULL if
+ * RETURN: struct acpi_namespace_node - Pointer to the NEXT child or NULL if
* none is found.
*
* DESCRIPTION: Return the next peer node within the namespace. If Handle
@@ -50,13 +50,13 @@
*
******************************************************************************/
-acpi_namespace_node *
+struct acpi_namespace_node *
acpi_ns_get_next_node (
- acpi_object_type type,
- acpi_namespace_node *parent_node,
- acpi_namespace_node *child_node)
+ acpi_object_type type,
+ struct acpi_namespace_node *parent_node,
+ struct acpi_namespace_node *child_node)
{
- acpi_namespace_node *next_node = NULL;
+ struct acpi_namespace_node *next_node = NULL;
ACPI_FUNCTION_ENTRY ();
@@ -136,19 +136,19 @@ acpi_ns_get_next_node (
acpi_status
acpi_ns_walk_namespace (
- acpi_object_type type,
- acpi_handle start_node,
- u32 max_depth,
- u8 unlock_before_callback,
- acpi_walk_callback user_function,
- void *context,
- void **return_value)
+ acpi_object_type type,
+ acpi_handle start_node,
+ u32 max_depth,
+ u8 unlock_before_callback,
+ acpi_walk_callback user_function,
+ void *context,
+ void **return_value)
{
- acpi_status status;
- acpi_namespace_node *child_node;
- acpi_namespace_node *parent_node;
- acpi_object_type child_type;
- u32 level;
+ acpi_status status;
+ struct acpi_namespace_node *child_node;
+ struct acpi_namespace_node *parent_node;
+ acpi_object_type child_type;
+ u32 level;
ACPI_FUNCTION_TRACE ("ns_walk_namespace");
diff --git a/drivers/acpi/namespace/nsxfeval.c b/drivers/acpi/namespace/nsxfeval.c
index ad2d54aed397..8b0fa0f406f4 100644
--- a/drivers/acpi/namespace/nsxfeval.c
+++ b/drivers/acpi/namespace/nsxfeval.c
@@ -6,7 +6,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -55,14 +55,14 @@
acpi_status
acpi_evaluate_object_typed (
- acpi_handle handle,
- acpi_string pathname,
- acpi_object_list *external_params,
- acpi_buffer *return_buffer,
- acpi_object_type return_type)
+ acpi_handle handle,
+ acpi_string pathname,
+ struct acpi_object_list *external_params,
+ struct acpi_buffer *return_buffer,
+ acpi_object_type return_type)
{
- acpi_status status;
- u8 must_free = FALSE;
+ acpi_status status;
+ u8 must_free = FALSE;
ACPI_FUNCTION_TRACE ("acpi_evaluate_object_typed");
@@ -102,7 +102,7 @@ acpi_evaluate_object_typed (
/* Examine the object type returned from evaluate_object */
- if (((acpi_object *) return_buffer->pointer)->type == return_type) {
+ if (((union acpi_object *) return_buffer->pointer)->type == return_type) {
return_ACPI_STATUS (AE_OK);
}
@@ -110,7 +110,7 @@ acpi_evaluate_object_typed (
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Incorrect return type [%s] requested [%s]\n",
- acpi_ut_get_type_name (((acpi_object *) return_buffer->pointer)->type),
+ acpi_ut_get_type_name (((union acpi_object *) return_buffer->pointer)->type),
acpi_ut_get_type_name (return_type)));
if (must_free) {
@@ -147,16 +147,16 @@ acpi_evaluate_object_typed (
acpi_status
acpi_evaluate_object (
- acpi_handle handle,
- acpi_string pathname,
- acpi_object_list *external_params,
- acpi_buffer *return_buffer)
+ acpi_handle handle,
+ acpi_string pathname,
+ struct acpi_object_list *external_params,
+ struct acpi_buffer *return_buffer)
{
- acpi_status status;
- acpi_operand_object **internal_params = NULL;
- acpi_operand_object *internal_return_obj = NULL;
- acpi_size buffer_space_needed;
- u32 i;
+ acpi_status status;
+ union acpi_operand_object **internal_params = NULL;
+ union acpi_operand_object *internal_return_obj = NULL;
+ acpi_size buffer_space_needed;
+ u32 i;
ACPI_FUNCTION_TRACE ("acpi_evaluate_object");
@@ -357,14 +357,14 @@ acpi_evaluate_object (
acpi_status
acpi_walk_namespace (
- acpi_object_type type,
- acpi_handle start_object,
- u32 max_depth,
- acpi_walk_callback user_function,
- void *context,
- void **return_value)
+ acpi_object_type type,
+ acpi_handle start_object,
+ u32 max_depth,
+ acpi_walk_callback user_function,
+ void *context,
+ void **return_value)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_walk_namespace");
@@ -413,17 +413,17 @@ acpi_walk_namespace (
static acpi_status
acpi_ns_get_device_callback (
- acpi_handle obj_handle,
- u32 nesting_level,
- void *context,
- void **return_value)
+ acpi_handle obj_handle,
+ u32 nesting_level,
+ void *context,
+ void **return_value)
{
- acpi_status status;
- acpi_namespace_node *node;
- u32 flags;
- acpi_device_id hid;
- acpi_device_id cid;
- acpi_get_devices_info *info;
+ acpi_status status;
+ struct acpi_namespace_node *node;
+ u32 flags;
+ struct acpi_device_id hid;
+ struct acpi_device_id cid;
+ struct acpi_get_devices_info *info;
info = context;
@@ -517,13 +517,13 @@ acpi_ns_get_device_callback (
acpi_status
acpi_get_devices (
- char *HID,
- acpi_walk_callback user_function,
- void *context,
- void **return_value)
+ char *HID,
+ acpi_walk_callback user_function,
+ void *context,
+ void **return_value)
{
- acpi_status status;
- acpi_get_devices_info info;
+ acpi_status status;
+ struct acpi_get_devices_info info;
ACPI_FUNCTION_TRACE ("acpi_get_devices");
@@ -581,12 +581,12 @@ acpi_get_devices (
acpi_status
acpi_attach_data (
- acpi_handle obj_handle,
- acpi_object_handler handler,
- void *data)
+ acpi_handle obj_handle,
+ acpi_object_handler handler,
+ void *data)
{
- acpi_namespace_node *node;
- acpi_status status;
+ struct acpi_namespace_node *node;
+ acpi_status status;
/* Parameter validation */
@@ -633,11 +633,11 @@ unlock_and_exit:
acpi_status
acpi_detach_data (
- acpi_handle obj_handle,
- acpi_object_handler handler)
+ acpi_handle obj_handle,
+ acpi_object_handler handler)
{
- acpi_namespace_node *node;
- acpi_status status;
+ struct acpi_namespace_node *node;
+ acpi_status status;
/* Parameter validation */
@@ -684,12 +684,12 @@ unlock_and_exit:
acpi_status
acpi_get_data (
- acpi_handle obj_handle,
- acpi_object_handler handler,
- void **data)
+ acpi_handle obj_handle,
+ acpi_object_handler handler,
+ void **data)
{
- acpi_namespace_node *node;
- acpi_status status;
+ struct acpi_namespace_node *node;
+ acpi_status status;
/* Parameter validation */
diff --git a/drivers/acpi/namespace/nsxfname.c b/drivers/acpi/namespace/nsxfname.c
index 82e66cea7402..7968df956ac7 100644
--- a/drivers/acpi/namespace/nsxfname.c
+++ b/drivers/acpi/namespace/nsxfname.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -52,13 +52,13 @@
acpi_status
acpi_get_handle (
- acpi_handle parent,
- acpi_string pathname,
- acpi_handle *ret_handle)
+ acpi_handle parent,
+ acpi_string pathname,
+ acpi_handle *ret_handle)
{
- acpi_status status;
- acpi_namespace_node *node = NULL;
- acpi_namespace_node *prefix_node = NULL;
+ acpi_status status;
+ struct acpi_namespace_node *node = NULL;
+ struct acpi_namespace_node *prefix_node = NULL;
ACPI_FUNCTION_ENTRY ();
@@ -129,12 +129,12 @@ acpi_get_handle (
acpi_status
acpi_get_name (
- acpi_handle handle,
- u32 name_type,
- acpi_buffer *buffer)
+ acpi_handle handle,
+ u32 name_type,
+ struct acpi_buffer *buffer)
{
- acpi_status status;
- acpi_namespace_node *node;
+ acpi_status status;
+ struct acpi_namespace_node *node;
/* Parameter validation */
@@ -209,15 +209,15 @@ unlock_and_exit:
acpi_status
acpi_get_object_info (
- acpi_handle handle,
- acpi_device_info *info)
+ acpi_handle handle,
+ struct acpi_device_info *info)
{
- acpi_device_id hid;
- acpi_device_id uid;
- acpi_status status;
- u32 device_status = 0;
- acpi_integer address = 0;
- acpi_namespace_node *node;
+ struct acpi_device_id hid;
+ struct acpi_device_id uid;
+ acpi_status status;
+ u32 device_status = 0;
+ acpi_integer address = 0;
+ struct acpi_namespace_node *node;
/* Parameter validation */
diff --git a/drivers/acpi/namespace/nsxfobj.c b/drivers/acpi/namespace/nsxfobj.c
index 1c803eefc285..87c06e25bdad 100644
--- a/drivers/acpi/namespace/nsxfobj.c
+++ b/drivers/acpi/namespace/nsxfobj.c
@@ -6,7 +6,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -46,11 +46,11 @@
acpi_status
acpi_get_type (
- acpi_handle handle,
- acpi_object_type *ret_type)
+ acpi_handle handle,
+ acpi_object_type *ret_type)
{
- acpi_namespace_node *node;
- acpi_status status;
+ struct acpi_namespace_node *node;
+ acpi_status status;
/* Parameter Validation */
@@ -105,11 +105,11 @@ acpi_get_type (
acpi_status
acpi_get_parent (
- acpi_handle handle,
- acpi_handle *ret_handle)
+ acpi_handle handle,
+ acpi_handle *ret_handle)
{
- acpi_namespace_node *node;
- acpi_status status;
+ struct acpi_namespace_node *node;
+ acpi_status status;
if (!ret_handle) {
@@ -174,15 +174,15 @@ unlock_and_exit:
acpi_status
acpi_get_next_object (
- acpi_object_type type,
- acpi_handle parent,
- acpi_handle child,
- acpi_handle *ret_handle)
+ acpi_object_type type,
+ acpi_handle parent,
+ acpi_handle child,
+ acpi_handle *ret_handle)
{
- acpi_status status;
- acpi_namespace_node *node;
- acpi_namespace_node *parent_node = NULL;
- acpi_namespace_node *child_node = NULL;
+ acpi_status status;
+ struct acpi_namespace_node *node;
+ struct acpi_namespace_node *parent_node = NULL;
+ struct acpi_namespace_node *child_node = NULL;
/* Parameter validation */
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index b51c45dbd3fe..1b1327cf3dc1 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -50,11 +50,11 @@ ACPI_MODULE_NAME ("osl")
#define PREFIX "ACPI: "
-typedef struct
+struct acpi_os_dpc
{
OSD_EXECUTION_CALLBACK function;
void *context;
-} ACPI_OS_DPC;
+};
#ifdef ENABLE_DEBUGGER
@@ -138,7 +138,7 @@ acpi_os_free(void *ptr)
}
acpi_status
-acpi_os_get_root_pointer(u32 flags, acpi_pointer *addr)
+acpi_os_get_root_pointer(u32 flags, struct acpi_pointer *addr)
{
#ifdef CONFIG_ACPI_EFI
addr->pointer_type = ACPI_PHYSICAL_POINTER;
@@ -204,7 +204,8 @@ acpi_os_get_physical_address(void *virt, acpi_physical_address *phys)
}
acpi_status
-acpi_os_table_override (acpi_table_header *existing_table, acpi_table_header **new_table)
+acpi_os_table_override (struct acpi_table_header *existing_table,
+ struct acpi_table_header **new_table)
{
if (!existing_table || !new_table)
return AE_BAD_PARAMETER;
@@ -418,10 +419,10 @@ acpi_os_write_memory(
acpi_status
acpi_os_read_pci_configuration (
- acpi_pci_id *pci_id,
- u32 reg,
- void *value,
- u32 width)
+ struct acpi_pci_id *pci_id,
+ u32 reg,
+ void *value,
+ u32 width)
{
int result = 0;
int size = 0;
@@ -454,10 +455,10 @@ acpi_os_read_pci_configuration (
acpi_status
acpi_os_write_pci_configuration (
- acpi_pci_id *pci_id,
- u32 reg,
- acpi_integer value,
- u32 width)
+ struct acpi_pci_id *pci_id,
+ u32 reg,
+ acpi_integer value,
+ u32 width)
{
int result = 0;
int size = 0;
@@ -487,16 +488,16 @@ acpi_os_write_pci_configuration (
/* TODO: Change code to take advantage of driver model more */
void
acpi_os_derive_pci_id (
- acpi_handle rhandle, /* upper bound */
- acpi_handle chandle, /* current node */
- acpi_pci_id **id)
+ acpi_handle rhandle, /* upper bound */
+ acpi_handle chandle, /* current node */
+ struct acpi_pci_id **id)
{
- acpi_handle handle;
- acpi_pci_id *pci_id = *id;
- acpi_status status;
- unsigned long temp;
- acpi_object_type type;
- u8 tu8;
+ acpi_handle handle;
+ struct acpi_pci_id *pci_id = *id;
+ acpi_status status;
+ unsigned long temp;
+ acpi_object_type type;
+ u8 tu8;
acpi_get_parent(chandle, &handle);
if (handle != rhandle) {
@@ -546,57 +547,25 @@ acpi_os_read_pci_configuration (
#endif /*CONFIG_ACPI_PCI*/
-
-/*
- * See acpi_os_queue_for_execution()
- */
-static int
-acpi_os_queue_exec (
- void *context)
-{
- ACPI_OS_DPC *dpc = (ACPI_OS_DPC*)context;
-
- ACPI_FUNCTION_TRACE ("os_queue_exec");
-
- daemonize();
- strcpy(current->comm, "kacpidpc");
-
- if (!dpc || !dpc->function)
- return_ACPI_STATUS (AE_BAD_PARAMETER);
-
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Executing function [%p(%p)].\n", dpc->function, dpc->context));
-
- dpc->function(dpc->context);
-
- kfree(dpc);
-
- return_ACPI_STATUS (AE_OK);
-}
-
static void
-acpi_os_schedule_exec (
+acpi_os_execute_deferred (
void *context)
{
- ACPI_OS_DPC *dpc = NULL;
- int thread_pid = -1;
+ struct acpi_os_dpc *dpc = NULL;
- ACPI_FUNCTION_TRACE ("os_schedule_exec");
+ ACPI_FUNCTION_TRACE ("os_execute_deferred");
- dpc = (ACPI_OS_DPC*)context;
+ dpc = (struct acpi_os_dpc *) context;
if (!dpc) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Invalid (NULL) context.\n"));
return_VOID;
}
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Creating new thread to run function [%p(%p)].\n", dpc->function, dpc->context));
+ dpc->function(dpc->context);
- thread_pid = kernel_thread(acpi_os_queue_exec, dpc,
- (CLONE_FS | CLONE_FILES | SIGCHLD));
- if (thread_pid < 0) {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Call to kernel_thread() failed.\n"));
- acpi_os_free(dpc);
- }
- return_VOID;
+ kfree(dpc);
+
+ return_VOID;
}
acpi_status
@@ -606,7 +575,8 @@ acpi_os_queue_for_execution(
void *context)
{
acpi_status status = AE_OK;
- ACPI_OS_DPC *dpc = NULL;
+ struct acpi_os_dpc *dpc;
+ struct work_struct *task;
ACPI_FUNCTION_TRACE ("os_queue_for_execution");
@@ -616,61 +586,30 @@ acpi_os_queue_for_execution(
return_ACPI_STATUS (AE_BAD_PARAMETER);
/*
- * Queue via DPC:
- * --------------
- * Note that we have to use two different processes for queuing DPCs:
- * Interrupt-Level: Use schedule_work; can't spawn a new thread.
- * Kernel-Level: Spawn a new kernel thread, as schedule_work has
- * its limitations (e.g. single-threaded model), and
- * all other task queues run at interrupt-level.
+ * Allocate/initialize DPC structure. Note that this memory will be
+ * freed by the callee. The kernel handles the tq_struct list in a
+ * way that allows us to also free its memory inside the callee.
+ * Because we may want to schedule several tasks with different
+ * parameters we can't use the approach some kernel code uses of
+ * having a static tq_struct.
+ * We can save time and code by allocating the DPC and tq_structs
+ * from the same memory.
*/
- switch (priority) {
- case OSD_PRIORITY_GPE:
- {
- /*
- * Allocate/initialize DPC structure. Note that this memory will be
- * freed by the callee. The kernel handles the tq_struct list in a
- * way that allows us to also free its memory inside the callee.
- * Because we may want to schedule several tasks with different
- * parameters we can't use the approach some kernel code uses of
- * having a static tq_struct.
- * We can save time and code by allocating the DPC and tq_structs
- * from the same memory.
- */
- struct work_struct *task;
-
- dpc = kmalloc(sizeof(ACPI_OS_DPC)+sizeof(struct work_struct), GFP_ATOMIC);
- if (!dpc)
- return_ACPI_STATUS (AE_NO_MEMORY);
+ dpc = kmalloc(sizeof(struct acpi_os_dpc)+sizeof(struct work_struct), GFP_ATOMIC);
+ if (!dpc)
+ return_ACPI_STATUS (AE_NO_MEMORY);
- dpc->function = function;
- dpc->context = context;
+ dpc->function = function;
+ dpc->context = context;
- task = (void *)(dpc+1);
- INIT_WORK(task, acpi_os_schedule_exec, (void*)dpc);
+ task = (void *)(dpc+1);
+ INIT_WORK(task, acpi_os_execute_deferred, (void*)dpc);
- if (!schedule_work(task)) {
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Call to schedule_work() failed.\n"));
- kfree(dpc);
- status = AE_ERROR;
- }
- }
- break;
- default:
- /*
- * Allocate/initialize DPC structure. Note that this memory will be
- * freed by the callee.
- */
- dpc = kmalloc(sizeof(ACPI_OS_DPC), GFP_KERNEL);
- if (!dpc)
- return_ACPI_STATUS (AE_NO_MEMORY);
-
- dpc->function = function;
- dpc->context = context;
-
- acpi_os_schedule_exec(dpc);
- break;
+ if (!schedule_work(task)) {
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Call to schedule_work() failed.\n"));
+ kfree(dpc);
+ status = AE_ERROR;
}
return_ACPI_STATUS (status);
diff --git a/drivers/acpi/parser/psargs.c b/drivers/acpi/parser/psargs.c
index 61f8b9de9ffc..c70500e35d9e 100644
--- a/drivers/acpi/parser/psargs.c
+++ b/drivers/acpi/parser/psargs.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -47,10 +47,10 @@
u32
acpi_ps_get_next_package_length (
- acpi_parse_state *parser_state)
+ struct acpi_parse_state *parser_state)
{
- u32 encoded_length;
- u32 length = 0;
+ u32 encoded_length;
+ u32 length = 0;
ACPI_FUNCTION_TRACE ("ps_get_next_package_length");
@@ -118,10 +118,10 @@ acpi_ps_get_next_package_length (
u8 *
acpi_ps_get_next_package_end (
- acpi_parse_state *parser_state)
+ struct acpi_parse_state *parser_state)
{
- u8 *start = parser_state->aml;
- acpi_native_uint length;
+ u8 *start = parser_state->aml;
+ acpi_native_uint length;
ACPI_FUNCTION_TRACE ("ps_get_next_package_end");
@@ -152,10 +152,10 @@ acpi_ps_get_next_package_end (
char *
acpi_ps_get_next_namestring (
- acpi_parse_state *parser_state)
+ struct acpi_parse_state *parser_state)
{
- u8 *start = parser_state->aml;
- u8 *end = parser_state->aml;
+ u8 *start = parser_state->aml;
+ u8 *end = parser_state->aml;
ACPI_FUNCTION_TRACE ("ps_get_next_namestring");
@@ -232,17 +232,17 @@ acpi_ps_get_next_namestring (
acpi_status
acpi_ps_get_next_namepath (
- acpi_walk_state *walk_state,
- acpi_parse_state *parser_state,
- acpi_parse_object *arg,
- u8 method_call)
+ struct acpi_walk_state *walk_state,
+ struct acpi_parse_state *parser_state,
+ union acpi_parse_object *arg,
+ u8 method_call)
{
- char *path;
- acpi_parse_object *name_op;
- acpi_status status = AE_OK;
- acpi_operand_object *method_desc;
- acpi_namespace_node *node;
- acpi_generic_state scope_info;
+ char *path;
+ union acpi_parse_object *name_op;
+ acpi_status status = AE_OK;
+ union acpi_operand_object *method_desc;
+ struct acpi_namespace_node *node;
+ union acpi_generic_state scope_info;
ACPI_FUNCTION_TRACE ("ps_get_next_namepath");
@@ -370,9 +370,9 @@ acpi_ps_get_next_namepath (
void
acpi_ps_get_next_simple_arg (
- acpi_parse_state *parser_state,
- u32 arg_type,
- acpi_parse_object *arg)
+ struct acpi_parse_state *parser_state,
+ u32 arg_type,
+ union acpi_parse_object *arg)
{
ACPI_FUNCTION_TRACE_U32 ("ps_get_next_simple_arg", arg_type);
@@ -462,15 +462,15 @@ acpi_ps_get_next_simple_arg (
*
******************************************************************************/
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_get_next_field (
- acpi_parse_state *parser_state)
+ struct acpi_parse_state *parser_state)
{
- u32 aml_offset = ACPI_PTR_DIFF (parser_state->aml,
+ u32 aml_offset = ACPI_PTR_DIFF (parser_state->aml,
parser_state->aml_start);
- acpi_parse_object *field;
- u16 opcode;
- u32 name;
+ union acpi_parse_object *field;
+ u16 opcode;
+ u32 name;
ACPI_FUNCTION_TRACE ("ps_get_next_field");
@@ -572,16 +572,16 @@ acpi_ps_get_next_field (
acpi_status
acpi_ps_get_next_arg (
- acpi_walk_state *walk_state,
- acpi_parse_state *parser_state,
- u32 arg_type,
- acpi_parse_object **return_arg)
+ struct acpi_walk_state *walk_state,
+ struct acpi_parse_state *parser_state,
+ u32 arg_type,
+ union acpi_parse_object **return_arg)
{
- acpi_parse_object *arg = NULL;
- acpi_parse_object *prev = NULL;
- acpi_parse_object *field;
- u32 subop;
- acpi_status status = AE_OK;
+ union acpi_parse_object *arg = NULL;
+ union acpi_parse_object *prev = NULL;
+ union acpi_parse_object *field;
+ u32 subop;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_PTR ("ps_get_next_arg", parser_state);
diff --git a/drivers/acpi/parser/psopcode.c b/drivers/acpi/parser/psopcode.c
index ce06d322d3a7..98d292f001b0 100644
--- a/drivers/acpi/parser/psopcode.c
+++ b/drivers/acpi/parser/psopcode.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -447,7 +447,7 @@
*/
-const acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES] =
+const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES] =
{
/*! [Begin] no source code translation */
/* Index Name Parser Args Interpreter Args ObjectType Class Type Flags */
@@ -675,9 +675,9 @@ static const u8 acpi_gbl_long_op_index[NUM_EXTENDED_OPCODE] =
*
******************************************************************************/
-const acpi_opcode_info *
+const struct acpi_opcode_info *
acpi_ps_get_opcode_info (
- u16 opcode)
+ u16 opcode)
{
ACPI_FUNCTION_NAME ("ps_get_opcode_info");
@@ -731,11 +731,11 @@ acpi_ps_get_opcode_info (
char *
acpi_ps_get_opcode_name (
- u16 opcode)
+ u16 opcode)
{
#if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUG_OUTPUT)
- const acpi_opcode_info *op;
+ const struct acpi_opcode_info *op;
op = acpi_ps_get_opcode_info (opcode);
diff --git a/drivers/acpi/parser/psparse.c b/drivers/acpi/parser/psparse.c
index 45329040f40d..fc1a1c95ab9f 100644
--- a/drivers/acpi/parser/psparse.c
+++ b/drivers/acpi/parser/psparse.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -43,7 +43,7 @@
ACPI_MODULE_NAME ("psparse")
-static u32 acpi_gbl_depth = 0;
+static u32 acpi_gbl_depth = 0;
/*******************************************************************************
@@ -60,7 +60,7 @@ static u32 acpi_gbl_depth = 0;
u32
acpi_ps_get_opcode_size (
- u32 opcode)
+ u32 opcode)
{
/* Extended (2-byte) opcode if > 255 */
@@ -89,10 +89,10 @@ acpi_ps_get_opcode_size (
u16
acpi_ps_peek_opcode (
- acpi_parse_state *parser_state)
+ struct acpi_parse_state *parser_state)
{
- u8 *aml;
- u16 opcode;
+ u8 *aml;
+ u16 opcode;
aml = parser_state->aml;
@@ -125,13 +125,13 @@ acpi_ps_peek_opcode (
void
acpi_ps_complete_this_op (
- acpi_walk_state *walk_state,
- acpi_parse_object *op)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op)
{
- acpi_parse_object *prev;
- acpi_parse_object *next;
- const acpi_opcode_info *parent_info;
- acpi_parse_object *replacement_op = NULL;
+ union acpi_parse_object *prev;
+ union acpi_parse_object *next;
+ const struct acpi_opcode_info *parent_info;
+ union acpi_parse_object *replacement_op = NULL;
ACPI_FUNCTION_TRACE_PTR ("ps_complete_this_op", op);
@@ -281,12 +281,12 @@ acpi_ps_complete_this_op (
acpi_status
acpi_ps_next_parse_state (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- acpi_status callback_status)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ acpi_status callback_status)
{
- acpi_parse_state *parser_state = &walk_state->parser_state;
- acpi_status status = AE_CTRL_PENDING;
+ struct acpi_parse_state *parser_state = &walk_state->parser_state;
+ acpi_status status = AE_CTRL_PENDING;
ACPI_FUNCTION_TRACE_PTR ("ps_next_parse_state", op);
@@ -402,14 +402,14 @@ acpi_ps_next_parse_state (
acpi_status
acpi_ps_parse_loop (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
- acpi_parse_object *op = NULL; /* current op */
- acpi_parse_object *arg = NULL;
- acpi_parse_object pre_op;
- acpi_parse_state *parser_state;
- u8 *aml_op_start = NULL;
+ acpi_status status = AE_OK;
+ union acpi_parse_object *op = NULL; /* current op */
+ union acpi_parse_object *arg = NULL;
+ union acpi_parse_object pre_op;
+ struct acpi_parse_state *parser_state;
+ u8 *aml_op_start = NULL;
ACPI_FUNCTION_TRACE_PTR ("ps_parse_loop", walk_state);
@@ -1029,13 +1029,13 @@ close_this_op:
acpi_status
acpi_ps_parse_aml (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
- acpi_status status;
- acpi_status terminate_status;
- acpi_thread_state *thread;
- acpi_thread_state *prev_walk_list = acpi_gbl_current_walk_list;
- acpi_walk_state *previous_walk_state;
+ acpi_status status;
+ acpi_status terminate_status;
+ struct acpi_thread_state *thread;
+ struct acpi_thread_state *prev_walk_list = acpi_gbl_current_walk_list;
+ struct acpi_walk_state *previous_walk_state;
ACPI_FUNCTION_TRACE ("ps_parse_aml");
@@ -1175,7 +1175,7 @@ acpi_ps_parse_aml (
/* Normal exit */
acpi_ex_release_all_mutexes (thread);
- acpi_ut_delete_generic_state (ACPI_CAST_PTR (acpi_generic_state, thread));
+ acpi_ut_delete_generic_state (ACPI_CAST_PTR (union acpi_generic_state, thread));
acpi_gbl_current_walk_list = prev_walk_list;
return_ACPI_STATUS (status);
}
diff --git a/drivers/acpi/parser/psscope.c b/drivers/acpi/parser/psscope.c
index 9595daea94f0..96426a654d4e 100644
--- a/drivers/acpi/parser/psscope.c
+++ b/drivers/acpi/parser/psscope.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -42,9 +42,9 @@
*
******************************************************************************/
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_get_parent_scope (
- acpi_parse_state *parser_state)
+ struct acpi_parse_state *parser_state)
{
return (parser_state->scope->parse_scope.op);
}
@@ -66,7 +66,7 @@ acpi_ps_get_parent_scope (
u8
acpi_ps_has_completed_scope (
- acpi_parse_state *parser_state)
+ struct acpi_parse_state *parser_state)
{
return ((u8) ((parser_state->aml >= parser_state->scope->parse_scope.arg_end ||
!parser_state->scope->parse_scope.arg_count)));
@@ -88,10 +88,10 @@ acpi_ps_has_completed_scope (
acpi_status
acpi_ps_init_scope (
- acpi_parse_state *parser_state,
- acpi_parse_object *root_op)
+ struct acpi_parse_state *parser_state,
+ union acpi_parse_object *root_op)
{
- acpi_generic_state *scope;
+ union acpi_generic_state *scope;
ACPI_FUNCTION_TRACE_PTR ("ps_init_scope", root_op);
@@ -132,12 +132,12 @@ acpi_ps_init_scope (
acpi_status
acpi_ps_push_scope (
- acpi_parse_state *parser_state,
- acpi_parse_object *op,
- u32 remaining_args,
- u32 arg_count)
+ struct acpi_parse_state *parser_state,
+ union acpi_parse_object *op,
+ u32 remaining_args,
+ u32 arg_count)
{
- acpi_generic_state *scope;
+ union acpi_generic_state *scope;
ACPI_FUNCTION_TRACE_PTR ("ps_push_scope", op);
@@ -194,12 +194,12 @@ acpi_ps_push_scope (
void
acpi_ps_pop_scope (
- acpi_parse_state *parser_state,
- acpi_parse_object **op,
- u32 *arg_list,
- u32 *arg_count)
+ struct acpi_parse_state *parser_state,
+ union acpi_parse_object **op,
+ u32 *arg_list,
+ u32 *arg_count)
{
- acpi_generic_state *scope = parser_state->scope;
+ union acpi_generic_state *scope = parser_state->scope;
ACPI_FUNCTION_TRACE ("ps_pop_scope");
@@ -252,9 +252,9 @@ acpi_ps_pop_scope (
void
acpi_ps_cleanup_scope (
- acpi_parse_state *parser_state)
+ struct acpi_parse_state *parser_state)
{
- acpi_generic_state *scope;
+ union acpi_generic_state *scope;
ACPI_FUNCTION_TRACE_PTR ("ps_cleanup_scope", parser_state);
diff --git a/drivers/acpi/parser/pstree.c b/drivers/acpi/parser/pstree.c
index 9d617381a5e1..7a26b072ada6 100644
--- a/drivers/acpi/parser/pstree.c
+++ b/drivers/acpi/parser/pstree.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -44,13 +44,13 @@
*
******************************************************************************/
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_get_arg (
- acpi_parse_object *op,
- u32 argn)
+ union acpi_parse_object *op,
+ u32 argn)
{
- acpi_parse_object *arg = NULL;
- const acpi_opcode_info *op_info;
+ union acpi_parse_object *arg = NULL;
+ const struct acpi_opcode_info *op_info;
ACPI_FUNCTION_ENTRY ();
@@ -100,11 +100,11 @@ acpi_ps_get_arg (
void
acpi_ps_append_arg (
- acpi_parse_object *op,
- acpi_parse_object *arg)
+ union acpi_parse_object *op,
+ union acpi_parse_object *arg)
{
- acpi_parse_object *prev_arg;
- const acpi_opcode_info *op_info;
+ union acpi_parse_object *prev_arg;
+ const struct acpi_opcode_info *op_info;
ACPI_FUNCTION_ENTRY ();
@@ -174,11 +174,11 @@ acpi_ps_append_arg (
*
******************************************************************************/
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_get_child (
- acpi_parse_object *op)
+ union acpi_parse_object *op)
{
- acpi_parse_object *child = NULL;
+ union acpi_parse_object *child = NULL;
ACPI_FUNCTION_ENTRY ();
@@ -243,14 +243,14 @@ acpi_ps_get_child (
*
******************************************************************************/
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_get_depth_next (
- acpi_parse_object *origin,
- acpi_parse_object *op)
+ union acpi_parse_object *origin,
+ union acpi_parse_object *op)
{
- acpi_parse_object *next = NULL;
- acpi_parse_object *parent;
- acpi_parse_object *arg;
+ union acpi_parse_object *next = NULL;
+ union acpi_parse_object *parent;
+ union acpi_parse_object *arg;
ACPI_FUNCTION_ENTRY ();
diff --git a/drivers/acpi/parser/psutils.c b/drivers/acpi/parser/psutils.c
index ce445012ab46..aea613f8f0b2 100644
--- a/drivers/acpi/parser/psutils.c
+++ b/drivers/acpi/parser/psutils.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -44,11 +44,11 @@
*
******************************************************************************/
-acpi_parse_object *
+union acpi_parse_object *
acpi_ps_create_scope_op (
void)
{
- acpi_parse_object *scope_op;
+ union acpi_parse_object *scope_op;
scope_op = acpi_ps_alloc_op (AML_SCOPE_OP);
@@ -78,8 +78,8 @@ acpi_ps_create_scope_op (
void
acpi_ps_init_op (
- acpi_parse_object *op,
- u16 opcode)
+ union acpi_parse_object *op,
+ u16 opcode)
{
ACPI_FUNCTION_ENTRY ();
@@ -106,14 +106,14 @@ acpi_ps_init_op (
*
******************************************************************************/
-acpi_parse_object*
+union acpi_parse_object*
acpi_ps_alloc_op (
- u16 opcode)
+ u16 opcode)
{
- acpi_parse_object *op = NULL;
- u32 size;
- u8 flags;
- const acpi_opcode_info *op_info;
+ union acpi_parse_object *op = NULL;
+ u32 size;
+ u8 flags;
+ const struct acpi_opcode_info *op_info;
ACPI_FUNCTION_ENTRY ();
@@ -124,23 +124,23 @@ acpi_ps_alloc_op (
/* Allocate the minimum required size object */
if (op_info->flags & AML_DEFER) {
- size = sizeof (acpi_parse_obj_named);
+ size = sizeof (struct acpi_parse_obj_named);
flags = ACPI_PARSEOP_DEFERRED;
}
else if (op_info->flags & AML_NAMED) {
- size = sizeof (acpi_parse_obj_named);
+ size = sizeof (struct acpi_parse_obj_named);
flags = ACPI_PARSEOP_NAMED;
}
else if (opcode == AML_INT_BYTELIST_OP) {
- size = sizeof (acpi_parse_obj_named);
+ size = sizeof (struct acpi_parse_obj_named);
flags = ACPI_PARSEOP_BYTELIST;
}
else {
- size = sizeof (acpi_parse_obj_common);
+ size = sizeof (struct acpi_parse_obj_common);
flags = ACPI_PARSEOP_GENERIC;
}
- if (size == sizeof (acpi_parse_obj_common)) {
+ if (size == sizeof (struct acpi_parse_obj_common)) {
/*
* The generic op is by far the most common (16 to 1)
*/
@@ -176,7 +176,7 @@ acpi_ps_alloc_op (
void
acpi_ps_free_op (
- acpi_parse_object *op)
+ union acpi_parse_object *op)
{
ACPI_FUNCTION_NAME ("ps_free_op");
@@ -233,7 +233,7 @@ acpi_ps_delete_parse_cache (
*/
u8
acpi_ps_is_leading_char (
- u32 c)
+ u32 c)
{
return ((u8) (c == '_' || (c >= 'A' && c <= 'Z')));
}
@@ -244,7 +244,7 @@ acpi_ps_is_leading_char (
*/
u8
acpi_ps_is_prefix_char (
- u32 c)
+ u32 c)
{
return ((u8) (c == '\\' || c == '^'));
}
@@ -255,7 +255,7 @@ acpi_ps_is_prefix_char (
*/
u32
acpi_ps_get_name (
- acpi_parse_object *op)
+ union acpi_parse_object *op)
{
@@ -276,8 +276,8 @@ acpi_ps_get_name (
*/
void
acpi_ps_set_name (
- acpi_parse_object *op,
- u32 name)
+ union acpi_parse_object *op,
+ u32 name)
{
/* The "generic" object has no name associated with it */
diff --git a/drivers/acpi/parser/pswalk.c b/drivers/acpi/parser/pswalk.c
index 81766b1150ac..78d98da30fca 100644
--- a/drivers/acpi/parser/pswalk.c
+++ b/drivers/acpi/parser/pswalk.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -47,14 +47,14 @@
acpi_status
acpi_ps_get_next_walk_op (
- acpi_walk_state *walk_state,
- acpi_parse_object *op,
- acpi_parse_upwards ascending_callback)
+ struct acpi_walk_state *walk_state,
+ union acpi_parse_object *op,
+ acpi_parse_upwards ascending_callback)
{
- acpi_parse_object *next;
- acpi_parse_object *parent;
- acpi_parse_object *grand_parent;
- acpi_status status;
+ union acpi_parse_object *next;
+ union acpi_parse_object *parent;
+ union acpi_parse_object *grand_parent;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ps_get_next_walk_op", op);
@@ -208,7 +208,7 @@ acpi_ps_get_next_walk_op (
acpi_status
acpi_ps_delete_completed_op (
- acpi_walk_state *walk_state)
+ struct acpi_walk_state *walk_state)
{
acpi_ps_free_op (walk_state->op);
@@ -230,11 +230,11 @@ acpi_ps_delete_completed_op (
void
acpi_ps_delete_parse_tree (
- acpi_parse_object *subtree_root)
+ union acpi_parse_object *subtree_root)
{
- acpi_walk_state *walk_state;
- acpi_thread_state *thread;
- acpi_status status;
+ struct acpi_walk_state *walk_state;
+ struct acpi_thread_state *thread;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ps_delete_parse_tree", subtree_root);
@@ -279,7 +279,7 @@ acpi_ps_delete_parse_tree (
/* We are done with this walk */
- acpi_ut_delete_generic_state (ACPI_CAST_PTR (acpi_generic_state, thread));
+ acpi_ut_delete_generic_state (ACPI_CAST_PTR (union acpi_generic_state, thread));
acpi_ds_delete_walk_state (walk_state);
return_VOID;
diff --git a/drivers/acpi/parser/psxface.c b/drivers/acpi/parser/psxface.c
index 629072c4c461..e5ef29d90caf 100644
--- a/drivers/acpi/parser/psxface.c
+++ b/drivers/acpi/parser/psxface.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -54,15 +54,15 @@
acpi_status
acpi_psx_execute (
- acpi_namespace_node *method_node,
- acpi_operand_object **params,
- acpi_operand_object **return_obj_desc)
+ struct acpi_namespace_node *method_node,
+ union acpi_operand_object **params,
+ union acpi_operand_object **return_obj_desc)
{
- acpi_status status;
- acpi_operand_object *obj_desc;
- u32 i;
- acpi_parse_object *op;
- acpi_walk_state *walk_state;
+ acpi_status status;
+ union acpi_operand_object *obj_desc;
+ u32 i;
+ union acpi_parse_object *op;
+ struct acpi_walk_state *walk_state;
ACPI_FUNCTION_TRACE ("psx_execute");
diff --git a/drivers/acpi/pci_bind.c b/drivers/acpi/pci_bind.c
index 80cdd4b7f498..08c4c87a394e 100644
--- a/drivers/acpi/pci_bind.c
+++ b/drivers/acpi/pci_bind.c
@@ -40,7 +40,7 @@
ACPI_MODULE_NAME ("pci_bind")
struct acpi_pci_data {
- acpi_pci_id id;
+ struct acpi_pci_id id;
struct pci_bus *bus;
struct pci_dev *dev;
};
@@ -70,7 +70,7 @@ acpi_pci_data_handler (
acpi_status
acpi_os_get_pci_id (
acpi_handle handle,
- acpi_pci_id *id)
+ struct acpi_pci_id *id)
{
int result = 0;
acpi_status status = AE_OK;
@@ -125,7 +125,7 @@ acpi_pci_bind (
struct acpi_pci_data *data = NULL;
struct acpi_pci_data *pdata = NULL;
char pathname[ACPI_PATHNAME_MAX] = {0};
- acpi_buffer buffer = {ACPI_PATHNAME_MAX, pathname};
+ struct acpi_buffer buffer = {ACPI_PATHNAME_MAX, pathname};
acpi_handle handle = NULL;
ACPI_FUNCTION_TRACE("acpi_pci_bind");
@@ -261,14 +261,14 @@ end:
int
acpi_pci_bind_root (
struct acpi_device *device,
- acpi_pci_id *id,
+ struct acpi_pci_id *id,
struct pci_bus *bus)
{
int result = 0;
acpi_status status = AE_OK;
struct acpi_pci_data *data = NULL;
char pathname[ACPI_PATHNAME_MAX] = {0};
- acpi_buffer buffer = {ACPI_PATHNAME_MAX, pathname};
+ struct acpi_buffer buffer = {ACPI_PATHNAME_MAX, pathname};
ACPI_FUNCTION_TRACE("acpi_pci_bind_root");
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
index 167b18ce7603..34bc9725d3af 100644
--- a/drivers/acpi/pci_irq.c
+++ b/drivers/acpi/pci_irq.c
@@ -88,10 +88,10 @@ acpi_pci_irq_find_prt_entry (
static int
acpi_pci_irq_add_entry (
- acpi_handle handle,
- int segment,
- int bus,
- acpi_pci_routing_table *prt)
+ acpi_handle handle,
+ int segment,
+ int bus,
+ struct acpi_pci_routing_table *prt)
{
struct acpi_prt_entry *entry = NULL;
@@ -157,12 +157,12 @@ acpi_pci_irq_add_prt (
int segment,
int bus)
{
- acpi_status status = AE_OK;
- char pathname[ACPI_PATHNAME_MAX] = {0};
- acpi_buffer buffer = {0, NULL};
- acpi_pci_routing_table *prt = NULL;
- acpi_pci_routing_table *entry = NULL;
- static int first_time = 1;
+ acpi_status status = AE_OK;
+ char pathname[ACPI_PATHNAME_MAX] = {0};
+ struct acpi_buffer buffer = {0, NULL};
+ struct acpi_pci_routing_table *prt = NULL;
+ struct acpi_pci_routing_table *entry = NULL;
+ static int first_time = 1;
ACPI_FUNCTION_TRACE("acpi_pci_irq_add_prt");
@@ -215,7 +215,7 @@ acpi_pci_irq_add_prt (
while (entry && (entry->length > 0)) {
acpi_pci_irq_add_entry(handle, segment, bus, entry);
- entry = (acpi_pci_routing_table *)
+ entry = (struct acpi_pci_routing_table *)
((unsigned long) entry + entry->length);
}
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index e963e70a1986..f29ca7b90f53 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -96,8 +96,8 @@ acpi_pci_link_get_possible (
{
int result = 0;
acpi_status status = AE_OK;
- acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
- acpi_resource *resource = NULL;
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ struct acpi_resource *resource = NULL;
int i = 0;
ACPI_FUNCTION_TRACE("acpi_pci_link_get_possible");
@@ -112,7 +112,7 @@ acpi_pci_link_get_possible (
goto end;
}
- resource = (acpi_resource *) buffer.pointer;
+ resource = (struct acpi_resource *) buffer.pointer;
/* skip past dependent function resource (if present) */
if (resource->id == ACPI_RSTYPE_START_DPF)
@@ -121,7 +121,7 @@ acpi_pci_link_get_possible (
switch (resource->id) {
case ACPI_RSTYPE_IRQ:
{
- acpi_resource_irq *p = &resource->data.irq;
+ struct acpi_resource_irq *p = &resource->data.irq;
if (!p || !p->number_of_interrupts) {
ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Blank IRQ resource\n"));
result = -ENODEV;
@@ -139,7 +139,7 @@ acpi_pci_link_get_possible (
}
case ACPI_RSTYPE_EXT_IRQ:
{
- acpi_resource_ext_irq *p = &resource->data.extended_irq;
+ struct acpi_resource_ext_irq *p = &resource->data.extended_irq;
if (!p || !p->number_of_interrupts) {
ACPI_DEBUG_PRINT((ACPI_DB_WARN,
"Blank IRQ resource\n"));
@@ -180,8 +180,8 @@ acpi_pci_link_get_current (
{
int result = 0;
acpi_status status = AE_OK;
- acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
- acpi_resource *resource = NULL;
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ struct acpi_resource *resource = NULL;
int irq = 0;
ACPI_FUNCTION_TRACE("acpi_pci_link_get_current");
@@ -212,12 +212,12 @@ acpi_pci_link_get_current (
result = -ENODEV;
goto end;
}
- resource = (acpi_resource *) buffer.pointer;
+ resource = (struct acpi_resource *) buffer.pointer;
switch (resource->id) {
case ACPI_RSTYPE_IRQ:
{
- acpi_resource_irq *p = &resource->data.irq;
+ struct acpi_resource_irq *p = &resource->data.irq;
if (!p || !p->number_of_interrupts) {
ACPI_DEBUG_PRINT((ACPI_DB_WARN,
"Blank IRQ resource\n"));
@@ -229,7 +229,7 @@ acpi_pci_link_get_current (
}
case ACPI_RSTYPE_EXT_IRQ:
{
- acpi_resource_ext_irq *p = &resource->data.extended_irq;
+ struct acpi_resource_ext_irq *p = &resource->data.extended_irq;
if (!p || !p->number_of_interrupts) {
ACPI_DEBUG_PRINT((ACPI_DB_WARN,
"Blank IRQ resource\n"));
@@ -277,10 +277,10 @@ acpi_pci_link_set (
int result = 0;
acpi_status status = AE_OK;
struct {
- acpi_resource res;
- acpi_resource end;
+ struct acpi_resource res;
+ struct acpi_resource end;
} resource;
- acpi_buffer buffer = {sizeof(resource)+1, &resource};
+ struct acpi_buffer buffer = {sizeof(resource)+1, &resource};
int i = 0;
int valid = 0;
@@ -307,7 +307,7 @@ acpi_pci_link_set (
/* NOTE: PCI interrupts are always level / active_low / shared. */
resource.res.id = ACPI_RSTYPE_IRQ;
- resource.res.length = sizeof(acpi_resource);
+ resource.res.length = sizeof(struct acpi_resource);
resource.res.data.irq.edge_level = ACPI_LEVEL_SENSITIVE;
resource.res.data.irq.active_high_low = ACPI_ACTIVE_LOW;
resource.res.data.irq.shared_exclusive = ACPI_SHARED;
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 2b49bf7db36e..cf5c07e16855 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -62,7 +62,7 @@ static struct acpi_driver acpi_pci_root_driver = {
struct acpi_pci_root {
struct list_head node;
acpi_handle handle;
- acpi_pci_id id;
+ struct acpi_pci_id id;
struct pci_bus *bus;
u64 mem_tra;
u64 io_tra;
@@ -73,7 +73,7 @@ struct list_head acpi_pci_roots;
void
acpi_pci_get_translations (
- acpi_pci_id *id,
+ struct acpi_pci_id *id,
u64 *mem_tra,
u64 *io_tra)
{
@@ -98,12 +98,12 @@ acpi_pci_get_translations (
static u64
acpi_pci_root_bus_tra (
- acpi_resource *resource,
- int type)
+ struct acpi_resource *resource,
+ int type)
{
- acpi_resource_address16 *address16;
- acpi_resource_address32 *address32;
- acpi_resource_address64 *address64;
+ struct acpi_resource_address16 *address16;
+ struct acpi_resource_address32 *address32;
+ struct acpi_resource_address64 *address64;
while (1) {
switch (resource->id) {
@@ -111,27 +111,27 @@ acpi_pci_root_bus_tra (
return 0;
case ACPI_RSTYPE_ADDRESS16:
- address16 = (acpi_resource_address16 *) &resource->data;
+ address16 = (struct acpi_resource_address16 *) &resource->data;
if (type == address16->resource_type) {
return address16->address_translation_offset;
}
break;
case ACPI_RSTYPE_ADDRESS32:
- address32 = (acpi_resource_address32 *) &resource->data;
+ address32 = (struct acpi_resource_address32 *) &resource->data;
if (type == address32->resource_type) {
return address32->address_translation_offset;
}
break;
case ACPI_RSTYPE_ADDRESS64:
- address64 = (acpi_resource_address64 *) &resource->data;
+ address64 = (struct acpi_resource_address64 *) &resource->data;
if (type == address64->resource_type) {
return address64->address_translation_offset;
}
break;
}
- resource = ACPI_PTR_ADD (acpi_resource,
+ resource = ACPI_PTR_ADD (struct acpi_resource,
resource, resource->length);
}
@@ -144,7 +144,7 @@ acpi_pci_evaluate_crs (
struct acpi_pci_root *root)
{
acpi_status status;
- acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
ACPI_FUNCTION_TRACE("acpi_pci_evaluate_crs");
@@ -152,9 +152,9 @@ acpi_pci_evaluate_crs (
if (ACPI_FAILURE(status))
return_VALUE(-ENODEV);
- root->io_tra = acpi_pci_root_bus_tra ((acpi_resource *)
+ root->io_tra = acpi_pci_root_bus_tra ((struct acpi_resource *)
buffer.pointer, ACPI_IO_RANGE);
- root->mem_tra = acpi_pci_root_bus_tra ((acpi_resource *)
+ root->mem_tra = acpi_pci_root_bus_tra ((struct acpi_resource *)
buffer.pointer, ACPI_MEMORY_RANGE);
acpi_os_free(buffer.pointer);
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
index bbca62c3bb24..22e524cec5e8 100644
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -487,8 +487,8 @@ acpi_power_add (
int result = 0;
acpi_status status = AE_OK;
struct acpi_power_resource *resource = NULL;
- acpi_object acpi_object;
- acpi_buffer buffer = {sizeof(acpi_object), &acpi_object};
+ union acpi_object acpi_object;
+ struct acpi_buffer buffer = {sizeof(acpi_object), &acpi_object};
ACPI_FUNCTION_TRACE("acpi_power_add");
diff --git a/drivers/acpi/processor.c b/drivers/acpi/processor.c
index 800598d3ae5a..9c2bc028dce4 100644
--- a/drivers/acpi/processor.c
+++ b/drivers/acpi/processor.c
@@ -915,9 +915,9 @@ acpi_processor_get_performance_control (
{
int result = 0;
acpi_status status = 0;
- acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
- acpi_object *pct = NULL;
- acpi_object obj = {0};
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ union acpi_object *pct = NULL;
+ union acpi_object obj = {0};
struct acpi_pct_register *reg = NULL;
ACPI_FUNCTION_TRACE("acpi_processor_get_performance_control");
@@ -928,7 +928,7 @@ acpi_processor_get_performance_control (
return_VALUE(-ENODEV);
}
- pct = (acpi_object *) buffer.pointer;
+ pct = (union acpi_object *) buffer.pointer;
if (!pct || (pct->type != ACPI_TYPE_PACKAGE)
|| (pct->package.count != 2)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PCT data\n"));
@@ -1008,10 +1008,10 @@ acpi_processor_get_performance_states (
{
int result = 0;
acpi_status status = AE_OK;
- acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
- acpi_buffer format = {sizeof("NNNNNN"), "NNNNNN"};
- acpi_buffer state = {0, NULL};
- acpi_object *pss = NULL;
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ struct acpi_buffer format = {sizeof("NNNNNN"), "NNNNNN"};
+ struct acpi_buffer state = {0, NULL};
+ union acpi_object *pss = NULL;
int i = 0;
ACPI_FUNCTION_TRACE("acpi_processor_get_performance_states");
@@ -1022,7 +1022,7 @@ acpi_processor_get_performance_states (
return_VALUE(-ENODEV);
}
- pss = (acpi_object *) buffer.pointer;
+ pss = (union acpi_object *) buffer.pointer;
if (!pss || (pss->type != ACPI_TYPE_PACKAGE)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSS data\n"));
result = -EFAULT;
@@ -1658,7 +1658,6 @@ static int
acpi_cpufreq_setpolicy (
struct cpufreq_policy *policy)
{
- unsigned int cpu = 0;
unsigned int i = 0;
struct acpi_processor *pr = NULL;
unsigned int next_state = 0;
@@ -1669,24 +1668,9 @@ acpi_cpufreq_setpolicy (
if (!policy)
return_VALUE(-EINVAL);
- /* get a present, initialized CPU */
- if (policy->cpu == CPUFREQ_ALL_CPUS)
- {
- for (i=0; i<NR_CPUS; i++) {
- if (processors[i] != NULL) {
- cpu = i;
- pr = processors[cpu];
- break;
- }
- }
- }
- else
- {
- cpu = policy->cpu;
- pr = processors[cpu];
- if (!pr)
- return_VALUE(-EINVAL);
- }
+ pr = processors[policy->cpu];
+ if (!pr)
+ return_VALUE(-EINVAL);
/* select appropriate P-State */
if (policy->policy == CPUFREQ_POLICY_POWERSAVE)
@@ -1715,19 +1699,9 @@ acpi_cpufreq_setpolicy (
}
/* set one or all CPUs to the new state */
- if (policy->cpu == CPUFREQ_ALL_CPUS) {
- for (i=0; i<NR_CPUS; i++)
- {
- pr = processors[cpu];
- if (!pr || !cpu_online(cpu))
- continue;
- result = acpi_processor_set_performance (pr, next_state);
- }
- } else {
- result = acpi_processor_set_performance (pr, next_state);
- }
+ result = acpi_processor_set_performance (pr, next_state);
- return_VALUE(0);
+ return_VALUE(result);
}
@@ -1735,7 +1709,6 @@ static int
acpi_cpufreq_verify (
struct cpufreq_policy *policy)
{
- unsigned int cpu = 0;
unsigned int i = 0;
struct acpi_processor *pr = NULL;
unsigned int number_states = 0;
@@ -1746,24 +1719,9 @@ acpi_cpufreq_verify (
if (!policy)
return_VALUE(-EINVAL);
- /* get a present, initialized CPU */
- if (policy->cpu == CPUFREQ_ALL_CPUS)
- {
- for (i=0; i<NR_CPUS; i++) {
- if (processors[i] != NULL) {
- cpu = i;
- pr = processors[cpu];
- break;
- }
- }
- }
- else
- {
- cpu = policy->cpu;
- pr = processors[cpu];
- if (!pr)
- return_VALUE(-EINVAL);
- }
+ pr = processors[policy->cpu];
+ if (!pr)
+ return_VALUE(-EINVAL);
/* first check if min and max are within valid limits */
cpufreq_verify_within_limits(
@@ -1787,6 +1745,11 @@ acpi_cpufreq_verify (
policy->max = pr->performance.states[next_larger_state].core_frequency * 1000;
}
+ cpufreq_verify_within_limits(
+ policy,
+ pr->performance.states[pr->performance.state_count - 1].core_frequency * 1000,
+ pr->performance.states[pr->limit.state.px].core_frequency * 1000);
+
return_VALUE(0);
}
@@ -2366,8 +2329,8 @@ acpi_processor_get_info (
struct acpi_processor *pr)
{
acpi_status status = 0;
- acpi_object object = {0};
- acpi_buffer buffer = {sizeof(acpi_object), &object};
+ union acpi_object object = {0};
+ struct acpi_buffer buffer = {sizeof(union acpi_object), &object};
static int cpu_count = 0;
ACPI_FUNCTION_TRACE("acpi_processor_get_info");
diff --git a/drivers/acpi/resources/rsaddr.c b/drivers/acpi/resources/rsaddr.c
index 8fc0107f2417..1a088df76f87 100644
--- a/drivers/acpi/resources/rsaddr.c
+++ b/drivers/acpi/resources/rsaddr.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -53,18 +53,18 @@
acpi_status
acpi_rs_address16_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer = byte_stream_buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u8 *temp_ptr;
- acpi_size struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_address16);
- u32 index;
- u16 temp16;
- u8 temp8;
+ u8 *buffer = byte_stream_buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u8 *temp_ptr;
+ acpi_size struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_address16);
+ u32 index;
+ u16 temp16;
+ u8 temp8;
ACPI_FUNCTION_TRACE ("rs_address16_resource");
@@ -265,15 +265,15 @@ acpi_rs_address16_resource (
acpi_status
acpi_rs_address16_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u8 *length_field;
- u8 temp8;
- char *temp_pointer = NULL;
- acpi_size actual_bytes;
+ u8 *buffer = *output_buffer;
+ u8 *length_field;
+ u8 temp8;
+ char *temp_pointer = NULL;
+ acpi_size actual_bytes;
ACPI_FUNCTION_TRACE ("rs_address16_stream");
@@ -431,25 +431,25 @@ acpi_rs_address16_stream (
acpi_status
acpi_rs_address32_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer;
- acpi_resource *output_struct= (void *) *output_buffer;
- u16 temp16;
- u8 temp8;
- u8 *temp_ptr;
- acpi_size struct_size;
- u32 index;
+ u8 *buffer;
+ struct acpi_resource *output_struct= (void *) *output_buffer;
+ u16 temp16;
+ u8 temp8;
+ u8 *temp_ptr;
+ acpi_size struct_size;
+ u32 index;
ACPI_FUNCTION_TRACE ("rs_address32_resource");
buffer = byte_stream_buffer;
- struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_address32);
+ struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_address32);
/*
* Point past the Descriptor to get the number of bytes consumed
@@ -648,14 +648,14 @@ acpi_rs_address32_resource (
acpi_status
acpi_rs_address32_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer;
- u16 *length_field;
- u8 temp8;
- char *temp_pointer;
+ u8 *buffer;
+ u16 *length_field;
+ u8 temp8;
+ char *temp_pointer;
ACPI_FUNCTION_TRACE ("rs_address32_stream");
@@ -813,25 +813,25 @@ acpi_rs_address32_stream (
acpi_status
acpi_rs_address64_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u16 temp16;
- u8 temp8;
- u8 *temp_ptr;
- acpi_size struct_size;
- u32 index;
+ u8 *buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u16 temp16;
+ u8 temp8;
+ u8 *temp_ptr;
+ acpi_size struct_size;
+ u32 index;
ACPI_FUNCTION_TRACE ("rs_address64_resource");
buffer = byte_stream_buffer;
- struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_address64);
+ struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_address64);
/*
* Point past the Descriptor to get the number of bytes consumed
@@ -1034,14 +1034,14 @@ acpi_rs_address64_resource (
acpi_status
acpi_rs_address64_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer;
- u16 *length_field;
- u8 temp8;
- char *temp_pointer;
+ u8 *buffer;
+ u16 *length_field;
+ u8 temp8;
+ char *temp_pointer;
ACPI_FUNCTION_TRACE ("rs_address64_stream");
diff --git a/drivers/acpi/resources/rscalc.c b/drivers/acpi/resources/rscalc.c
index c43f629ba263..4275bd35055f 100644
--- a/drivers/acpi/resources/rscalc.c
+++ b/drivers/acpi/resources/rscalc.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -50,13 +50,13 @@
acpi_status
acpi_rs_get_byte_stream_length (
- acpi_resource *linked_list,
- acpi_size *size_needed)
+ struct acpi_resource *linked_list,
+ acpi_size *size_needed)
{
- acpi_size byte_stream_size_needed = 0;
- acpi_size segment_size;
- acpi_resource_ext_irq *ex_irq = NULL;
- u8 done = FALSE;
+ acpi_size byte_stream_size_needed = 0;
+ acpi_size segment_size;
+ struct acpi_resource_ext_irq *ex_irq = NULL;
+ u8 done = FALSE;
ACPI_FUNCTION_TRACE ("rs_get_byte_stream_length");
@@ -253,7 +253,7 @@ acpi_rs_get_byte_stream_length (
/*
* Point to the next object
*/
- linked_list = ACPI_PTR_ADD (acpi_resource,
+ linked_list = ACPI_PTR_ADD (struct acpi_resource,
linked_list, linked_list->length);
}
@@ -285,22 +285,22 @@ acpi_rs_get_byte_stream_length (
acpi_status
acpi_rs_get_list_length (
- u8 *byte_stream_buffer,
- u32 byte_stream_buffer_length,
- acpi_size *size_needed)
+ u8 *byte_stream_buffer,
+ u32 byte_stream_buffer_length,
+ acpi_size *size_needed)
{
- u32 buffer_size = 0;
- u32 bytes_parsed = 0;
- u8 number_of_interrupts = 0;
- u8 number_of_channels = 0;
- u8 resource_type;
- u32 structure_size;
- u32 bytes_consumed;
- u8 *buffer;
- u8 temp8;
- u16 temp16;
- u8 index;
- u8 additional_bytes;
+ u32 buffer_size = 0;
+ u32 bytes_parsed = 0;
+ u8 number_of_interrupts = 0;
+ u8 number_of_channels = 0;
+ u8 resource_type;
+ u32 structure_size;
+ u32 bytes_consumed;
+ u8 *buffer;
+ u8 temp8;
+ u16 temp16;
+ u8 index;
+ u8 additional_bytes;
ACPI_FUNCTION_TRACE ("rs_get_list_length");
@@ -319,7 +319,7 @@ acpi_rs_get_list_length (
*/
bytes_consumed = 12;
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_mem24);
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_mem24);
break;
@@ -338,7 +338,7 @@ acpi_rs_get_list_length (
*/
temp16 = (u16) ACPI_ROUND_UP_to_32_bITS (temp16);
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_vendor) +
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_vendor) +
(temp16 * sizeof (u8));
break;
@@ -350,7 +350,7 @@ acpi_rs_get_list_length (
bytes_consumed = 20;
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_mem32);
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_mem32);
break;
@@ -360,7 +360,7 @@ acpi_rs_get_list_length (
*/
bytes_consumed = 12;
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_fixed_mem32);
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_fixed_mem32);
break;
@@ -397,7 +397,7 @@ acpi_rs_get_list_length (
*/
temp8 = (u8) ACPI_ROUND_UP_to_64_bITS (temp8);
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_address64) +
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_address64) +
(temp8 * sizeof (u8));
break;
@@ -435,7 +435,7 @@ acpi_rs_get_list_length (
*/
temp8 = (u8) ACPI_ROUND_UP_to_32_bITS (temp8);
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_address32) +
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_address32) +
(temp8 * sizeof (u8));
break;
@@ -473,7 +473,7 @@ acpi_rs_get_list_length (
*/
temp8 = (u8) ACPI_ROUND_UP_to_32_bITS (temp8);
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_address16) +
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_address16) +
(temp8 * sizeof (u8));
break;
@@ -525,7 +525,7 @@ acpi_rs_get_list_length (
*/
temp8 = (u8) ACPI_ROUND_UP_to_32_bITS (temp8);
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_ext_irq) +
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_ext_irq) +
(additional_bytes * sizeof (u8)) +
(temp8 * sizeof (u8));
break;
@@ -564,7 +564,7 @@ acpi_rs_get_list_length (
temp16 >>= 1;
}
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_io) +
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_io) +
(number_of_interrupts * sizeof (u32));
break;
@@ -594,7 +594,7 @@ acpi_rs_get_list_length (
temp8 >>= 1;
}
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_dma) +
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_dma) +
(number_of_channels * sizeof (u32));
break;
@@ -614,7 +614,7 @@ acpi_rs_get_list_length (
bytes_consumed = 1;
}
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_start_dpf);
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_start_dpf);
break;
@@ -632,7 +632,7 @@ acpi_rs_get_list_length (
* IO Port Resource
*/
bytes_consumed = 8;
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_io);
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_io);
break;
@@ -641,7 +641,7 @@ acpi_rs_get_list_length (
* Fixed IO Port Resource
*/
bytes_consumed = 4;
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_fixed_io);
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_fixed_io);
break;
@@ -659,7 +659,7 @@ acpi_rs_get_list_length (
* Ensure a 32-bit boundary for the structure
*/
temp8 = (u8) ACPI_ROUND_UP_to_32_bITS (temp8);
- structure_size = ACPI_SIZEOF_RESOURCE (acpi_resource_vendor) +
+ structure_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_vendor) +
(temp8 * sizeof (u8));
break;
@@ -721,17 +721,17 @@ acpi_rs_get_list_length (
acpi_status
acpi_rs_get_pci_routing_table_length (
- acpi_operand_object *package_object,
- acpi_size *buffer_size_needed)
+ union acpi_operand_object *package_object,
+ acpi_size *buffer_size_needed)
{
- u32 number_of_elements;
- acpi_size temp_size_needed = 0;
- acpi_operand_object **top_object_list;
- u32 index;
- acpi_operand_object *package_element;
- acpi_operand_object **sub_object_list;
- u8 name_found;
- u32 table_index;
+ u32 number_of_elements;
+ acpi_size temp_size_needed = 0;
+ union acpi_operand_object **top_object_list;
+ u32 index;
+ union acpi_operand_object *package_element;
+ union acpi_operand_object **sub_object_list;
+ u8 name_found;
+ u32 table_index;
ACPI_FUNCTION_TRACE ("rs_get_pci_routing_table_length");
@@ -782,7 +782,7 @@ acpi_rs_get_pci_routing_table_length (
}
}
- temp_size_needed += (sizeof (acpi_pci_routing_table) - 4);
+ temp_size_needed += (sizeof (struct acpi_pci_routing_table) - 4);
/*
* Was a String type found?
@@ -813,7 +813,7 @@ acpi_rs_get_pci_routing_table_length (
temp_size_needed = ACPI_ROUND_UP_to_64_bITS (temp_size_needed);
/*
- * Point to the next acpi_operand_object
+ * Point to the next union acpi_operand_object
*/
top_object_list++;
}
@@ -821,6 +821,6 @@ acpi_rs_get_pci_routing_table_length (
/*
* Adding an extra element to the end of the list, essentially a NULL terminator
*/
- *buffer_size_needed = temp_size_needed + sizeof (acpi_pci_routing_table);
+ *buffer_size_needed = temp_size_needed + sizeof (struct acpi_pci_routing_table);
return_ACPI_STATUS (AE_OK);
}
diff --git a/drivers/acpi/resources/rscreate.c b/drivers/acpi/resources/rscreate.c
index a8a0a34169a0..1af681c285c9 100644
--- a/drivers/acpi/resources/rscreate.c
+++ b/drivers/acpi/resources/rscreate.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -52,14 +52,14 @@
acpi_status
acpi_rs_create_resource_list (
- acpi_operand_object *byte_stream_buffer,
- acpi_buffer *output_buffer)
+ union acpi_operand_object *byte_stream_buffer,
+ struct acpi_buffer *output_buffer)
{
- acpi_status status;
- u8 *byte_stream_start;
- acpi_size list_size_needed = 0;
- u32 byte_stream_buffer_length;
+ acpi_status status;
+ u8 *byte_stream_start;
+ acpi_size list_size_needed = 0;
+ u32 byte_stream_buffer_length;
ACPI_FUNCTION_TRACE ("rs_create_resource_list");
@@ -112,7 +112,7 @@ acpi_rs_create_resource_list (
*
* FUNCTION: acpi_rs_create_pci_routing_table
*
- * PARAMETERS: package_object - Pointer to an acpi_operand_object
+ * PARAMETERS: package_object - Pointer to an union acpi_operand_object
* package
* output_buffer - Pointer to the user's buffer
*
@@ -121,7 +121,7 @@ acpi_rs_create_resource_list (
* AE_BUFFER_OVERFLOW and output_buffer->Length will point
* to the size buffer needed.
*
- * DESCRIPTION: Takes the acpi_operand_object package and creates a
+ * DESCRIPTION: Takes the union acpi_operand_object package and creates a
* linked list of PCI interrupt descriptions
*
* NOTE: It is the caller's responsibility to ensure that the start of the
@@ -131,20 +131,20 @@ acpi_rs_create_resource_list (
acpi_status
acpi_rs_create_pci_routing_table (
- acpi_operand_object *package_object,
- acpi_buffer *output_buffer)
+ union acpi_operand_object *package_object,
+ struct acpi_buffer *output_buffer)
{
- u8 *buffer;
- acpi_operand_object **top_object_list;
- acpi_operand_object **sub_object_list;
- acpi_operand_object *obj_desc;
- acpi_size buffer_size_needed = 0;
- u32 number_of_elements;
- u32 index;
- acpi_pci_routing_table *user_prt;
- acpi_namespace_node *node;
- acpi_status status;
- acpi_buffer path_buffer;
+ u8 *buffer;
+ union acpi_operand_object **top_object_list;
+ union acpi_operand_object **sub_object_list;
+ union acpi_operand_object *obj_desc;
+ acpi_size buffer_size_needed = 0;
+ u32 number_of_elements;
+ u32 index;
+ struct acpi_pci_routing_table *user_prt;
+ struct acpi_namespace_node *node;
+ acpi_status status;
+ struct acpi_buffer path_buffer;
ACPI_FUNCTION_TRACE ("rs_create_pci_routing_table");
@@ -179,7 +179,7 @@ acpi_rs_create_pci_routing_table (
top_object_list = package_object->package.elements;
number_of_elements = package_object->package.count;
buffer = output_buffer->pointer;
- user_prt = ACPI_CAST_PTR (acpi_pci_routing_table, buffer);
+ user_prt = ACPI_CAST_PTR (struct acpi_pci_routing_table, buffer);
for (index = 0; index < number_of_elements; index++) {
/*
@@ -189,14 +189,14 @@ acpi_rs_create_pci_routing_table (
* be zero because we cleared the return buffer earlier
*/
buffer += user_prt->length;
- user_prt = ACPI_CAST_PTR (acpi_pci_routing_table, buffer);
+ user_prt = ACPI_CAST_PTR (struct acpi_pci_routing_table, buffer);
/*
* Fill in the Length field with the information we have at this point.
* The minus four is to subtract the size of the u8 Source[4] member
* because it is added below.
*/
- user_prt->length = (sizeof (acpi_pci_routing_table) - 4);
+ user_prt->length = (sizeof (struct acpi_pci_routing_table) - 4);
/*
* Each element of the top-level package must also be a package
@@ -328,7 +328,7 @@ acpi_rs_create_pci_routing_table (
return_ACPI_STATUS (AE_BAD_DATA);
}
- /* Point to the next acpi_operand_object in the top level package */
+ /* Point to the next union acpi_operand_object in the top level package */
top_object_list++;
}
@@ -359,11 +359,11 @@ acpi_rs_create_pci_routing_table (
acpi_status
acpi_rs_create_byte_stream (
- acpi_resource *linked_list_buffer,
- acpi_buffer *output_buffer)
+ struct acpi_resource *linked_list_buffer,
+ struct acpi_buffer *output_buffer)
{
- acpi_status status;
- acpi_size byte_stream_size_needed = 0;
+ acpi_status status;
+ acpi_size byte_stream_size_needed = 0;
ACPI_FUNCTION_TRACE ("rs_create_byte_stream");
diff --git a/drivers/acpi/resources/rsdump.c b/drivers/acpi/resources/rsdump.c
index 37fe98207f6a..babc76a0ea59 100644
--- a/drivers/acpi/resources/rsdump.c
+++ b/drivers/acpi/resources/rsdump.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -46,10 +46,10 @@
void
acpi_rs_dump_irq (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_irq *irq_data = (acpi_resource_irq *) data;
- u8 index = 0;
+ struct acpi_resource_irq *irq_data = (struct acpi_resource_irq *) data;
+ u8 index = 0;
ACPI_FUNCTION_ENTRY ();
@@ -91,10 +91,10 @@ acpi_rs_dump_irq (
void
acpi_rs_dump_dma (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_dma *dma_data = (acpi_resource_dma *) data;
- u8 index = 0;
+ struct acpi_resource_dma *dma_data = (struct acpi_resource_dma *) data;
+ u8 index = 0;
ACPI_FUNCTION_ENTRY ();
@@ -171,9 +171,9 @@ acpi_rs_dump_dma (
void
acpi_rs_dump_start_depend_fns (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_start_dpf *sdf_data = (acpi_resource_start_dpf *) data;
+ struct acpi_resource_start_dpf *sdf_data = (struct acpi_resource_start_dpf *) data;
ACPI_FUNCTION_ENTRY ();
@@ -236,9 +236,9 @@ acpi_rs_dump_start_depend_fns (
void
acpi_rs_dump_io (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_io *io_data = (acpi_resource_io *) data;
+ struct acpi_resource_io *io_data = (struct acpi_resource_io *) data;
ACPI_FUNCTION_ENTRY ();
@@ -279,9 +279,9 @@ acpi_rs_dump_io (
void
acpi_rs_dump_fixed_io (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_fixed_io *fixed_io_data = (acpi_resource_fixed_io *) data;
+ struct acpi_resource_fixed_io *fixed_io_data = (struct acpi_resource_fixed_io *) data;
ACPI_FUNCTION_ENTRY ();
@@ -312,10 +312,10 @@ acpi_rs_dump_fixed_io (
void
acpi_rs_dump_vendor_specific (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_vendor *vendor_data = (acpi_resource_vendor *) data;
- u16 index = 0;
+ struct acpi_resource_vendor *vendor_data = (struct acpi_resource_vendor *) data;
+ u16 index = 0;
ACPI_FUNCTION_ENTRY ();
@@ -348,9 +348,9 @@ acpi_rs_dump_vendor_specific (
void
acpi_rs_dump_memory24 (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_mem24 *memory24_data = (acpi_resource_mem24 *) data;
+ struct acpi_resource_mem24 *memory24_data = (struct acpi_resource_mem24 *) data;
ACPI_FUNCTION_ENTRY ();
@@ -393,9 +393,9 @@ acpi_rs_dump_memory24 (
void
acpi_rs_dump_memory32 (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_mem32 *memory32_data = (acpi_resource_mem32 *) data;
+ struct acpi_resource_mem32 *memory32_data = (struct acpi_resource_mem32 *) data;
ACPI_FUNCTION_ENTRY ();
@@ -438,9 +438,9 @@ acpi_rs_dump_memory32 (
void
acpi_rs_dump_fixed_memory32 (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_fixed_mem32 *fixed_memory32_data = (acpi_resource_fixed_mem32 *) data;
+ struct acpi_resource_fixed_mem32 *fixed_memory32_data = (struct acpi_resource_fixed_mem32 *) data;
ACPI_FUNCTION_ENTRY ();
@@ -477,9 +477,9 @@ acpi_rs_dump_fixed_memory32 (
void
acpi_rs_dump_address16 (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_address16 *address16_data = (acpi_resource_address16 *) data;
+ struct acpi_resource_address16 *address16_data = (struct acpi_resource_address16 *) data;
ACPI_FUNCTION_ENTRY ();
@@ -620,9 +620,9 @@ acpi_rs_dump_address16 (
void
acpi_rs_dump_address32 (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_address32 *address32_data = (acpi_resource_address32 *) data;
+ struct acpi_resource_address32 *address32_data = (struct acpi_resource_address32 *) data;
ACPI_FUNCTION_ENTRY ();
@@ -762,9 +762,9 @@ acpi_rs_dump_address32 (
void
acpi_rs_dump_address64 (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_address64 *address64_data = (acpi_resource_address64 *) data;
+ struct acpi_resource_address64 *address64_data = (struct acpi_resource_address64 *) data;
ACPI_FUNCTION_ENTRY ();
@@ -909,10 +909,10 @@ acpi_rs_dump_address64 (
void
acpi_rs_dump_extended_irq (
- acpi_resource_data *data)
+ union acpi_resource_data *data)
{
- acpi_resource_ext_irq *ext_irq_data = (acpi_resource_ext_irq *) data;
- u8 index = 0;
+ struct acpi_resource_ext_irq *ext_irq_data = (struct acpi_resource_ext_irq *) data;
+ u8 index = 0;
ACPI_FUNCTION_ENTRY ();
@@ -970,10 +970,10 @@ acpi_rs_dump_extended_irq (
void
acpi_rs_dump_resource_list (
- acpi_resource *resource)
+ struct acpi_resource *resource)
{
- u8 count = 0;
- u8 done = FALSE;
+ u8 count = 0;
+ u8 done = FALSE;
ACPI_FUNCTION_ENTRY ();
@@ -1053,7 +1053,7 @@ acpi_rs_dump_resource_list (
}
- resource = ACPI_PTR_ADD (acpi_resource, resource, resource->length);
+ resource = ACPI_PTR_ADD (struct acpi_resource, resource, resource->length);
}
}
@@ -1074,19 +1074,19 @@ acpi_rs_dump_resource_list (
void
acpi_rs_dump_irq_list (
- u8 *route_table)
+ u8 *route_table)
{
- u8 *buffer = route_table;
- u8 count = 0;
- u8 done = FALSE;
- acpi_pci_routing_table *prt_element;
+ u8 *buffer = route_table;
+ u8 count = 0;
+ u8 done = FALSE;
+ struct acpi_pci_routing_table *prt_element;
ACPI_FUNCTION_ENTRY ();
if (acpi_dbg_level & ACPI_LV_RESOURCES && _COMPONENT & acpi_dbg_layer) {
- prt_element = ACPI_CAST_PTR (acpi_pci_routing_table, buffer);
+ prt_element = ACPI_CAST_PTR (struct acpi_pci_routing_table, buffer);
while (!done) {
acpi_os_printf ("PCI IRQ Routing Table structure %X.\n", count++);
@@ -1104,7 +1104,7 @@ acpi_rs_dump_irq_list (
buffer += prt_element->length;
- prt_element = ACPI_CAST_PTR (acpi_pci_routing_table, buffer);
+ prt_element = ACPI_CAST_PTR (struct acpi_pci_routing_table, buffer);
if(0 == prt_element->length) {
done = TRUE;
diff --git a/drivers/acpi/resources/rsio.c b/drivers/acpi/resources/rsio.c
index 89365a5bfc46..b7db066a4a93 100644
--- a/drivers/acpi/resources/rsio.c
+++ b/drivers/acpi/resources/rsio.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -53,16 +53,16 @@
acpi_status
acpi_rs_io_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer = byte_stream_buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
- acpi_size struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_io);
+ u8 *buffer = byte_stream_buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
+ acpi_size struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_io);
ACPI_FUNCTION_TRACE ("rs_io_resource");
@@ -151,16 +151,16 @@ acpi_rs_io_resource (
acpi_status
acpi_rs_fixed_io_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer = byte_stream_buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
- acpi_size struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_fixed_io);
+ u8 *buffer = byte_stream_buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
+ acpi_size struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_fixed_io);
ACPI_FUNCTION_TRACE ("rs_fixed_io_resource");
@@ -220,13 +220,13 @@ acpi_rs_fixed_io_resource (
acpi_status
acpi_rs_io_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
+ u8 *buffer = *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
ACPI_FUNCTION_TRACE ("rs_io_stream");
@@ -304,13 +304,13 @@ acpi_rs_io_stream (
acpi_status
acpi_rs_fixed_io_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
+ u8 *buffer = *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
ACPI_FUNCTION_TRACE ("rs_fixed_io_stream");
@@ -370,17 +370,17 @@ acpi_rs_fixed_io_stream (
acpi_status
acpi_rs_dma_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer = byte_stream_buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u8 temp8 = 0;
- u8 index;
- u8 i;
- acpi_size struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_dma);
+ u8 *buffer = byte_stream_buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u8 temp8 = 0;
+ u8 index;
+ u8 i;
+ acpi_size struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_dma);
ACPI_FUNCTION_TRACE ("rs_dma_resource");
@@ -474,14 +474,14 @@ acpi_rs_dma_resource (
acpi_status
acpi_rs_dma_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
- u8 index;
+ u8 *buffer = *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
+ u8 index;
ACPI_FUNCTION_TRACE ("rs_dma_stream");
diff --git a/drivers/acpi/resources/rsirq.c b/drivers/acpi/resources/rsirq.c
index e76dc52ba002..1cadd04b2752 100644
--- a/drivers/acpi/resources/rsirq.c
+++ b/drivers/acpi/resources/rsirq.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -53,18 +53,18 @@
acpi_status
acpi_rs_irq_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer = byte_stream_buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
- u8 index;
- u8 i;
- acpi_size struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_irq);
+ u8 *buffer = byte_stream_buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
+ u8 index;
+ u8 i;
+ acpi_size struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_irq);
ACPI_FUNCTION_TRACE ("rs_irq_resource");
@@ -181,15 +181,15 @@ acpi_rs_irq_resource (
acpi_status
acpi_rs_irq_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
- u8 index;
- u8 IRqinfo_byte_needed;
+ u8 *buffer = *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
+ u8 index;
+ u8 IRqinfo_byte_needed;
ACPI_FUNCTION_TRACE ("rs_irq_stream");
@@ -277,18 +277,18 @@ acpi_rs_irq_stream (
acpi_status
acpi_rs_extended_irq_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer = byte_stream_buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
- u8 *temp_ptr;
- u8 index;
- acpi_size struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_ext_irq);
+ u8 *buffer = byte_stream_buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
+ u8 *temp_ptr;
+ u8 index;
+ acpi_size struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_ext_irq);
ACPI_FUNCTION_TRACE ("rs_extended_irq_resource");
@@ -451,15 +451,15 @@ acpi_rs_extended_irq_resource (
acpi_status
acpi_rs_extended_irq_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u16 *length_field;
- u8 temp8 = 0;
- u8 index;
- char *temp_pointer = NULL;
+ u8 *buffer = *output_buffer;
+ u16 *length_field;
+ u8 temp8 = 0;
+ u8 index;
+ char *temp_pointer = NULL;
ACPI_FUNCTION_TRACE ("rs_extended_irq_stream");
diff --git a/drivers/acpi/resources/rslist.c b/drivers/acpi/resources/rslist.c
index adf2be725509..94a972f25433 100644
--- a/drivers/acpi/resources/rslist.c
+++ b/drivers/acpi/resources/rslist.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -45,7 +45,7 @@
u8
acpi_rs_get_resource_type (
- u8 resource_start_byte)
+ u8 resource_start_byte)
{
ACPI_FUNCTION_ENTRY ();
@@ -98,18 +98,18 @@ acpi_rs_get_resource_type (
acpi_status
acpi_rs_byte_stream_to_list (
- u8 *byte_stream_buffer,
- u32 byte_stream_buffer_length,
- u8 *output_buffer)
+ u8 *byte_stream_buffer,
+ u32 byte_stream_buffer_length,
+ u8 *output_buffer)
{
- acpi_status status;
- acpi_size bytes_parsed = 0;
- u8 resource_type = 0;
- acpi_size bytes_consumed = 0;
- u8 *buffer = output_buffer;
- acpi_size structure_size = 0;
- u8 end_tag_processed = FALSE;
- acpi_resource *resource;
+ acpi_status status;
+ acpi_size bytes_parsed = 0;
+ u8 resource_type = 0;
+ acpi_size bytes_consumed = 0;
+ u8 *buffer = output_buffer;
+ acpi_size structure_size = 0;
+ u8 end_tag_processed = FALSE;
+ struct acpi_resource *resource;
ACPI_FUNCTION_TRACE ("rs_byte_stream_to_list");
@@ -292,7 +292,7 @@ acpi_rs_byte_stream_to_list (
/*
* Set the Buffer to the next structure
*/
- resource = ACPI_CAST_PTR (acpi_resource, buffer);
+ resource = ACPI_CAST_PTR (struct acpi_resource, buffer);
resource->length = ACPI_ALIGN_RESOURCE_SIZE(resource->length);
buffer += ACPI_ALIGN_RESOURCE_SIZE(structure_size);
@@ -332,14 +332,14 @@ acpi_rs_byte_stream_to_list (
acpi_status
acpi_rs_list_to_byte_stream (
- acpi_resource *linked_list,
- acpi_size byte_stream_size_needed,
- u8 *output_buffer)
+ struct acpi_resource *linked_list,
+ acpi_size byte_stream_size_needed,
+ u8 *output_buffer)
{
- acpi_status status;
- u8 *buffer = output_buffer;
- acpi_size bytes_consumed = 0;
- u8 done = FALSE;
+ acpi_status status;
+ u8 *buffer = output_buffer;
+ acpi_size bytes_consumed = 0;
+ u8 done = FALSE;
ACPI_FUNCTION_TRACE ("rs_list_to_byte_stream");
@@ -489,7 +489,7 @@ acpi_rs_list_to_byte_stream (
/*
* Point to the next object
*/
- linked_list = ACPI_PTR_ADD (acpi_resource,
+ linked_list = ACPI_PTR_ADD (struct acpi_resource,
linked_list, linked_list->length);
}
diff --git a/drivers/acpi/resources/rsmemory.c b/drivers/acpi/resources/rsmemory.c
index 9503cabab01a..1cfcfe107bb2 100644
--- a/drivers/acpi/resources/rsmemory.c
+++ b/drivers/acpi/resources/rsmemory.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -53,16 +53,16 @@
acpi_status
acpi_rs_memory24_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer = byte_stream_buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
- acpi_size struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_mem24);
+ u8 *buffer = byte_stream_buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
+ acpi_size struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_mem24);
ACPI_FUNCTION_TRACE ("rs_memory24_resource");
@@ -143,13 +143,13 @@ acpi_rs_memory24_resource (
acpi_status
acpi_rs_memory24_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
+ u8 *buffer = *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
ACPI_FUNCTION_TRACE ("rs_memory24_stream");
@@ -230,16 +230,16 @@ acpi_rs_memory24_stream (
acpi_status
acpi_rs_memory32_range_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer = byte_stream_buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
- acpi_size struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_mem32);
+ u8 *buffer = byte_stream_buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
+ acpi_size struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_mem32);
ACPI_FUNCTION_TRACE ("rs_memory32_range_resource");
@@ -335,16 +335,16 @@ acpi_rs_memory32_range_resource (
acpi_status
acpi_rs_fixed_memory32_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer = byte_stream_buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
- acpi_size struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_fixed_mem32);
+ u8 *buffer = byte_stream_buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
+ acpi_size struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_fixed_mem32);
ACPI_FUNCTION_TRACE ("rs_fixed_memory32_resource");
@@ -412,13 +412,13 @@ acpi_rs_fixed_memory32_resource (
acpi_status
acpi_rs_memory32_range_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
+ u8 *buffer = *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
ACPI_FUNCTION_TRACE ("rs_memory32_range_stream");
@@ -495,13 +495,13 @@ acpi_rs_memory32_range_stream (
acpi_status
acpi_rs_fixed_memory32_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
+ u8 *buffer = *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
ACPI_FUNCTION_TRACE ("rs_fixed_memory32_stream");
diff --git a/drivers/acpi/resources/rsmisc.c b/drivers/acpi/resources/rsmisc.c
index 6b77d2bc1097..cdec584a234d 100644
--- a/drivers/acpi/resources/rsmisc.c
+++ b/drivers/acpi/resources/rsmisc.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -53,13 +53,13 @@
acpi_status
acpi_rs_end_tag_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- acpi_resource *output_struct = (void *) *output_buffer;
- acpi_size struct_size = ACPI_RESOURCE_LENGTH;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ acpi_size struct_size = ACPI_RESOURCE_LENGTH;
ACPI_FUNCTION_TRACE ("rs_end_tag_resource");
@@ -106,12 +106,12 @@ acpi_rs_end_tag_resource (
acpi_status
acpi_rs_end_tag_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u8 temp8 = 0;
+ u8 *buffer = *output_buffer;
+ u8 temp8 = 0;
ACPI_FUNCTION_TRACE ("rs_end_tag_stream");
@@ -163,17 +163,17 @@ acpi_rs_end_tag_stream (
acpi_status
acpi_rs_vendor_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer = byte_stream_buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
- u8 index;
- acpi_size struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_vendor);
+ u8 *buffer = byte_stream_buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
+ u8 index;
+ acpi_size struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_vendor);
ACPI_FUNCTION_TRACE ("rs_vendor_resource");
@@ -263,14 +263,14 @@ acpi_rs_vendor_resource (
acpi_status
acpi_rs_vendor_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u16 temp16 = 0;
- u8 temp8 = 0;
- u8 index;
+ u8 *buffer = *output_buffer;
+ u16 temp16 = 0;
+ u8 temp8 = 0;
+ u8 index;
ACPI_FUNCTION_TRACE ("rs_vendor_stream");
@@ -343,15 +343,15 @@ acpi_rs_vendor_stream (
acpi_status
acpi_rs_start_depend_fns_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- u8 *buffer = byte_stream_buffer;
- acpi_resource *output_struct = (void *) *output_buffer;
- u8 temp8 = 0;
- acpi_size struct_size = ACPI_SIZEOF_RESOURCE (acpi_resource_start_dpf);
+ u8 *buffer = byte_stream_buffer;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ u8 temp8 = 0;
+ acpi_size struct_size = ACPI_SIZEOF_RESOURCE (struct acpi_resource_start_dpf);
ACPI_FUNCTION_TRACE ("rs_start_depend_fns_resource");
@@ -435,13 +435,13 @@ acpi_rs_start_depend_fns_resource (
acpi_status
acpi_rs_end_depend_fns_resource (
- u8 *byte_stream_buffer,
- acpi_size *bytes_consumed,
- u8 **output_buffer,
- acpi_size *structure_size)
+ u8 *byte_stream_buffer,
+ acpi_size *bytes_consumed,
+ u8 **output_buffer,
+ acpi_size *structure_size)
{
- acpi_resource *output_struct = (void *) *output_buffer;
- acpi_size struct_size = ACPI_RESOURCE_LENGTH;
+ struct acpi_resource *output_struct = (void *) *output_buffer;
+ acpi_size struct_size = ACPI_RESOURCE_LENGTH;
ACPI_FUNCTION_TRACE ("rs_end_depend_fns_resource");
@@ -489,12 +489,12 @@ acpi_rs_end_depend_fns_resource (
acpi_status
acpi_rs_start_depend_fns_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
- u8 temp8 = 0;
+ u8 *buffer = *output_buffer;
+ u8 temp8 = 0;
ACPI_FUNCTION_TRACE ("rs_start_depend_fns_stream");
@@ -553,11 +553,11 @@ acpi_rs_start_depend_fns_stream (
acpi_status
acpi_rs_end_depend_fns_stream (
- acpi_resource *linked_list,
- u8 **output_buffer,
- acpi_size *bytes_consumed)
+ struct acpi_resource *linked_list,
+ u8 **output_buffer,
+ acpi_size *bytes_consumed)
{
- u8 *buffer = *output_buffer;
+ u8 *buffer = *output_buffer;
ACPI_FUNCTION_TRACE ("rs_end_depend_fns_stream");
diff --git a/drivers/acpi/resources/rsutils.c b/drivers/acpi/resources/rsutils.c
index 5460d64cfa9c..fb61e73d3b32 100644
--- a/drivers/acpi/resources/rsutils.c
+++ b/drivers/acpi/resources/rsutils.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -52,11 +52,11 @@
acpi_status
acpi_rs_get_prt_method_data (
- acpi_handle handle,
- acpi_buffer *ret_buffer)
+ acpi_handle handle,
+ struct acpi_buffer *ret_buffer)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("rs_get_prt_method_data");
@@ -105,11 +105,11 @@ acpi_rs_get_prt_method_data (
acpi_status
acpi_rs_get_crs_method_data (
- acpi_handle handle,
- acpi_buffer *ret_buffer)
+ acpi_handle handle,
+ struct acpi_buffer *ret_buffer)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("rs_get_crs_method_data");
@@ -159,11 +159,11 @@ acpi_rs_get_crs_method_data (
acpi_status
acpi_rs_get_prs_method_data (
- acpi_handle handle,
- acpi_buffer *ret_buffer)
+ acpi_handle handle,
+ struct acpi_buffer *ret_buffer)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("rs_get_prs_method_data");
@@ -213,12 +213,12 @@ acpi_rs_get_prs_method_data (
acpi_status
acpi_rs_set_srs_method_data (
- acpi_handle handle,
- acpi_buffer *in_buffer)
+ acpi_handle handle,
+ struct acpi_buffer *in_buffer)
{
- acpi_operand_object *params[2];
- acpi_status status;
- acpi_buffer buffer;
+ union acpi_operand_object *params[2];
+ acpi_status status;
+ struct acpi_buffer buffer;
ACPI_FUNCTION_TRACE ("rs_set_srs_method_data");
diff --git a/drivers/acpi/resources/rsxface.c b/drivers/acpi/resources/rsxface.c
index 34243f1a1685..69835b42a464 100644
--- a/drivers/acpi/resources/rsxface.c
+++ b/drivers/acpi/resources/rsxface.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -55,10 +55,10 @@
acpi_status
acpi_get_irq_routing_table (
- acpi_handle device_handle,
- acpi_buffer *ret_buffer)
+ acpi_handle device_handle,
+ struct acpi_buffer *ret_buffer)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_get_irq_routing_table ");
@@ -110,10 +110,10 @@ acpi_get_irq_routing_table (
acpi_status
acpi_get_current_resources (
- acpi_handle device_handle,
- acpi_buffer *ret_buffer)
+ acpi_handle device_handle,
+ struct acpi_buffer *ret_buffer)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_get_current_resources");
@@ -162,10 +162,10 @@ acpi_get_current_resources (
acpi_status
acpi_get_possible_resources (
- acpi_handle device_handle,
- acpi_buffer *ret_buffer)
+ acpi_handle device_handle,
+ struct acpi_buffer *ret_buffer)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_get_possible_resources");
@@ -211,10 +211,10 @@ acpi_get_possible_resources (
acpi_status
acpi_set_current_resources (
- acpi_handle device_handle,
- acpi_buffer *in_buffer)
+ acpi_handle device_handle,
+ struct acpi_buffer *in_buffer)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_set_current_resources");
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 0747283a5b7c..e60e9f6d0714 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -194,23 +194,23 @@ acpi_bus_match (
struct acpi_driver *driver)
{
int error = 0;
- acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
if (device->flags.hardware_id)
if (strstr(driver->ids, device->pnp.hardware_id))
goto Done;
if (device->flags.compatible_ids) {
- acpi_status status = AE_OK;
- acpi_object *object = NULL;
- char cid[256] = {};
+ acpi_status status = AE_OK;
+ union acpi_object *object = NULL;
+ char cid[256] = {};
status = acpi_evaluate_object(device->handle, "_CID", NULL,
&buffer);
if (ACPI_FAILURE(status) || !buffer.pointer)
return -ENOENT;
- object = (acpi_object *) buffer.pointer;
+ object = (union acpi_object *) buffer.pointer;
switch (object->type) {
case ACPI_TYPE_INTEGER:
@@ -487,7 +487,7 @@ acpi_bus_get_flags (
static void acpi_device_get_busid(struct acpi_device * device, acpi_handle handle, int type)
{
char bus_id[5] = {'?',0};
- acpi_buffer buffer = {sizeof(bus_id), bus_id};
+ struct acpi_buffer buffer = {sizeof(bus_id), bus_id};
int i = 0;
/*
@@ -523,7 +523,7 @@ static void acpi_device_get_busid(struct acpi_device * device, acpi_handle handl
static void acpi_device_set_id(struct acpi_device * device, struct acpi_device * parent,
acpi_handle handle, int type)
{
- acpi_device_info info;
+ struct acpi_device_info info;
char *hid = NULL;
char *uid = NULL;
acpi_status status;
@@ -651,7 +651,7 @@ void acpi_device_get_debug_info(struct acpi_device * device, acpi_handle handle,
break;
}
- pr_debug("Found %s %s [%p]\n", type_string, name, handle);
+ printk(KERN_DEBUG "Found %s %s [%p]\n", type_string, name, handle);
#endif /*CONFIG_ACPI_DEBUG_OUTPUT*/
}
diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c
index 287044fe554b..f96ce34ad35f 100644
--- a/drivers/acpi/system.c
+++ b/drivers/acpi/system.c
@@ -91,7 +91,7 @@ acpi_system_read_dsdt (
loff_t *ppos)
{
acpi_status status = AE_OK;
- acpi_buffer dsdt = {ACPI_ALLOCATE_BUFFER, NULL};
+ struct acpi_buffer dsdt = {ACPI_ALLOCATE_BUFFER, NULL};
void *data = 0;
size_t size = 0;
@@ -134,7 +134,7 @@ acpi_system_read_fadt (
loff_t *ppos)
{
acpi_status status = AE_OK;
- acpi_buffer fadt = {ACPI_ALLOCATE_BUFFER, NULL};
+ struct acpi_buffer fadt = {ACPI_ALLOCATE_BUFFER, NULL};
void *data = 0;
size_t size = 0;
diff --git a/drivers/acpi/tables/tbconvrt.c b/drivers/acpi/tables/tbconvrt.c
index b5e829436be8..70532e6ecb6c 100644
--- a/drivers/acpi/tables/tbconvrt.c
+++ b/drivers/acpi/tables/tbconvrt.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -47,10 +47,10 @@
u32
acpi_tb_get_table_count (
- rsdp_descriptor *RSDP,
- acpi_table_header *RSDT)
+ struct rsdp_descriptor *RSDP,
+ struct acpi_table_header *RSDT)
{
- u32 pointer_size;
+ u32 pointer_size;
ACPI_FUNCTION_ENTRY ();
@@ -73,7 +73,7 @@ acpi_tb_get_table_count (
* pointers contained within the RSDT/XSDT. The size of the pointers
* is architecture-dependent.
*/
- return ((RSDT->length - sizeof (acpi_table_header)) / pointer_size);
+ return ((RSDT->length - sizeof (struct acpi_table_header)) / pointer_size);
}
@@ -91,11 +91,11 @@ acpi_tb_get_table_count (
acpi_status
acpi_tb_convert_to_xsdt (
- acpi_table_desc *table_info)
+ struct acpi_table_desc *table_info)
{
- acpi_size table_size;
- u32 i;
- xsdt_descriptor *new_table;
+ acpi_size table_size;
+ u32 i;
+ XSDT_DESCRIPTOR *new_table;
ACPI_FUNCTION_ENTRY ();
@@ -104,7 +104,7 @@ acpi_tb_convert_to_xsdt (
/* Compute size of the converted XSDT */
table_size = ((acpi_size) acpi_gbl_rsdt_table_count * sizeof (u64)) +
- sizeof (acpi_table_header);
+ sizeof (struct acpi_table_header);
/* Allocate an XSDT */
@@ -115,7 +115,7 @@ acpi_tb_convert_to_xsdt (
/* Copy the header and set the length */
- ACPI_MEMCPY (new_table, table_info->pointer, sizeof (acpi_table_header));
+ ACPI_MEMCPY (new_table, table_info->pointer, sizeof (struct acpi_table_header));
new_table->header.length = (u32) table_size;
/* Copy the table pointers */
@@ -123,11 +123,11 @@ acpi_tb_convert_to_xsdt (
for (i = 0; i < acpi_gbl_rsdt_table_count; i++) {
if (acpi_gbl_RSDP->revision < 2) {
ACPI_STORE_ADDRESS (new_table->table_offset_entry[i],
- ((RSDT_DESCRIPTOR_REV1 *) table_info->pointer)->table_offset_entry[i]);
+ ((struct rsdt_descriptor_rev1 *) table_info->pointer)->table_offset_entry[i]);
}
else {
new_table->table_offset_entry[i] =
- ((xsdt_descriptor *) table_info->pointer)->table_offset_entry[i];
+ ((XSDT_DESCRIPTOR *) table_info->pointer)->table_offset_entry[i];
}
}
@@ -137,7 +137,7 @@ acpi_tb_convert_to_xsdt (
/* Point the table descriptor to the new table */
- table_info->pointer = (acpi_table_header *) new_table;
+ table_info->pointer = (struct acpi_table_header *) new_table;
table_info->length = table_size;
table_info->allocation = ACPI_MEM_ALLOCATED;
@@ -160,8 +160,8 @@ acpi_tb_convert_to_xsdt (
static void
acpi_tb_convert_fadt1 (
- fadt_descriptor_rev2 *local_fadt,
- fadt_descriptor_rev1 *original_fadt)
+ struct fadt_descriptor_rev2 *local_fadt,
+ struct fadt_descriptor_rev1 *original_fadt)
{
@@ -174,7 +174,7 @@ acpi_tb_convert_fadt1 (
* The 2.0 table is an extension of the 1.0 table, so the entire 1.0
* table can be copied first, then expand some fields to 64 bits.
*/
- ACPI_MEMCPY (local_fadt, original_fadt, sizeof (fadt_descriptor_rev1));
+ ACPI_MEMCPY (local_fadt, original_fadt, sizeof (struct fadt_descriptor_rev1));
/* Convert table pointers to 64-bit fields */
@@ -242,13 +242,13 @@ acpi_tb_convert_fadt1 (
static void
acpi_tb_convert_fadt2 (
- fadt_descriptor_rev2 *local_fadt,
- fadt_descriptor_rev2 *original_fadt)
+ struct fadt_descriptor_rev2 *local_fadt,
+ struct fadt_descriptor_rev2 *original_fadt)
{
/* We have an ACPI 2.0 FADT but we must copy it to our local buffer */
- ACPI_MEMCPY (local_fadt, original_fadt, sizeof (fadt_descriptor_rev2));
+ ACPI_MEMCPY (local_fadt, original_fadt, sizeof (struct fadt_descriptor_rev2));
/*
* "X" fields are optional extensions to the original V1.0 fields, so
@@ -323,8 +323,8 @@ acpi_tb_convert_fadt2 (
acpi_status
acpi_tb_convert_table_fadt (void)
{
- fadt_descriptor_rev2 *local_fadt;
- acpi_table_desc *table_desc;
+ struct fadt_descriptor_rev2 *local_fadt;
+ struct acpi_table_desc *table_desc;
ACPI_FUNCTION_TRACE ("tb_convert_table_fadt");
@@ -334,7 +334,7 @@ acpi_tb_convert_table_fadt (void)
* acpi_gbl_FADT is valid
* Allocate and zero the 2.0 FADT buffer
*/
- local_fadt = ACPI_MEM_CALLOCATE (sizeof (fadt_descriptor_rev2));
+ local_fadt = ACPI_MEM_CALLOCATE (sizeof (struct fadt_descriptor_rev2));
if (local_fadt == NULL) {
return_ACPI_STATUS (AE_NO_MEMORY);
}
@@ -343,13 +343,13 @@ acpi_tb_convert_table_fadt (void)
* FADT length and version validation. The table must be at least as
* long as the version 1.0 FADT
*/
- if (acpi_gbl_FADT->header.length < sizeof (fadt_descriptor_rev1)) {
+ if (acpi_gbl_FADT->header.length < sizeof (struct fadt_descriptor_rev1)) {
ACPI_REPORT_ERROR (("Invalid FADT table length: 0x%X\n", acpi_gbl_FADT->header.length));
return_ACPI_STATUS (AE_INVALID_TABLE_LENGTH);
}
if (acpi_gbl_FADT->header.revision >= FADT2_REVISION_ID) {
- if (acpi_gbl_FADT->header.length < sizeof (fadt_descriptor_rev2)) {
+ if (acpi_gbl_FADT->header.length < sizeof (struct fadt_descriptor_rev2)) {
/* Length is too short to be a V2.0 table */
ACPI_REPORT_WARNING (("Inconsistent FADT length (0x%X) and revision (0x%X), using FADT V1.0 portion of table\n",
@@ -382,9 +382,9 @@ acpi_tb_convert_table_fadt (void)
/* Install the new table */
- table_desc->pointer = (acpi_table_header *) acpi_gbl_FADT;
+ table_desc->pointer = (struct acpi_table_header *) acpi_gbl_FADT;
table_desc->allocation = ACPI_MEM_ALLOCATED;
- table_desc->length = sizeof (fadt_descriptor_rev2);
+ table_desc->length = sizeof (struct fadt_descriptor_rev2);
/* Dump the entire FADT */
@@ -412,7 +412,7 @@ acpi_tb_convert_table_fadt (void)
acpi_status
acpi_tb_build_common_facs (
- acpi_table_desc *table_info)
+ struct acpi_table_desc *table_info)
{
ACPI_FUNCTION_TRACE ("tb_build_common_facs");
diff --git a/drivers/acpi/tables/tbget.c b/drivers/acpi/tables/tbget.c
index 7fac9e90e5ca..6f5ac9224775 100644
--- a/drivers/acpi/tables/tbget.c
+++ b/drivers/acpi/tables/tbget.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -47,11 +47,11 @@
acpi_status
acpi_tb_get_table (
- acpi_pointer *address,
- acpi_table_desc *table_info)
+ struct acpi_pointer *address,
+ struct acpi_table_desc *table_info)
{
- acpi_status status;
- acpi_table_header header;
+ acpi_status status;
+ struct acpi_table_header header;
ACPI_FUNCTION_TRACE ("tb_get_table");
@@ -97,11 +97,11 @@ acpi_tb_get_table (
acpi_status
acpi_tb_get_table_header (
- acpi_pointer *address,
- acpi_table_header *return_header)
+ struct acpi_pointer *address,
+ struct acpi_table_header *return_header)
{
- acpi_status status = AE_OK;
- acpi_table_header *header = NULL;
+ acpi_status status = AE_OK;
+ struct acpi_table_header *header = NULL;
ACPI_FUNCTION_TRACE ("tb_get_table_header");
@@ -117,7 +117,7 @@ acpi_tb_get_table_header (
/* Pointer matches processor mode, copy the header */
- ACPI_MEMCPY (return_header, address->pointer.logical, sizeof (acpi_table_header));
+ ACPI_MEMCPY (return_header, address->pointer.logical, sizeof (struct acpi_table_header));
break;
@@ -125,20 +125,20 @@ acpi_tb_get_table_header (
/* Create a logical address for the physical pointer*/
- status = acpi_os_map_memory (address->pointer.physical, sizeof (acpi_table_header),
+ status = acpi_os_map_memory (address->pointer.physical, sizeof (struct acpi_table_header),
(void **) &header);
if (ACPI_FAILURE (status)) {
ACPI_REPORT_ERROR (("Could not map memory at %8.8X%8.8X for length %X\n",
ACPI_HIDWORD (address->pointer.physical),
ACPI_LODWORD (address->pointer.physical),
- sizeof (acpi_table_header)));
+ sizeof (struct acpi_table_header)));
return_ACPI_STATUS (status);
}
/* Copy header and delete mapping */
- ACPI_MEMCPY (return_header, header, sizeof (acpi_table_header));
- acpi_os_unmap_memory (header, sizeof (acpi_table_header));
+ ACPI_MEMCPY (return_header, header, sizeof (struct acpi_table_header));
+ acpi_os_unmap_memory (header, sizeof (struct acpi_table_header));
break;
@@ -175,11 +175,11 @@ acpi_tb_get_table_header (
acpi_status
acpi_tb_get_table_body (
- acpi_pointer *address,
- acpi_table_header *header,
- acpi_table_desc *table_info)
+ struct acpi_pointer *address,
+ struct acpi_table_header *header,
+ struct acpi_table_desc *table_info)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("tb_get_table_body");
@@ -222,12 +222,12 @@ acpi_tb_get_table_body (
acpi_status
acpi_tb_table_override (
- acpi_table_header *header,
- acpi_table_desc *table_info)
+ struct acpi_table_header *header,
+ struct acpi_table_desc *table_info)
{
- acpi_table_header *new_table;
- acpi_status status;
- acpi_pointer address;
+ struct acpi_table_header *new_table;
+ acpi_status status;
+ struct acpi_pointer address;
ACPI_FUNCTION_TRACE ("tb_table_override");
@@ -296,13 +296,13 @@ acpi_tb_table_override (
acpi_status
acpi_tb_get_this_table (
- acpi_pointer *address,
- acpi_table_header *header,
- acpi_table_desc *table_info)
+ struct acpi_pointer *address,
+ struct acpi_table_header *header,
+ struct acpi_table_desc *table_info)
{
- acpi_table_header *full_table = NULL;
- u8 allocation;
- acpi_status status = AE_OK;
+ struct acpi_table_header *full_table = NULL;
+ u8 allocation;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("tb_get_this_table");
@@ -413,12 +413,12 @@ acpi_tb_get_this_table (
acpi_status
acpi_tb_get_table_ptr (
- acpi_table_type table_type,
- u32 instance,
- acpi_table_header **table_ptr_loc)
+ acpi_table_type table_type,
+ u32 instance,
+ struct acpi_table_header **table_ptr_loc)
{
- acpi_table_desc *table_desc;
- u32 i;
+ struct acpi_table_desc *table_desc;
+ u32 i;
ACPI_FUNCTION_TRACE ("tb_get_table_ptr");
diff --git a/drivers/acpi/tables/tbgetall.c b/drivers/acpi/tables/tbgetall.c
index 6f4e494d575f..bb93aff48fd0 100644
--- a/drivers/acpi/tables/tbgetall.c
+++ b/drivers/acpi/tables/tbgetall.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -46,11 +46,11 @@
acpi_status
acpi_tb_get_primary_table (
- acpi_pointer *address,
- acpi_table_desc *table_info)
+ struct acpi_pointer *address,
+ struct acpi_table_desc *table_info)
{
- acpi_status status;
- acpi_table_header header;
+ acpi_status status;
+ struct acpi_table_header header;
ACPI_FUNCTION_TRACE ("tb_get_primary_table");
@@ -72,7 +72,7 @@ acpi_tb_get_primary_table (
/* Clear the table_info */
- ACPI_MEMSET (table_info, 0, sizeof (acpi_table_desc));
+ ACPI_MEMSET (table_info, 0, sizeof (struct acpi_table_desc));
/*
* Check the table signature and make sure it is recognized.
@@ -113,12 +113,12 @@ acpi_tb_get_primary_table (
acpi_status
acpi_tb_get_secondary_table (
- acpi_pointer *address,
- acpi_string signature,
- acpi_table_desc *table_info)
+ struct acpi_pointer *address,
+ acpi_string signature,
+ struct acpi_table_desc *table_info)
{
- acpi_status status;
- acpi_table_header header;
+ acpi_status status;
+ struct acpi_table_header header;
ACPI_FUNCTION_TRACE_STR ("tb_get_secondary_table", signature);
@@ -186,10 +186,10 @@ acpi_status
acpi_tb_get_required_tables (
void)
{
- acpi_status status = AE_OK;
- u32 i;
- acpi_table_desc table_info;
- acpi_pointer address;
+ acpi_status status = AE_OK;
+ u32 i;
+ struct acpi_table_desc table_info;
+ struct acpi_pointer address;
ACPI_FUNCTION_TRACE ("tb_get_required_tables");
diff --git a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c
index e59ba8ca1d50..ada6eb0695dc 100644
--- a/drivers/acpi/tables/tbinstal.c
+++ b/drivers/acpi/tables/tbinstal.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -47,11 +47,11 @@
acpi_status
acpi_tb_match_signature (
- char *signature,
- acpi_table_desc *table_info,
- u8 search_type)
+ char *signature,
+ struct acpi_table_desc *table_info,
+ u8 search_type)
{
- acpi_native_uint i;
+ acpi_native_uint i;
ACPI_FUNCTION_TRACE ("tb_match_signature");
@@ -105,9 +105,9 @@ acpi_tb_match_signature (
acpi_status
acpi_tb_install_table (
- acpi_table_desc *table_info)
+ struct acpi_table_desc *table_info)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("tb_install_table");
@@ -159,11 +159,11 @@ acpi_tb_install_table (
acpi_status
acpi_tb_recognize_table (
- acpi_table_desc *table_info,
- u8 search_type)
+ struct acpi_table_desc *table_info,
+ u8 search_type)
{
- acpi_table_header *table_header;
- acpi_status status;
+ struct acpi_table_header *table_header;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("tb_recognize_table");
@@ -171,7 +171,7 @@ acpi_tb_recognize_table (
/* Ensure that we have a valid table pointer */
- table_header = (acpi_table_header *) table_info->pointer;
+ table_header = (struct acpi_table_header *) table_info->pointer;
if (!table_header) {
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
@@ -217,11 +217,11 @@ acpi_tb_recognize_table (
acpi_status
acpi_tb_init_table_descriptor (
- acpi_table_type table_type,
- acpi_table_desc *table_info)
+ acpi_table_type table_type,
+ struct acpi_table_desc *table_info)
{
- acpi_table_desc *list_head;
- acpi_table_desc *table_desc;
+ struct acpi_table_desc *list_head;
+ struct acpi_table_desc *table_desc;
ACPI_FUNCTION_TRACE_U32 ("tb_init_table_descriptor", table_type);
@@ -256,7 +256,7 @@ acpi_tb_init_table_descriptor (
* the new table in to the list of tables of this type.
*/
if (list_head->pointer) {
- table_desc = ACPI_MEM_CALLOCATE (sizeof (acpi_table_desc));
+ table_desc = ACPI_MEM_CALLOCATE (sizeof (struct acpi_table_desc));
if (!table_desc) {
return_ACPI_STATUS (AE_NO_MEMORY);
}
@@ -289,7 +289,7 @@ acpi_tb_init_table_descriptor (
table_desc->allocation = table_info->allocation;
table_desc->aml_start = (u8 *) (table_desc->pointer + 1),
table_desc->aml_length = (u32) (table_desc->length -
- (u32) sizeof (acpi_table_header));
+ (u32) sizeof (struct acpi_table_header));
table_desc->table_id = acpi_ut_allocate_owner_id (ACPI_OWNER_TYPE_TABLE);
table_desc->loaded_into_namespace = FALSE;
@@ -325,7 +325,7 @@ acpi_tb_init_table_descriptor (
void
acpi_tb_delete_acpi_tables (void)
{
- acpi_table_type type;
+ acpi_table_type type;
/*
@@ -353,7 +353,7 @@ acpi_tb_delete_acpi_tables (void)
void
acpi_tb_delete_acpi_table (
- acpi_table_type type)
+ acpi_table_type type)
{
ACPI_FUNCTION_TRACE_U32 ("tb_delete_acpi_table", type);
@@ -420,11 +420,11 @@ acpi_tb_delete_acpi_table (
void
acpi_tb_free_acpi_tables_of_type (
- acpi_table_desc *list_head)
+ struct acpi_table_desc *list_head)
{
- acpi_table_desc *table_desc;
- u32 count;
- u32 i;
+ struct acpi_table_desc *table_desc;
+ u32 count;
+ u32 i;
ACPI_FUNCTION_TRACE_PTR ("tb_free_acpi_tables_of_type", list_head);
@@ -462,7 +462,7 @@ acpi_tb_free_acpi_tables_of_type (
void
acpi_tb_delete_single_table (
- acpi_table_desc *table_desc)
+ struct acpi_table_desc *table_desc)
{
if (!table_desc) {
@@ -507,11 +507,11 @@ acpi_tb_delete_single_table (
*
******************************************************************************/
-acpi_table_desc *
+struct acpi_table_desc *
acpi_tb_uninstall_table (
- acpi_table_desc *table_desc)
+ struct acpi_table_desc *table_desc)
{
- acpi_table_desc *next_desc;
+ struct acpi_table_desc *next_desc;
ACPI_FUNCTION_TRACE_PTR ("acpi_tb_uninstall_table", table_desc);
diff --git a/drivers/acpi/tables/tbrsdt.c b/drivers/acpi/tables/tbrsdt.c
index d93af66cdf2b..ea104c065302 100644
--- a/drivers/acpi/tables/tbrsdt.c
+++ b/drivers/acpi/tables/tbrsdt.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -45,11 +45,11 @@
acpi_status
acpi_tb_verify_rsdp (
- acpi_pointer *address)
+ struct acpi_pointer *address)
{
- acpi_table_desc table_info;
- acpi_status status;
- rsdp_descriptor *rsdp;
+ struct acpi_table_desc table_info;
+ acpi_status status;
+ struct rsdp_descriptor *rsdp;
ACPI_FUNCTION_TRACE ("tb_verify_rsdp");
@@ -65,7 +65,7 @@ acpi_tb_verify_rsdp (
/*
* Obtain access to the RSDP structure
*/
- status = acpi_os_map_memory (address->pointer.physical, sizeof (rsdp_descriptor),
+ status = acpi_os_map_memory (address->pointer.physical, sizeof (struct rsdp_descriptor),
(void **) &rsdp);
if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status);
@@ -104,8 +104,8 @@ acpi_tb_verify_rsdp (
/* The RSDP supplied is OK */
- table_info.pointer = ACPI_CAST_PTR (acpi_table_header, rsdp);
- table_info.length = sizeof (rsdp_descriptor);
+ table_info.pointer = ACPI_CAST_PTR (struct acpi_table_header, rsdp);
+ table_info.length = sizeof (struct rsdp_descriptor);
table_info.allocation = ACPI_MEM_MAPPED;
/* Save the table pointers and allocation info */
@@ -117,7 +117,7 @@ acpi_tb_verify_rsdp (
/* Save the RSDP in a global for easy access */
- acpi_gbl_RSDP = ACPI_CAST_PTR (rsdp_descriptor, table_info.pointer);
+ acpi_gbl_RSDP = ACPI_CAST_PTR (struct rsdp_descriptor, table_info.pointer);
return_ACPI_STATUS (status);
@@ -125,7 +125,7 @@ acpi_tb_verify_rsdp (
cleanup:
if (acpi_gbl_table_flags & ACPI_PHYSICAL_POINTER) {
- acpi_os_unmap_memory (rsdp, sizeof (rsdp_descriptor));
+ acpi_os_unmap_memory (rsdp, sizeof (struct rsdp_descriptor));
}
return_ACPI_STATUS (status);
}
@@ -146,7 +146,7 @@ cleanup:
void
acpi_tb_get_rsdt_address (
- acpi_pointer *out_address)
+ struct acpi_pointer *out_address)
{
ACPI_FUNCTION_ENTRY ();
@@ -181,9 +181,9 @@ acpi_tb_get_rsdt_address (
acpi_status
acpi_tb_validate_rsdt (
- acpi_table_header *table_ptr)
+ struct acpi_table_header *table_ptr)
{
- int no_match;
+ int no_match;
ACPI_FUNCTION_NAME ("tb_validate_rsdt");
@@ -237,9 +237,9 @@ acpi_status
acpi_tb_get_table_rsdt (
void)
{
- acpi_table_desc table_info;
- acpi_status status;
- acpi_pointer address;
+ struct acpi_table_desc table_info;
+ acpi_status status;
+ struct acpi_pointer address;
ACPI_FUNCTION_TRACE ("tb_get_table_rsdt");
@@ -287,7 +287,7 @@ acpi_tb_get_table_rsdt (
return_ACPI_STATUS (status);
}
- acpi_gbl_XSDT = (xsdt_descriptor *) table_info.pointer;
+ acpi_gbl_XSDT = (XSDT_DESCRIPTOR *) table_info.pointer;
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "XSDT located at %p\n", acpi_gbl_XSDT));
return_ACPI_STATUS (status);
diff --git a/drivers/acpi/tables/tbutils.c b/drivers/acpi/tables/tbutils.c
index 3e17a4f867ef..584cc2277cfa 100644
--- a/drivers/acpi/tables/tbutils.c
+++ b/drivers/acpi/tables/tbutils.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -46,11 +46,11 @@
acpi_status
acpi_tb_handle_to_object (
- u16 table_id,
- acpi_table_desc **table_desc)
+ u16 table_id,
+ struct acpi_table_desc **table_desc)
{
- u32 i;
- acpi_table_desc *list_head;
+ u32 i;
+ struct acpi_table_desc *list_head;
ACPI_FUNCTION_NAME ("tb_handle_to_object");
@@ -96,9 +96,9 @@ acpi_tb_handle_to_object (
acpi_status
acpi_tb_validate_table_header (
- acpi_table_header *table_header)
+ struct acpi_table_header *table_header)
{
- acpi_name signature;
+ acpi_name signature;
ACPI_FUNCTION_NAME ("tb_validate_table_header");
@@ -106,7 +106,7 @@ acpi_tb_validate_table_header (
/* Verify that this is a valid address */
- if (!acpi_os_readable (table_header, sizeof (acpi_table_header))) {
+ if (!acpi_os_readable (table_header, sizeof (struct acpi_table_header))) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Cannot read table header at %p\n", table_header));
return (AE_BAD_ADDRESS);
@@ -122,20 +122,20 @@ acpi_tb_validate_table_header (
ACPI_REPORT_WARNING (("Invalid table signature found: [%4.4s]\n",
(char *) &signature));
- ACPI_DUMP_BUFFER (table_header, sizeof (acpi_table_header));
+ ACPI_DUMP_BUFFER (table_header, sizeof (struct acpi_table_header));
return (AE_BAD_SIGNATURE);
}
/* Validate the table length */
- if (table_header->length < sizeof (acpi_table_header)) {
+ if (table_header->length < sizeof (struct acpi_table_header)) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Invalid length in table header %p name %4.4s\n",
table_header, (char *) &signature));
ACPI_REPORT_WARNING (("Invalid table header length (0x%X) found\n",
(u32) table_header->length));
- ACPI_DUMP_BUFFER (table_header, sizeof (acpi_table_header));
+ ACPI_DUMP_BUFFER (table_header, sizeof (struct acpi_table_header));
return (AE_BAD_HEADER);
}
@@ -158,10 +158,10 @@ acpi_tb_validate_table_header (
acpi_status
acpi_tb_verify_table_checksum (
- acpi_table_header *table_header)
+ struct acpi_table_header *table_header)
{
- u8 checksum;
- acpi_status status = AE_OK;
+ u8 checksum;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("tb_verify_table_checksum");
@@ -198,12 +198,12 @@ acpi_tb_verify_table_checksum (
u8
acpi_tb_checksum (
- void *buffer,
- u32 length)
+ void *buffer,
+ u32 length)
{
- const u8 *limit;
- const u8 *rover;
- u8 sum = 0;
+ const u8 *limit;
+ const u8 *rover;
+ u8 sum = 0;
if (buffer && length) {
diff --git a/drivers/acpi/tables/tbxface.c b/drivers/acpi/tables/tbxface.c
index 572f948c3bee..f56302849f4a 100644
--- a/drivers/acpi/tables/tbxface.c
+++ b/drivers/acpi/tables/tbxface.c
@@ -6,7 +6,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -49,8 +49,8 @@
acpi_status
acpi_load_tables (void)
{
- acpi_pointer rsdp_address;
- acpi_status status;
+ struct acpi_pointer rsdp_address;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_load_tables");
@@ -136,11 +136,11 @@ error_exit:
acpi_status
acpi_load_table (
- acpi_table_header *table_ptr)
+ struct acpi_table_header *table_ptr)
{
- acpi_status status;
- acpi_table_desc table_info;
- acpi_pointer address;
+ acpi_status status;
+ struct acpi_table_desc table_info;
+ struct acpi_pointer address;
ACPI_FUNCTION_TRACE ("acpi_load_table");
@@ -214,9 +214,9 @@ acpi_load_table (
acpi_status
acpi_unload_table (
- acpi_table_type table_type)
+ acpi_table_type table_type)
{
- acpi_table_desc *list_head;
+ struct acpi_table_desc *list_head;
ACPI_FUNCTION_TRACE ("acpi_unload_table");
@@ -259,11 +259,11 @@ acpi_unload_table (
* Instance - the non zero instance of the table, allows
* support for multiple tables of the same type
* see acpi_gbl_acpi_table_flag
- * out_table_header - pointer to the acpi_table_header if successful
+ * out_table_header - pointer to the struct acpi_table_header if successful
*
* DESCRIPTION: This function is called to get an ACPI table header. The caller
* supplies an pointer to a data area sufficient to contain an ACPI
- * acpi_table_header structure.
+ * struct acpi_table_header structure.
*
* The header contains a length field that can be used to determine
* the size of the buffer needed to contain the entire table. This
@@ -274,12 +274,12 @@ acpi_unload_table (
acpi_status
acpi_get_table_header (
- acpi_table_type table_type,
- u32 instance,
- acpi_table_header *out_table_header)
+ acpi_table_type table_type,
+ u32 instance,
+ struct acpi_table_header *out_table_header)
{
- acpi_table_header *tbl_ptr;
- acpi_status status;
+ struct acpi_table_header *tbl_ptr;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_get_table_header");
@@ -318,7 +318,7 @@ acpi_get_table_header (
* Copy the header to the caller's buffer
*/
ACPI_MEMCPY ((void *) out_table_header, (void *) tbl_ptr,
- sizeof (acpi_table_header));
+ sizeof (struct acpi_table_header));
return_ACPI_STATUS (status);
}
@@ -349,13 +349,13 @@ acpi_get_table_header (
acpi_status
acpi_get_table (
- acpi_table_type table_type,
- u32 instance,
- acpi_buffer *ret_buffer)
+ acpi_table_type table_type,
+ u32 instance,
+ struct acpi_buffer *ret_buffer)
{
- acpi_table_header *tbl_ptr;
- acpi_status status;
- acpi_size table_length;
+ struct acpi_table_header *tbl_ptr;
+ acpi_status status;
+ acpi_size table_length;
ACPI_FUNCTION_TRACE ("acpi_get_table");
@@ -402,7 +402,7 @@ acpi_get_table (
/*
* RSD PTR is the only "table" without a header
*/
- table_length = sizeof (rsdp_descriptor);
+ table_length = sizeof (struct rsdp_descriptor);
}
else {
table_length = (acpi_size) tbl_ptr->length;
diff --git a/drivers/acpi/tables/tbxfroot.c b/drivers/acpi/tables/tbxfroot.c
index fac93852cdd8..2f0411011b64 100644
--- a/drivers/acpi/tables/tbxfroot.c
+++ b/drivers/acpi/tables/tbxfroot.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -48,13 +48,13 @@
acpi_status
acpi_tb_find_table (
- char *signature,
- char *oem_id,
- char *oem_table_id,
- acpi_table_header **table_ptr)
+ char *signature,
+ char *oem_id,
+ char *oem_table_id,
+ struct acpi_table_header **table_ptr)
{
- acpi_status status;
- acpi_table_header *table;
+ acpi_status status;
+ struct acpi_table_header *table;
ACPI_FUNCTION_TRACE ("tb_find_table");
@@ -112,20 +112,20 @@ acpi_tb_find_table (
acpi_status
acpi_get_firmware_table (
- acpi_string signature,
- u32 instance,
- u32 flags,
- acpi_table_header **table_pointer)
+ acpi_string signature,
+ u32 instance,
+ u32 flags,
+ struct acpi_table_header **table_pointer)
{
- acpi_pointer rsdp_address;
- acpi_pointer address;
- acpi_status status;
- acpi_table_header header;
- acpi_table_desc table_info;
- acpi_table_desc rsdt_info;
- u32 table_count;
- u32 i;
- u32 j;
+ struct acpi_pointer rsdp_address;
+ struct acpi_pointer address;
+ acpi_status status;
+ struct acpi_table_header header;
+ struct acpi_table_desc table_info;
+ struct acpi_table_desc rsdt_info;
+ u32 table_count;
+ u32 i;
+ u32 j;
ACPI_FUNCTION_TRACE ("acpi_get_firmware_table");
@@ -159,7 +159,7 @@ acpi_get_firmware_table (
/* Map and validate the RSDP */
if ((flags & ACPI_MEMORY_MODE) == ACPI_LOGICAL_ADDRESSING) {
- status = acpi_os_map_memory (rsdp_address.pointer.physical, sizeof (rsdp_descriptor),
+ status = acpi_os_map_memory (rsdp_address.pointer.physical, sizeof (struct rsdp_descriptor),
(void **) &acpi_gbl_RSDP);
if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status);
@@ -227,7 +227,7 @@ acpi_get_firmware_table (
}
else {
address.pointer.value =
- ((xsdt_descriptor *) rsdt_info.pointer)->table_offset_entry[i];
+ ((XSDT_DESCRIPTOR *) rsdt_info.pointer)->table_offset_entry[i];
}
/* Get the table header */
@@ -287,11 +287,11 @@ cleanup:
acpi_status
acpi_find_root_pointer (
- u32 flags,
- acpi_pointer *rsdp_address)
+ u32 flags,
+ struct acpi_pointer *rsdp_address)
{
- acpi_table_desc table_info;
- acpi_status status;
+ struct acpi_table_desc table_info;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_find_root_pointer");
@@ -327,11 +327,11 @@ acpi_find_root_pointer (
u8 *
acpi_tb_scan_memory_for_rsdp (
- u8 *start_address,
- u32 length)
+ u8 *start_address,
+ u32 length)
{
- u32 offset;
- u8 *mem_rover;
+ u32 offset;
+ u8 *mem_rover;
ACPI_FUNCTION_TRACE ("tb_scan_memory_for_rsdp");
@@ -384,13 +384,13 @@ acpi_tb_scan_memory_for_rsdp (
acpi_status
acpi_tb_find_rsdp (
- acpi_table_desc *table_info,
- u32 flags)
+ struct acpi_table_desc *table_info,
+ u32 flags)
{
- u8 *table_ptr;
- u8 *mem_rover;
- u64 phys_addr;
- acpi_status status = AE_OK;
+ u8 *table_ptr;
+ u8 *mem_rover;
+ u64 phys_addr;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("tb_find_rsdp");
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 536d8aa20a89..a5386b04a51a 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -270,8 +270,8 @@ acpi_thermal_set_cooling_mode (
int mode)
{
acpi_status status = AE_OK;
- acpi_object arg0 = {ACPI_TYPE_INTEGER};
- acpi_object_list arg_list= {1, &arg0};
+ union acpi_object arg0 = {ACPI_TYPE_INTEGER};
+ struct acpi_object_list arg_list = {1, &arg0};
acpi_handle handle = NULL;
ACPI_FUNCTION_TRACE("acpi_thermal_set_cooling_mode");
diff --git a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c
index 388e9ec564aa..40eb512d2609 100644
--- a/drivers/acpi/toshiba_acpi.c
+++ b/drivers/acpi/toshiba_acpi.c
@@ -174,8 +174,8 @@ snscanf(const char* str, int n, const char* format, ...)
static int
write_acpi_int(const char* methodName, int val)
{
- acpi_object_list params;
- acpi_object in_objs[1];
+ struct acpi_object_list params;
+ union acpi_object in_objs[1];
acpi_status status;
params.count = sizeof(in_objs)/sizeof(in_objs[0]);
@@ -211,10 +211,10 @@ read_acpi_int(const char* methodName, int* pVal)
static acpi_status
hci_raw(const u32 in[HCI_WORDS], u32 out[HCI_WORDS])
{
- acpi_object_list params;
- acpi_object in_objs[HCI_WORDS];
- acpi_buffer results;
- acpi_object out_objs[HCI_WORDS+1];
+ struct acpi_object_list params;
+ union acpi_object in_objs[HCI_WORDS];
+ struct acpi_buffer results;
+ union acpi_object out_objs[HCI_WORDS+1];
acpi_status status;
int i;
diff --git a/drivers/acpi/utilities/utalloc.c b/drivers/acpi/utilities/utalloc.c
index 918e4f969d8e..abedbd2c042a 100644
--- a/drivers/acpi/utilities/utalloc.c
+++ b/drivers/acpi/utilities/utalloc.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -45,10 +45,10 @@
void
acpi_ut_release_to_cache (
- u32 list_id,
- void *object)
+ u32 list_id,
+ void *object)
{
- acpi_memory_list *cache_info;
+ struct acpi_memory_list *cache_info;
ACPI_FUNCTION_ENTRY ();
@@ -101,10 +101,10 @@ acpi_ut_release_to_cache (
void *
acpi_ut_acquire_from_cache (
- u32 list_id)
+ u32 list_id)
{
- acpi_memory_list *cache_info;
- void *object;
+ struct acpi_memory_list *cache_info;
+ void *object;
ACPI_FUNCTION_NAME ("ut_acquire_from_cache");
@@ -173,10 +173,10 @@ acpi_ut_acquire_from_cache (
void
acpi_ut_delete_generic_cache (
- u32 list_id)
+ u32 list_id)
{
- acpi_memory_list *cache_info;
- char *next;
+ struct acpi_memory_list *cache_info;
+ char *next;
ACPI_FUNCTION_ENTRY ();
@@ -203,13 +203,13 @@ acpi_ut_delete_generic_cache (
*
* RETURN: Status
*
- * DESCRIPTION: Perform parameter validation checks on an acpi_buffer
+ * DESCRIPTION: Perform parameter validation checks on an struct acpi_buffer
*
******************************************************************************/
acpi_status
acpi_ut_validate_buffer (
- acpi_buffer *buffer)
+ struct acpi_buffer *buffer)
{
/* Obviously, the structure pointer must be valid */
@@ -252,10 +252,10 @@ acpi_ut_validate_buffer (
acpi_status
acpi_ut_initialize_buffer (
- acpi_buffer *buffer,
- acpi_size required_length)
+ struct acpi_buffer *buffer,
+ acpi_size required_length)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
switch (buffer->length) {
@@ -329,12 +329,12 @@ acpi_ut_initialize_buffer (
void *
acpi_ut_allocate (
- acpi_size size,
- u32 component,
- char *module,
- u32 line)
+ acpi_size size,
+ u32 component,
+ char *module,
+ u32 line)
{
- void *allocation;
+ void *allocation;
ACPI_FUNCTION_TRACE_U32 ("ut_allocate", size);
@@ -379,12 +379,12 @@ acpi_ut_allocate (
void *
acpi_ut_callocate (
- acpi_size size,
- u32 component,
- char *module,
- u32 line)
+ acpi_size size,
+ u32 component,
+ char *module,
+ u32 line)
{
- void *allocation;
+ void *allocation;
ACPI_FUNCTION_TRACE_U32 ("ut_callocate", size);
@@ -444,16 +444,16 @@ acpi_ut_callocate (
void *
acpi_ut_allocate_and_track (
- acpi_size size,
- u32 component,
- char *module,
- u32 line)
+ acpi_size size,
+ u32 component,
+ char *module,
+ u32 line)
{
- acpi_debug_mem_block *allocation;
- acpi_status status;
+ struct acpi_debug_mem_block *allocation;
+ acpi_status status;
- allocation = acpi_ut_allocate (size + sizeof (acpi_debug_mem_block), component,
+ allocation = acpi_ut_allocate (size + sizeof (struct acpi_debug_mem_block), component,
module, line);
if (!allocation) {
return (NULL);
@@ -490,16 +490,16 @@ acpi_ut_allocate_and_track (
void *
acpi_ut_callocate_and_track (
- acpi_size size,
- u32 component,
- char *module,
- u32 line)
+ acpi_size size,
+ u32 component,
+ char *module,
+ u32 line)
{
- acpi_debug_mem_block *allocation;
- acpi_status status;
+ struct acpi_debug_mem_block *allocation;
+ acpi_status status;
- allocation = acpi_ut_callocate (size + sizeof (acpi_debug_mem_block), component,
+ allocation = acpi_ut_callocate (size + sizeof (struct acpi_debug_mem_block), component,
module, line);
if (!allocation) {
/* Report allocation error */
@@ -540,13 +540,13 @@ acpi_ut_callocate_and_track (
void
acpi_ut_free_and_track (
- void *allocation,
- u32 component,
- char *module,
- u32 line)
+ void *allocation,
+ u32 component,
+ char *module,
+ u32 line)
{
- acpi_debug_mem_block *debug_block;
- acpi_status status;
+ struct acpi_debug_mem_block *debug_block;
+ acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ut_free", allocation);
@@ -559,8 +559,8 @@ acpi_ut_free_and_track (
return_VOID;
}
- debug_block = ACPI_CAST_PTR (acpi_debug_mem_block,
- (((char *) allocation) - sizeof (acpi_debug_mem_header)));
+ debug_block = ACPI_CAST_PTR (struct acpi_debug_mem_block,
+ (((char *) allocation) - sizeof (struct acpi_debug_mem_header)));
acpi_gbl_memory_lists[ACPI_MEM_LIST_GLOBAL].total_freed++;
acpi_gbl_memory_lists[ACPI_MEM_LIST_GLOBAL].current_total_size -= debug_block->size;
@@ -592,12 +592,12 @@ acpi_ut_free_and_track (
*
******************************************************************************/
-acpi_debug_mem_block *
+struct acpi_debug_mem_block *
acpi_ut_find_allocation (
- u32 list_id,
- void *allocation)
+ u32 list_id,
+ void *allocation)
{
- acpi_debug_mem_block *element;
+ struct acpi_debug_mem_block *element;
ACPI_FUNCTION_ENTRY ();
@@ -642,17 +642,17 @@ acpi_ut_find_allocation (
acpi_status
acpi_ut_track_allocation (
- u32 list_id,
- acpi_debug_mem_block *allocation,
- acpi_size size,
- u8 alloc_type,
- u32 component,
- char *module,
- u32 line)
+ u32 list_id,
+ struct acpi_debug_mem_block *allocation,
+ acpi_size size,
+ u8 alloc_type,
+ u32 component,
+ char *module,
+ u32 line)
{
- acpi_memory_list *mem_list;
- acpi_debug_mem_block *element;
- acpi_status status = AE_OK;
+ struct acpi_memory_list *mem_list;
+ struct acpi_debug_mem_block *element;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_PTR ("ut_track_allocation", allocation);
@@ -695,7 +695,7 @@ acpi_ut_track_allocation (
/* Insert at list head */
if (mem_list->list_head) {
- ((acpi_debug_mem_block *)(mem_list->list_head))->previous = allocation;
+ ((struct acpi_debug_mem_block *)(mem_list->list_head))->previous = allocation;
}
allocation->next = mem_list->list_head;
@@ -727,14 +727,14 @@ unlock_and_exit:
acpi_status
acpi_ut_remove_allocation (
- u32 list_id,
- acpi_debug_mem_block *allocation,
- u32 component,
- char *module,
- u32 line)
+ u32 list_id,
+ struct acpi_debug_mem_block *allocation,
+ u32 component,
+ char *module,
+ u32 line)
{
- acpi_memory_list *mem_list;
- acpi_status status;
+ struct acpi_memory_list *mem_list;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ut_remove_allocation");
@@ -800,7 +800,7 @@ acpi_ut_dump_allocation_info (
void)
{
/*
- acpi_memory_list *mem_list;
+ struct acpi_memory_list *mem_list;
*/
ACPI_FUNCTION_TRACE ("ut_dump_allocation_info");
@@ -836,7 +836,7 @@ acpi_ut_dump_allocation_info (
ACPI_DEBUG_PRINT (TRACE_ALLOCATIONS | TRACE_TABLES,
("%30s: %4d (%3d Kb)\n", "Max Nodes",
acpi_gbl_max_concurrent_node_count,
- ROUND_UP_TO_1K ((acpi_gbl_max_concurrent_node_count * sizeof (acpi_namespace_node)))));
+ ROUND_UP_TO_1K ((acpi_gbl_max_concurrent_node_count * sizeof (struct acpi_namespace_node)))));
*/
return_VOID;
}
@@ -857,12 +857,12 @@ acpi_ut_dump_allocation_info (
void
acpi_ut_dump_allocations (
- u32 component,
- char *module)
+ u32 component,
+ char *module)
{
- acpi_debug_mem_block *element;
- acpi_descriptor *descriptor;
- u32 num_outstanding = 0;
+ struct acpi_debug_mem_block *element;
+ union acpi_descriptor *descriptor;
+ u32 num_outstanding = 0;
ACPI_FUNCTION_TRACE ("ut_dump_allocations");
@@ -881,7 +881,7 @@ acpi_ut_dump_allocations (
((module == NULL) || (0 == ACPI_STRCMP (module, element->module)))) {
/* Ignore allocated objects that are in a cache */
- descriptor = ACPI_CAST_PTR (acpi_descriptor, &element->user_space);
+ descriptor = ACPI_CAST_PTR (union acpi_descriptor, &element->user_space);
if (descriptor->descriptor_id != ACPI_DESC_TYPE_CACHED) {
acpi_os_printf ("%p Len %04X %9.9s-%d ",
descriptor, element->size, element->module,
diff --git a/drivers/acpi/utilities/utcopy.c b/drivers/acpi/utilities/utcopy.c
index c31b087904bb..3dcb31ad7ed8 100644
--- a/drivers/acpi/utilities/utcopy.c
+++ b/drivers/acpi/utilities/utcopy.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -50,12 +50,12 @@
static acpi_status
acpi_ut_copy_isimple_to_esimple (
- acpi_operand_object *internal_object,
- acpi_object *external_object,
- u8 *data_space,
- acpi_size *buffer_space_used)
+ union acpi_operand_object *internal_object,
+ union acpi_object *external_object,
+ u8 *data_space,
+ acpi_size *buffer_space_used)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ut_copy_isimple_to_esimple");
@@ -73,7 +73,7 @@ acpi_ut_copy_isimple_to_esimple (
/* Always clear the external object */
- ACPI_MEMSET (external_object, 0, sizeof (acpi_object));
+ ACPI_MEMSET (external_object, 0, sizeof (union acpi_object));
/*
* In general, the external object will be the same type as
@@ -177,24 +177,24 @@ acpi_ut_copy_isimple_to_esimple (
acpi_status
acpi_ut_copy_ielement_to_eelement (
- u8 object_type,
- acpi_operand_object *source_object,
- acpi_generic_state *state,
- void *context)
+ u8 object_type,
+ union acpi_operand_object *source_object,
+ union acpi_generic_state *state,
+ void *context)
{
- acpi_status status = AE_OK;
- acpi_pkg_info *info = (acpi_pkg_info *) context;
- acpi_size object_space;
- u32 this_index;
- acpi_object *target_object;
+ acpi_status status = AE_OK;
+ struct acpi_pkg_info *info = (struct acpi_pkg_info *) context;
+ acpi_size object_space;
+ u32 this_index;
+ union acpi_object *target_object;
ACPI_FUNCTION_ENTRY ();
this_index = state->pkg.index;
- target_object = (acpi_object *)
- &((acpi_object *)(state->pkg.dest_object))->package.elements[this_index];
+ target_object = (union acpi_object *)
+ &((union acpi_object *)(state->pkg.dest_object))->package.elements[this_index];
switch (object_type) {
case ACPI_COPY_TYPE_SIMPLE:
@@ -217,7 +217,7 @@ acpi_ut_copy_ielement_to_eelement (
*/
target_object->type = ACPI_TYPE_PACKAGE;
target_object->package.count = source_object->package.count;
- target_object->package.elements = ACPI_CAST_PTR (acpi_object, info->free_space);
+ target_object->package.elements = ACPI_CAST_PTR (union acpi_object, info->free_space);
/*
* Pass the new package object back to the package walk routine
@@ -229,7 +229,7 @@ acpi_ut_copy_ielement_to_eelement (
* update the buffer length counter
*/
object_space = ACPI_ROUND_UP_TO_NATIVE_WORD (
- (acpi_size) target_object->package.count * sizeof (acpi_object));
+ (acpi_size) target_object->package.count * sizeof (union acpi_object));
break;
@@ -264,13 +264,13 @@ acpi_ut_copy_ielement_to_eelement (
static acpi_status
acpi_ut_copy_ipackage_to_epackage (
- acpi_operand_object *internal_object,
- u8 *buffer,
- acpi_size *space_used)
+ union acpi_operand_object *internal_object,
+ u8 *buffer,
+ acpi_size *space_used)
{
- acpi_object *external_object;
- acpi_status status;
- acpi_pkg_info info;
+ union acpi_object *external_object;
+ acpi_status status;
+ struct acpi_pkg_info info;
ACPI_FUNCTION_TRACE ("ut_copy_ipackage_to_epackage");
@@ -279,28 +279,28 @@ acpi_ut_copy_ipackage_to_epackage (
/*
* First package at head of the buffer
*/
- external_object = ACPI_CAST_PTR (acpi_object, buffer);
+ external_object = ACPI_CAST_PTR (union acpi_object, buffer);
/*
* Free space begins right after the first package
*/
- info.length = ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (acpi_object));
- info.free_space = buffer + ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (acpi_object));
+ info.length = ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object));
+ info.free_space = buffer + ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object));
info.object_space = 0;
info.num_packages = 1;
external_object->type = ACPI_GET_OBJECT_TYPE (internal_object);
external_object->package.count = internal_object->package.count;
- external_object->package.elements = ACPI_CAST_PTR (acpi_object, info.free_space);
+ external_object->package.elements = ACPI_CAST_PTR (union acpi_object, info.free_space);
/*
* Leave room for an array of ACPI_OBJECTS in the buffer
* and move the free space past it
*/
info.length += (acpi_size) external_object->package.count *
- ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (acpi_object));
+ ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object));
info.free_space += external_object->package.count *
- ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (acpi_object));
+ ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object));
status = acpi_ut_walk_package_tree (internal_object, external_object,
acpi_ut_copy_ielement_to_eelement, &info);
@@ -326,10 +326,10 @@ acpi_ut_copy_ipackage_to_epackage (
acpi_status
acpi_ut_copy_iobject_to_eobject (
- acpi_operand_object *internal_object,
- acpi_buffer *ret_buffer)
+ union acpi_operand_object *internal_object,
+ struct acpi_buffer *ret_buffer)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ut_copy_iobject_to_eobject");
@@ -348,15 +348,15 @@ acpi_ut_copy_iobject_to_eobject (
* Build a simple object (no nested objects)
*/
status = acpi_ut_copy_isimple_to_esimple (internal_object,
- (acpi_object *) ret_buffer->pointer,
+ (union acpi_object *) ret_buffer->pointer,
((u8 *) ret_buffer->pointer +
- ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (acpi_object))),
+ ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object))),
&ret_buffer->length);
/*
* build simple does not include the object size in the length
* so we add it in here
*/
- ret_buffer->length += sizeof (acpi_object);
+ ret_buffer->length += sizeof (union acpi_object);
}
return_ACPI_STATUS (status);
@@ -381,10 +381,10 @@ acpi_ut_copy_iobject_to_eobject (
acpi_status
acpi_ut_copy_esimple_to_isimple (
- acpi_object *external_object,
- acpi_operand_object **ret_internal_object)
+ union acpi_object *external_object,
+ union acpi_operand_object **ret_internal_object)
{
- acpi_operand_object *internal_object;
+ union acpi_operand_object *internal_object;
ACPI_FUNCTION_TRACE ("ut_copy_esimple_to_isimple");
@@ -488,17 +488,17 @@ acpi_ut_copy_esimple_to_isimple (
static acpi_status
acpi_ut_copy_epackage_to_ipackage (
- acpi_operand_object *internal_object,
- u8 *buffer,
- u32 *space_used)
+ union acpi_operand_object *internal_object,
+ u8 *buffer,
+ u32 *space_used)
{
- u8 *free_space;
- acpi_object *external_object;
- u32 length = 0;
- u32 this_index;
- u32 object_space = 0;
- acpi_operand_object *this_internal_obj;
- acpi_object *this_external_obj;
+ u8 *free_space;
+ union acpi_object *external_object;
+ u32 length = 0;
+ u32 this_index;
+ u32 object_space = 0;
+ union acpi_operand_object *this_internal_obj;
+ union acpi_object *this_external_obj;
ACPI_FUNCTION_TRACE ("ut_copy_epackage_to_ipackage");
@@ -507,23 +507,23 @@ acpi_ut_copy_epackage_to_ipackage (
/*
* First package at head of the buffer
*/
- external_object = (acpi_object *)buffer;
+ external_object = (union acpi_object *)buffer;
/*
* Free space begins right after the first package
*/
- free_space = buffer + sizeof(acpi_object);
+ free_space = buffer + sizeof(union acpi_object);
external_object->type = ACPI_GET_OBJECT_TYPE (internal_object);
external_object->package.count = internal_object->package.count;
- external_object->package.elements = (acpi_object *)free_space;
+ external_object->package.elements = (union acpi_object *)free_space;
/*
* Build an array of ACPI_OBJECTS in the buffer
* and move the free space past it
*/
- free_space += external_object->package.count * sizeof(acpi_object);
+ free_space += external_object->package.count * sizeof(union acpi_object);
/* Call walk_package */
@@ -548,10 +548,10 @@ acpi_ut_copy_epackage_to_ipackage (
acpi_status
acpi_ut_copy_eobject_to_iobject (
- acpi_object *external_object,
- acpi_operand_object **internal_object)
+ union acpi_object *external_object,
+ union acpi_operand_object **internal_object)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ut_copy_eobject_to_iobject");
@@ -594,11 +594,11 @@ acpi_ut_copy_eobject_to_iobject (
acpi_status
acpi_ut_copy_simple_object (
- acpi_operand_object *source_desc,
- acpi_operand_object *dest_desc)
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object *dest_desc)
{
- u16 reference_count;
- acpi_operand_object *next_object;
+ u16 reference_count;
+ union acpi_operand_object *next_object;
/* Save fields from destination that we don't want to overwrite */
@@ -609,7 +609,7 @@ acpi_ut_copy_simple_object (
/* Copy the entire source object over the destination object*/
ACPI_MEMCPY ((char *) dest_desc, (char *) source_desc,
- sizeof (acpi_operand_object));
+ sizeof (union acpi_operand_object));
/* Restore the saved fields */
@@ -685,22 +685,22 @@ acpi_ut_copy_simple_object (
acpi_status
acpi_ut_copy_ielement_to_ielement (
- u8 object_type,
- acpi_operand_object *source_object,
- acpi_generic_state *state,
- void *context)
+ u8 object_type,
+ union acpi_operand_object *source_object,
+ union acpi_generic_state *state,
+ void *context)
{
- acpi_status status = AE_OK;
- u32 this_index;
- acpi_operand_object **this_target_ptr;
- acpi_operand_object *target_object;
+ acpi_status status = AE_OK;
+ u32 this_index;
+ union acpi_operand_object **this_target_ptr;
+ union acpi_operand_object *target_object;
ACPI_FUNCTION_ENTRY ();
this_index = state->pkg.index;
- this_target_ptr = (acpi_operand_object **)
+ this_target_ptr = (union acpi_operand_object **)
&state->pkg.dest_object->package.elements[this_index];
switch (object_type) {
@@ -794,11 +794,11 @@ acpi_ut_copy_ielement_to_ielement (
acpi_status
acpi_ut_copy_ipackage_to_ipackage (
- acpi_operand_object *source_obj,
- acpi_operand_object *dest_obj,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *source_obj,
+ union acpi_operand_object *dest_obj,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ut_copy_ipackage_to_ipackage");
@@ -852,11 +852,11 @@ acpi_ut_copy_ipackage_to_ipackage (
acpi_status
acpi_ut_copy_iobject_to_iobject (
- acpi_operand_object *source_desc,
- acpi_operand_object **dest_desc,
- acpi_walk_state *walk_state)
+ union acpi_operand_object *source_desc,
+ union acpi_operand_object **dest_desc,
+ struct acpi_walk_state *walk_state)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ut_copy_iobject_to_iobject");
diff --git a/drivers/acpi/utilities/utdebug.c b/drivers/acpi/utilities/utdebug.c
index 8beff26c5fe2..b60112793dd3 100644
--- a/drivers/acpi/utilities/utdebug.c
+++ b/drivers/acpi/utilities/utdebug.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@ void
acpi_ut_init_stack_ptr_trace (
void)
{
- u32 current_sp;
+ u32 current_sp;
acpi_gbl_entry_stack_pointer = ACPI_PTR_DIFF (&current_sp, NULL);
@@ -75,7 +75,7 @@ void
acpi_ut_track_stack_ptr (
void)
{
- acpi_size current_sp;
+ acpi_size current_sp;
current_sp = ACPI_PTR_DIFF (&current_sp, NULL);
@@ -112,13 +112,13 @@ acpi_ut_track_stack_ptr (
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_debug_print (
- u32 requested_debug_level,
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- char *format,
+ u32 requested_debug_level,
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ char *format,
...)
{
- u32 thread_id;
+ u32 thread_id;
va_list args;
@@ -183,10 +183,10 @@ acpi_ut_debug_print (
void ACPI_INTERNAL_VAR_XFACE
acpi_ut_debug_print_raw (
- u32 requested_debug_level,
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- char *format,
+ u32 requested_debug_level,
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ char *format,
...)
{
va_list args;
@@ -221,8 +221,8 @@ acpi_ut_debug_print_raw (
void
acpi_ut_trace (
- u32 line_number,
- acpi_debug_print_info *dbg_info)
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info)
{
acpi_gbl_nesting_level++;
@@ -253,9 +253,9 @@ acpi_ut_trace (
void
acpi_ut_trace_ptr (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- void *pointer)
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ void *pointer)
{
acpi_gbl_nesting_level++;
acpi_ut_track_stack_ptr ();
@@ -285,9 +285,9 @@ acpi_ut_trace_ptr (
void
acpi_ut_trace_str (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- char *string)
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ char *string)
{
acpi_gbl_nesting_level++;
@@ -318,9 +318,9 @@ acpi_ut_trace_str (
void
acpi_ut_trace_u32 (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- u32 integer)
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ u32 integer)
{
acpi_gbl_nesting_level++;
@@ -350,8 +350,8 @@ acpi_ut_trace_u32 (
void
acpi_ut_exit (
- u32 line_number,
- acpi_debug_print_info *dbg_info)
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info)
{
acpi_ut_debug_print (ACPI_LV_FUNCTIONS, line_number, dbg_info,
@@ -381,9 +381,9 @@ acpi_ut_exit (
void
acpi_ut_status_exit (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- acpi_status status)
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ acpi_status status)
{
if (ACPI_SUCCESS (status)) {
@@ -421,9 +421,9 @@ acpi_ut_status_exit (
void
acpi_ut_value_exit (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- acpi_integer value)
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ acpi_integer value)
{
acpi_ut_debug_print (ACPI_LV_FUNCTIONS, line_number, dbg_info,
@@ -454,9 +454,9 @@ acpi_ut_value_exit (
void
acpi_ut_ptr_exit (
- u32 line_number,
- acpi_debug_print_info *dbg_info,
- u8 *ptr)
+ u32 line_number,
+ struct acpi_debug_print_info *dbg_info,
+ u8 *ptr)
{
acpi_ut_debug_print (ACPI_LV_FUNCTIONS, line_number, dbg_info,
@@ -485,15 +485,15 @@ acpi_ut_ptr_exit (
void
acpi_ut_dump_buffer (
- u8 *buffer,
- u32 count,
- u32 display,
- u32 component_id)
+ u8 *buffer,
+ u32 count,
+ u32 display,
+ u32 component_id)
{
- acpi_native_uint i = 0;
- acpi_native_uint j;
- u32 temp32;
- u8 buf_char;
+ acpi_native_uint i = 0;
+ acpi_native_uint j;
+ u32 temp32;
+ u8 buf_char;
/* Only dump the buffer if tracing is enabled */
diff --git a/drivers/acpi/utilities/utdelete.c b/drivers/acpi/utilities/utdelete.c
index 22a5aa788528..66916f241ac2 100644
--- a/drivers/acpi/utilities/utdelete.c
+++ b/drivers/acpi/utilities/utdelete.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -46,11 +46,11 @@
void
acpi_ut_delete_internal_obj (
- acpi_operand_object *object)
+ union acpi_operand_object *object)
{
- void *obj_pointer = NULL;
- acpi_operand_object *handler_desc;
- acpi_operand_object *second_desc;
+ void *obj_pointer = NULL;
+ union acpi_operand_object *handler_desc;
+ union acpi_operand_object *second_desc;
ACPI_FUNCTION_TRACE_PTR ("ut_delete_internal_obj", object);
@@ -217,9 +217,9 @@ acpi_ut_delete_internal_obj (
void
acpi_ut_delete_internal_object_list (
- acpi_operand_object **obj_list)
+ union acpi_operand_object **obj_list)
{
- acpi_operand_object **internal_obj;
+ union acpi_operand_object **internal_obj;
ACPI_FUNCTION_TRACE ("ut_delete_internal_object_list");
@@ -253,11 +253,11 @@ acpi_ut_delete_internal_object_list (
static void
acpi_ut_update_ref_count (
- acpi_operand_object *object,
- u32 action)
+ union acpi_operand_object *object,
+ u32 action)
{
- u16 count;
- u16 new_count;
+ u16 count;
+ u16 new_count;
ACPI_FUNCTION_NAME ("ut_update_ref_count");
@@ -369,15 +369,15 @@ acpi_ut_update_ref_count (
acpi_status
acpi_ut_update_object_reference (
- acpi_operand_object *object,
- u16 action)
+ union acpi_operand_object *object,
+ u16 action)
{
- acpi_status status;
- u32 i;
- acpi_operand_object *next;
- acpi_operand_object *new;
- acpi_generic_state *state_list = NULL;
- acpi_generic_state *state;
+ acpi_status status;
+ u32 i;
+ union acpi_operand_object *next;
+ union acpi_operand_object *new;
+ union acpi_generic_state *state_list = NULL;
+ union acpi_generic_state *state;
ACPI_FUNCTION_TRACE_PTR ("ut_update_object_reference", object);
@@ -556,7 +556,7 @@ error_exit:
void
acpi_ut_add_reference (
- acpi_operand_object *object)
+ union acpi_operand_object *object)
{
ACPI_FUNCTION_TRACE_PTR ("ut_add_reference", object);
@@ -591,7 +591,7 @@ acpi_ut_add_reference (
void
acpi_ut_remove_reference (
- acpi_operand_object *object)
+ union acpi_operand_object *object)
{
ACPI_FUNCTION_TRACE_PTR ("ut_remove_reference", object);
diff --git a/drivers/acpi/utilities/uteval.c b/drivers/acpi/utilities/uteval.c
index 11716dc3bd2a..ce1e74c7a0be 100644
--- a/drivers/acpi/utilities/uteval.c
+++ b/drivers/acpi/utilities/uteval.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -53,14 +53,14 @@
acpi_status
acpi_ut_evaluate_object (
- acpi_namespace_node *prefix_node,
- char *path,
- u32 expected_return_btypes,
- acpi_operand_object **return_desc)
+ struct acpi_namespace_node *prefix_node,
+ char *path,
+ u32 expected_return_btypes,
+ union acpi_operand_object **return_desc)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
- u32 return_btype;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
+ u32 return_btype;
ACPI_FUNCTION_TRACE ("ut_evaluate_object");
@@ -161,12 +161,12 @@ acpi_ut_evaluate_object (
acpi_status
acpi_ut_evaluate_numeric_object (
- char *object_name,
- acpi_namespace_node *device_node,
- acpi_integer *address)
+ char *object_name,
+ struct acpi_namespace_node *device_node,
+ acpi_integer *address)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ut_evaluate_numeric_object");
@@ -207,11 +207,11 @@ acpi_ut_evaluate_numeric_object (
acpi_status
acpi_ut_execute_HID (
- acpi_namespace_node *device_node,
- acpi_device_id *hid)
+ struct acpi_namespace_node *device_node,
+ struct acpi_device_id *hid)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ut_execute_HID");
@@ -259,11 +259,11 @@ acpi_ut_execute_HID (
acpi_status
acpi_ut_execute_CID (
- acpi_namespace_node *device_node,
- acpi_device_id *cid)
+ struct acpi_namespace_node *device_node,
+ struct acpi_device_id *cid)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ut_execute_CID");
@@ -333,11 +333,11 @@ acpi_ut_execute_CID (
acpi_status
acpi_ut_execute_UID (
- acpi_namespace_node *device_node,
- acpi_device_id *uid)
+ struct acpi_namespace_node *device_node,
+ struct acpi_device_id *uid)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ut_execute_UID");
@@ -385,11 +385,11 @@ acpi_ut_execute_UID (
acpi_status
acpi_ut_execute_STA (
- acpi_namespace_node *device_node,
- u32 *flags)
+ struct acpi_namespace_node *device_node,
+ u32 *flags)
{
- acpi_operand_object *obj_desc;
- acpi_status status;
+ union acpi_operand_object *obj_desc;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ut_execute_STA");
diff --git a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c
index fe6941745cbe..019d7e017e6c 100644
--- a/drivers/acpi/utilities/utglobal.c
+++ b/drivers/acpi/utilities/utglobal.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -45,10 +45,10 @@
const char *
acpi_format_exception (
- acpi_status status)
+ acpi_status status)
{
- const char *exception = "UNKNOWN_STATUS_CODE";
- acpi_status sub_status;
+ const char *exception = "UNKNOWN_STATUS_CODE";
+ acpi_status sub_status;
ACPI_FUNCTION_NAME ("format_exception");
@@ -125,34 +125,34 @@ unknown:
/* Debug switch - level and trace mask */
#ifdef ACPI_DEBUG_OUTPUT
-u32 acpi_dbg_level = ACPI_DEBUG_DEFAULT;
+u32 acpi_dbg_level = ACPI_DEBUG_DEFAULT;
#else
-u32 acpi_dbg_level = ACPI_NORMAL_DEFAULT;
+u32 acpi_dbg_level = ACPI_NORMAL_DEFAULT;
#endif
/* Debug switch - layer (component) mask */
-u32 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT;
-u32 acpi_gbl_nesting_level = 0;
+u32 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT;
+u32 acpi_gbl_nesting_level = 0;
/* Debugger globals */
-u8 acpi_gbl_db_terminate_threads = FALSE;
-u8 acpi_gbl_abort_method = FALSE;
-u8 acpi_gbl_method_executing = FALSE;
+u8 acpi_gbl_db_terminate_threads = FALSE;
+u8 acpi_gbl_abort_method = FALSE;
+u8 acpi_gbl_method_executing = FALSE;
/* System flags */
-u32 acpi_gbl_startup_flags = 0;
+u32 acpi_gbl_startup_flags = 0;
/* System starts uninitialized */
-u8 acpi_gbl_shutdown = TRUE;
+u8 acpi_gbl_shutdown = TRUE;
-const u8 acpi_gbl_decode_to8bit [8] = {1,2,4,8,16,32,64,128};
+const u8 acpi_gbl_decode_to8bit [8] = {1,2,4,8,16,32,64,128};
-const char *acpi_gbl_db_sleep_states[ACPI_S_STATE_COUNT] = {
+const char *acpi_gbl_db_sleep_states[ACPI_S_STATE_COUNT] = {
"\\_S0_",
"\\_S1_",
"\\_S2_",
@@ -179,7 +179,7 @@ const char *acpi_gbl_db_sleep_states[ACPI_S_STATE_COUNT] = {
* during the initialization sequence.
*/
-const acpi_predefined_names acpi_gbl_pre_defined_names[] =
+const struct acpi_predefined_names acpi_gbl_pre_defined_names[] =
{ {"_GPE", ACPI_TYPE_LOCAL_SCOPE, NULL},
{"_PR_", ACPI_TYPE_LOCAL_SCOPE, NULL},
{"_SB_", ACPI_TYPE_DEVICE, NULL},
@@ -201,7 +201,7 @@ const acpi_predefined_names acpi_gbl_pre_defined_names[] =
* The table is indexed by values of acpi_object_type
*/
-const u8 acpi_gbl_ns_properties[] =
+const u8 acpi_gbl_ns_properties[] =
{
ACPI_NS_NORMAL, /* 00 Any */
ACPI_NS_NORMAL, /* 01 Number */
@@ -238,7 +238,7 @@ const u8 acpi_gbl_ns_properties[] =
/* Hex to ASCII conversion table */
-static const char acpi_gbl_hex_to_ascii[] =
+static const char acpi_gbl_hex_to_ascii[] =
{'0','1','2','3','4','5','6','7',
'8','9','A','B','C','D','E','F'};
@@ -258,8 +258,8 @@ static const char acpi_gbl_hex_to_ascii[] =
char
acpi_ut_hex_to_ascii_char (
- acpi_integer integer,
- u32 position)
+ acpi_integer integer,
+ u32 position)
{
return (acpi_gbl_hex_to_ascii[(integer >> position) & 0xF]);
@@ -280,10 +280,10 @@ acpi_ut_hex_to_ascii_char (
******************************************************************************/
-acpi_table_desc acpi_gbl_acpi_tables[NUM_ACPI_TABLES];
+struct acpi_table_desc acpi_gbl_acpi_tables[NUM_ACPI_TABLES];
-ACPI_TABLE_SUPPORT acpi_gbl_acpi_table_data[NUM_ACPI_TABLES] =
+struct acpi_table_support acpi_gbl_acpi_table_data[NUM_ACPI_TABLES] =
{
/*********** Name, Signature, Global typed pointer Signature size, Type How many allowed?, Contains valid AML? */
@@ -303,7 +303,7 @@ ACPI_TABLE_SUPPORT acpi_gbl_acpi_table_data[NUM_ACPI_TABLES] =
*
******************************************************************************/
-acpi_bit_register_info acpi_gbl_bit_register_info[ACPI_NUM_BITREG] =
+struct acpi_bit_register_info acpi_gbl_bit_register_info[ACPI_NUM_BITREG] =
{
/* Name Parent Register Register Bit Position Register Bit Mask */
@@ -333,7 +333,7 @@ acpi_bit_register_info acpi_gbl_bit_register_info[ACPI_NUM_BITREG] =
};
-acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS] =
+struct acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS] =
{
/* ACPI_EVENT_PMTIMER */ {ACPI_BITREG_TIMER_STATUS, ACPI_BITREG_TIMER_ENABLE, ACPI_BITMASK_TIMER_STATUS, ACPI_BITMASK_TIMER_ENABLE},
/* ACPI_EVENT_GLOBAL */ {ACPI_BITREG_GLOBAL_LOCK_STATUS, ACPI_BITREG_GLOBAL_LOCK_ENABLE, ACPI_BITMASK_GLOBAL_LOCK_STATUS, ACPI_BITMASK_GLOBAL_LOCK_ENABLE},
@@ -356,7 +356,7 @@ acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS] =
/* Region type decoding */
-const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] =
+const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] =
{
"system_memory",
"system_iO",
@@ -371,7 +371,7 @@ const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] =
char *
acpi_ut_get_region_name (
- u8 space_id)
+ u8 space_id)
{
if (space_id >= ACPI_USER_REGION_BEGIN)
@@ -402,7 +402,7 @@ acpi_ut_get_region_name (
/* Event type decoding */
-static const char *acpi_gbl_event_types[ACPI_NUM_FIXED_EVENTS] =
+static const char *acpi_gbl_event_types[ACPI_NUM_FIXED_EVENTS] =
{
"PM_Timer",
"global_lock",
@@ -414,7 +414,7 @@ static const char *acpi_gbl_event_types[ACPI_NUM_FIXED_EVENTS] =
char *
acpi_ut_get_event_name (
- u32 event_id)
+ u32 event_id)
{
if (event_id > ACPI_EVENT_MAX)
@@ -447,10 +447,10 @@ acpi_ut_get_event_name (
* indicatewhat type is actually going to be stored for this entry.
*/
-static const char acpi_gbl_bad_type[] = "UNDEFINED";
+static const char acpi_gbl_bad_type[] = "UNDEFINED";
#define TYPE_NAME_LENGTH 12 /* Maximum length of each string */
-static const char *acpi_gbl_ns_type_names[] = /* printable names of ACPI types */
+static const char *acpi_gbl_ns_type_names[] = /* printable names of ACPI types */
{
/* 00 */ "Untyped",
/* 01 */ "Integer",
@@ -487,7 +487,7 @@ static const char *acpi_gbl_ns_type_names[] = /* printable names of AC
char *
acpi_ut_get_type_name (
- acpi_object_type type)
+ acpi_object_type type)
{
if (type > ACPI_TYPE_INVALID)
@@ -501,7 +501,7 @@ acpi_ut_get_type_name (
char *
acpi_ut_get_object_type_name (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
if (!obj_desc)
@@ -534,7 +534,7 @@ acpi_ut_get_object_type_name (
char *
acpi_ut_get_mutex_name (
- u32 mutex_id)
+ u32 mutex_id)
{
if (mutex_id > MAX_MTX)
@@ -563,7 +563,7 @@ acpi_ut_get_mutex_name (
u8
acpi_ut_valid_object_type (
- acpi_object_type type)
+ acpi_object_type type)
{
if (type > ACPI_TYPE_LOCAL_MAX)
@@ -589,9 +589,9 @@ acpi_ut_valid_object_type (
acpi_owner_id
acpi_ut_allocate_owner_id (
- u32 id_type)
+ u32 id_type)
{
- acpi_owner_id owner_id = 0xFFFF;
+ acpi_owner_id owner_id = 0xFFFF;
ACPI_FUNCTION_TRACE ("ut_allocate_owner_id");
@@ -651,27 +651,27 @@ void
acpi_ut_init_globals (
void)
{
- u32 i;
+ u32 i;
ACPI_FUNCTION_TRACE ("ut_init_globals");
/* Memory allocation and cache lists */
- ACPI_MEMSET (acpi_gbl_memory_lists, 0, sizeof (acpi_memory_list) * ACPI_NUM_MEM_LISTS);
+ ACPI_MEMSET (acpi_gbl_memory_lists, 0, sizeof (struct acpi_memory_list) * ACPI_NUM_MEM_LISTS);
- acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].link_offset = (u16) ACPI_PTR_DIFF (&(((acpi_generic_state *) NULL)->common.next), NULL);
- acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].link_offset = (u16) ACPI_PTR_DIFF (&(((acpi_parse_object *) NULL)->common.next), NULL);
- acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].link_offset = (u16) ACPI_PTR_DIFF (&(((acpi_parse_object *) NULL)->common.next), NULL);
- acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].link_offset = (u16) ACPI_PTR_DIFF (&(((acpi_operand_object *) NULL)->cache.next), NULL);
- acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].link_offset = (u16) ACPI_PTR_DIFF (&(((acpi_walk_state *) NULL)->next), NULL);
+ acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].link_offset = (u16) ACPI_PTR_DIFF (&(((union acpi_generic_state *) NULL)->common.next), NULL);
+ acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].link_offset = (u16) ACPI_PTR_DIFF (&(((union acpi_parse_object *) NULL)->common.next), NULL);
+ acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].link_offset = (u16) ACPI_PTR_DIFF (&(((union acpi_parse_object *) NULL)->common.next), NULL);
+ acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].link_offset = (u16) ACPI_PTR_DIFF (&(((union acpi_operand_object *) NULL)->cache.next), NULL);
+ acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].link_offset = (u16) ACPI_PTR_DIFF (&(((struct acpi_walk_state *) NULL)->next), NULL);
- acpi_gbl_memory_lists[ACPI_MEM_LIST_NSNODE].object_size = sizeof (acpi_namespace_node);
- acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].object_size = sizeof (acpi_generic_state);
- acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].object_size = sizeof (acpi_parse_obj_common);
- acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].object_size = sizeof (acpi_parse_obj_named);
- acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].object_size = sizeof (acpi_operand_object);
- acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].object_size = sizeof (acpi_walk_state);
+ acpi_gbl_memory_lists[ACPI_MEM_LIST_NSNODE].object_size = sizeof (struct acpi_namespace_node);
+ acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].object_size = sizeof (union acpi_generic_state);
+ acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].object_size = sizeof (struct acpi_parse_obj_common);
+ acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].object_size = sizeof (struct acpi_parse_obj_named);
+ acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].object_size = sizeof (union acpi_operand_object);
+ acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].object_size = sizeof (struct acpi_walk_state);
acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].max_cache_depth = ACPI_MAX_STATE_CACHE_DEPTH;
acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].max_cache_depth = ACPI_MAX_PARSE_CACHE_DEPTH;
diff --git a/drivers/acpi/utilities/utinit.c b/drivers/acpi/utilities/utinit.c
index def29800cf5e..a5f6e2d1eb26 100644
--- a/drivers/acpi/utilities/utinit.c
+++ b/drivers/acpi/utilities/utinit.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -48,9 +48,9 @@
static void
acpi_ut_fadt_register_error (
- char *register_name,
- u32 value,
- acpi_size offset)
+ char *register_name,
+ u32 value,
+ acpi_size offset)
{
ACPI_REPORT_WARNING (
diff --git a/drivers/acpi/utilities/utmath.c b/drivers/acpi/utilities/utmath.c
index aff2c6b1c21f..35fd17db38c9 100644
--- a/drivers/acpi/utilities/utmath.c
+++ b/drivers/acpi/utilities/utmath.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -55,14 +55,14 @@
acpi_status
acpi_ut_short_divide (
- acpi_integer *in_dividend,
- u32 divisor,
- acpi_integer *out_quotient,
- u32 *out_remainder)
+ acpi_integer *in_dividend,
+ u32 divisor,
+ acpi_integer *out_quotient,
+ u32 *out_remainder)
{
- uint64_overlay dividend;
- uint64_overlay quotient;
- u32 remainder32;
+ union uint64_overlay dividend;
+ union uint64_overlay quotient;
+ u32 remainder32;
ACPI_FUNCTION_TRACE ("ut_short_divide");
@@ -115,20 +115,20 @@ acpi_ut_short_divide (
acpi_status
acpi_ut_divide (
- acpi_integer *in_dividend,
- acpi_integer *in_divisor,
- acpi_integer *out_quotient,
- acpi_integer *out_remainder)
+ acpi_integer *in_dividend,
+ acpi_integer *in_divisor,
+ acpi_integer *out_quotient,
+ acpi_integer *out_remainder)
{
- uint64_overlay dividend;
- uint64_overlay divisor;
- uint64_overlay quotient;
- uint64_overlay remainder;
- uint64_overlay normalized_dividend;
- uint64_overlay normalized_divisor;
- u32 partial1;
- uint64_overlay partial2;
- uint64_overlay partial3;
+ union uint64_overlay dividend;
+ union uint64_overlay divisor;
+ union uint64_overlay quotient;
+ union uint64_overlay remainder;
+ union uint64_overlay normalized_dividend;
+ union uint64_overlay normalized_divisor;
+ u32 partial1;
+ union uint64_overlay partial2;
+ union uint64_overlay partial3;
ACPI_FUNCTION_TRACE ("ut_divide");
@@ -250,10 +250,10 @@ acpi_ut_divide (
acpi_status
acpi_ut_short_divide (
- acpi_integer *in_dividend,
- u32 divisor,
- acpi_integer *out_quotient,
- u32 *out_remainder)
+ acpi_integer *in_dividend,
+ u32 divisor,
+ acpi_integer *out_quotient,
+ u32 *out_remainder)
{
ACPI_FUNCTION_TRACE ("ut_short_divide");
@@ -280,10 +280,10 @@ acpi_ut_short_divide (
acpi_status
acpi_ut_divide (
- acpi_integer *in_dividend,
- acpi_integer *in_divisor,
- acpi_integer *out_quotient,
- acpi_integer *out_remainder)
+ acpi_integer *in_dividend,
+ acpi_integer *in_divisor,
+ acpi_integer *out_quotient,
+ acpi_integer *out_remainder)
{
ACPI_FUNCTION_TRACE ("ut_divide");
diff --git a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c
index 003aa4b03f8d..70a1efc76a65 100644
--- a/drivers/acpi/utilities/utmisc.c
+++ b/drivers/acpi/utilities/utmisc.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -46,10 +46,10 @@
void
acpi_ut_print_string (
- char *string,
- u8 max_length)
+ char *string,
+ u8 max_length)
{
- u32 i;
+ u32 i;
if (!string) {
@@ -135,16 +135,16 @@ acpi_ut_print_string (
u32
acpi_ut_dword_byte_swap (
- u32 value)
+ u32 value)
{
union {
- u32 value;
- u8 bytes[4];
+ u32 value;
+ u8 bytes[4];
} out;
union {
- u32 value;
- u8 bytes[4];
+ u32 value;
+ u8 bytes[4];
} in;
@@ -179,7 +179,7 @@ acpi_ut_dword_byte_swap (
void
acpi_ut_set_integer_width (
- u8 revision)
+ u8 revision)
{
if (revision <= 1) {
@@ -210,12 +210,12 @@ acpi_ut_set_integer_width (
void
acpi_ut_display_init_pathname (
- u8 type,
- acpi_namespace_node *obj_handle,
- char *path)
+ u8 type,
+ struct acpi_namespace_node *obj_handle,
+ char *path)
{
- acpi_status status;
- acpi_buffer buffer;
+ acpi_status status;
+ struct acpi_buffer buffer;
ACPI_FUNCTION_ENTRY ();
@@ -280,10 +280,10 @@ acpi_ut_display_init_pathname (
u8
acpi_ut_valid_acpi_name (
- u32 name)
+ u32 name)
{
- char *name_ptr = (char *) &name;
- u32 i;
+ char *name_ptr = (char *) &name;
+ u32 i;
ACPI_FUNCTION_ENTRY ();
@@ -315,7 +315,7 @@ acpi_ut_valid_acpi_name (
u8
acpi_ut_valid_acpi_character (
- char character)
+ char character)
{
ACPI_FUNCTION_ENTRY ();
@@ -344,15 +344,15 @@ acpi_ut_valid_acpi_character (
acpi_status
acpi_ut_strtoul64 (
- char *string,
- u32 base,
- acpi_integer *ret_integer)
+ char *string,
+ u32 base,
+ acpi_integer *ret_integer)
{
- u32 index;
- acpi_integer return_value = 0;
- acpi_status status = AE_OK;
- acpi_integer dividend;
- acpi_integer quotient;
+ u32 index;
+ acpi_integer return_value = 0;
+ acpi_status status = AE_OK;
+ acpi_integer dividend;
+ acpi_integer quotient;
*ret_integer = 0;
@@ -486,9 +486,9 @@ error_exit:
char *
acpi_ut_strupr (
- char *src_string)
+ char *src_string)
{
- char *string;
+ char *string;
ACPI_FUNCTION_ENTRY ();
@@ -520,8 +520,8 @@ acpi_status
acpi_ut_mutex_initialize (
void)
{
- u32 i;
- acpi_status status;
+ u32 i;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("ut_mutex_initialize");
@@ -557,7 +557,7 @@ void
acpi_ut_mutex_terminate (
void)
{
- u32 i;
+ u32 i;
ACPI_FUNCTION_TRACE ("ut_mutex_terminate");
@@ -588,9 +588,9 @@ acpi_ut_mutex_terminate (
acpi_status
acpi_ut_create_mutex (
- acpi_mutex_handle mutex_id)
+ acpi_mutex_handle mutex_id)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_U32 ("ut_create_mutex", mutex_id);
@@ -625,9 +625,9 @@ acpi_ut_create_mutex (
acpi_status
acpi_ut_delete_mutex (
- acpi_mutex_handle mutex_id)
+ acpi_mutex_handle mutex_id)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE_U32 ("ut_delete_mutex", mutex_id);
@@ -660,11 +660,11 @@ acpi_ut_delete_mutex (
acpi_status
acpi_ut_acquire_mutex (
- acpi_mutex_handle mutex_id)
+ acpi_mutex_handle mutex_id)
{
- acpi_status status;
- u32 i;
- u32 this_thread_id;
+ acpi_status status;
+ u32 i;
+ u32 this_thread_id;
ACPI_FUNCTION_NAME ("ut_acquire_mutex");
@@ -738,11 +738,11 @@ acpi_ut_acquire_mutex (
acpi_status
acpi_ut_release_mutex (
- acpi_mutex_handle mutex_id)
+ acpi_mutex_handle mutex_id)
{
- acpi_status status;
- u32 i;
- u32 this_thread_id;
+ acpi_status status;
+ u32 i;
+ u32 this_thread_id;
ACPI_FUNCTION_NAME ("ut_release_mutex");
@@ -824,11 +824,11 @@ acpi_ut_release_mutex (
acpi_status
acpi_ut_create_update_state_and_push (
- acpi_operand_object *object,
- u16 action,
- acpi_generic_state **state_list)
+ union acpi_operand_object *object,
+ u16 action,
+ union acpi_generic_state **state_list)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_ENTRY ();
@@ -866,12 +866,12 @@ acpi_ut_create_update_state_and_push (
acpi_status
acpi_ut_create_pkg_state_and_push (
- void *internal_object,
- void *external_object,
- u16 index,
- acpi_generic_state **state_list)
+ void *internal_object,
+ void *external_object,
+ u16 index,
+ union acpi_generic_state **state_list)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_ENTRY ();
@@ -902,8 +902,8 @@ acpi_ut_create_pkg_state_and_push (
void
acpi_ut_push_generic_state (
- acpi_generic_state **list_head,
- acpi_generic_state *state)
+ union acpi_generic_state **list_head,
+ union acpi_generic_state *state)
{
ACPI_FUNCTION_TRACE ("ut_push_generic_state");
@@ -929,11 +929,11 @@ acpi_ut_push_generic_state (
*
******************************************************************************/
-acpi_generic_state *
+union acpi_generic_state *
acpi_ut_pop_generic_state (
- acpi_generic_state **list_head)
+ union acpi_generic_state **list_head)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_TRACE ("ut_pop_generic_state");
@@ -965,10 +965,10 @@ acpi_ut_pop_generic_state (
*
******************************************************************************/
-acpi_generic_state *
+union acpi_generic_state *
acpi_ut_create_generic_state (void)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_ENTRY ();
@@ -999,11 +999,11 @@ acpi_ut_create_generic_state (void)
*
******************************************************************************/
-acpi_thread_state *
+struct acpi_thread_state *
acpi_ut_create_thread_state (
void)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_TRACE ("ut_create_thread_state");
@@ -1021,7 +1021,7 @@ acpi_ut_create_thread_state (
state->common.data_type = ACPI_DESC_TYPE_STATE_THREAD;
state->thread.thread_id = acpi_os_get_thread_id ();
- return_PTR ((acpi_thread_state *) state);
+ return_PTR ((struct acpi_thread_state *) state);
}
@@ -1041,12 +1041,12 @@ acpi_ut_create_thread_state (
*
******************************************************************************/
-acpi_generic_state *
+union acpi_generic_state *
acpi_ut_create_update_state (
- acpi_operand_object *object,
- u16 action)
+ union acpi_operand_object *object,
+ u16 action)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_TRACE_PTR ("ut_create_update_state", object);
@@ -1083,13 +1083,13 @@ acpi_ut_create_update_state (
*
******************************************************************************/
-acpi_generic_state *
+union acpi_generic_state *
acpi_ut_create_pkg_state (
- void *internal_object,
- void *external_object,
- u16 index)
+ void *internal_object,
+ void *external_object,
+ u16 index)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_TRACE_PTR ("ut_create_pkg_state", internal_object);
@@ -1105,7 +1105,7 @@ acpi_ut_create_pkg_state (
/* Init fields specific to the update struct */
state->common.data_type = ACPI_DESC_TYPE_STATE_PACKAGE;
- state->pkg.source_object = (acpi_operand_object *) internal_object;
+ state->pkg.source_object = (union acpi_operand_object *) internal_object;
state->pkg.dest_object = external_object;
state->pkg.index = index;
state->pkg.num_packages = 1;
@@ -1127,11 +1127,11 @@ acpi_ut_create_pkg_state (
*
******************************************************************************/
-acpi_generic_state *
+union acpi_generic_state *
acpi_ut_create_control_state (
void)
{
- acpi_generic_state *state;
+ union acpi_generic_state *state;
ACPI_FUNCTION_TRACE ("ut_create_control_state");
@@ -1168,7 +1168,7 @@ acpi_ut_create_control_state (
void
acpi_ut_delete_generic_state (
- acpi_generic_state *state)
+ union acpi_generic_state *state)
{
ACPI_FUNCTION_TRACE ("ut_delete_generic_state");
@@ -1217,16 +1217,16 @@ acpi_ut_delete_generic_state_cache (
acpi_status
acpi_ut_walk_package_tree (
- acpi_operand_object *source_object,
- void *target_object,
- acpi_pkg_callback walk_callback,
- void *context)
+ union acpi_operand_object *source_object,
+ void *target_object,
+ acpi_pkg_callback walk_callback,
+ void *context)
{
- acpi_status status = AE_OK;
- acpi_generic_state *state_list = NULL;
- acpi_generic_state *state;
- u32 this_index;
- acpi_operand_object *this_source_obj;
+ acpi_status status = AE_OK;
+ union acpi_generic_state *state_list = NULL;
+ union acpi_generic_state *state;
+ u32 this_index;
+ union acpi_operand_object *this_source_obj;
ACPI_FUNCTION_TRACE ("ut_walk_package_tree");
@@ -1241,7 +1241,7 @@ acpi_ut_walk_package_tree (
/* Get one element of the package */
this_index = state->pkg.index;
- this_source_obj = (acpi_operand_object *)
+ this_source_obj = (union acpi_operand_object *)
state->pkg.source_object->package.elements[this_index];
/*
@@ -1334,11 +1334,11 @@ acpi_ut_walk_package_tree (
u8
acpi_ut_generate_checksum (
- u8 *buffer,
- u32 length)
+ u8 *buffer,
+ u32 length)
{
- u32 i;
- signed char sum = 0;
+ u32 i;
+ signed char sum = 0;
for (i = 0; i < length; i++) {
@@ -1364,11 +1364,11 @@ acpi_ut_generate_checksum (
u8 *
acpi_ut_get_resource_end_tag (
- acpi_operand_object *obj_desc)
+ union acpi_operand_object *obj_desc)
{
- u8 buffer_byte;
- u8 *buffer;
- u8 *end_buffer;
+ u8 buffer_byte;
+ u8 *buffer;
+ u8 *end_buffer;
buffer = obj_desc->buffer.pointer;
@@ -1419,9 +1419,9 @@ acpi_ut_get_resource_end_tag (
void
acpi_ut_report_error (
- char *module_name,
- u32 line_number,
- u32 component_id)
+ char *module_name,
+ u32 line_number,
+ u32 component_id)
{
@@ -1446,9 +1446,9 @@ acpi_ut_report_error (
void
acpi_ut_report_warning (
- char *module_name,
- u32 line_number,
- u32 component_id)
+ char *module_name,
+ u32 line_number,
+ u32 component_id)
{
acpi_os_printf ("%8s-%04d: *** Warning: ", module_name, line_number);
@@ -1472,9 +1472,9 @@ acpi_ut_report_warning (
void
acpi_ut_report_info (
- char *module_name,
- u32 line_number,
- u32 component_id)
+ char *module_name,
+ u32 line_number,
+ u32 component_id)
{
acpi_os_printf ("%8s-%04d: *** Info: ", module_name, line_number);
diff --git a/drivers/acpi/utilities/utobject.c b/drivers/acpi/utilities/utobject.c
index dab3f6a0e584..52f767ea1264 100644
--- a/drivers/acpi/utilities/utobject.c
+++ b/drivers/acpi/utilities/utobject.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -53,15 +53,15 @@
*
******************************************************************************/
-acpi_operand_object *
+union acpi_operand_object *
acpi_ut_create_internal_object_dbg (
- char *module_name,
- u32 line_number,
- u32 component_id,
- acpi_object_type type)
+ char *module_name,
+ u32 line_number,
+ u32 component_id,
+ acpi_object_type type)
{
- acpi_operand_object *object;
- acpi_operand_object *second_object;
+ union acpi_operand_object *object;
+ union acpi_operand_object *second_object;
ACPI_FUNCTION_TRACE_STR ("ut_create_internal_object_dbg", acpi_ut_get_type_name (type));
@@ -125,12 +125,12 @@ acpi_ut_create_internal_object_dbg (
*
******************************************************************************/
-acpi_operand_object *
+union acpi_operand_object *
acpi_ut_create_buffer_object (
- acpi_size buffer_size)
+ acpi_size buffer_size)
{
- acpi_operand_object *buffer_desc;
- u8 *buffer;
+ union acpi_operand_object *buffer_desc;
+ u8 *buffer;
ACPI_FUNCTION_TRACE_U32 ("ut_create_buffer_object", buffer_size);
@@ -172,13 +172,13 @@ acpi_ut_create_buffer_object (
*
* PARAMETERS: Object - Object to be validated
*
- * RETURN: Validate a pointer to be an acpi_operand_object
+ * RETURN: Validate a pointer to be an union acpi_operand_object
*
******************************************************************************/
u8
acpi_ut_valid_internal_object (
- void *object)
+ void *object)
{
ACPI_FUNCTION_NAME ("ut_valid_internal_object");
@@ -196,7 +196,7 @@ acpi_ut_valid_internal_object (
switch (ACPI_GET_DESCRIPTOR_TYPE (object)) {
case ACPI_DESC_TYPE_OPERAND:
- /* The object appears to be a valid acpi_operand_object */
+ /* The object appears to be a valid union acpi_operand_object */
return (TRUE);
@@ -247,11 +247,11 @@ acpi_ut_valid_internal_object (
void *
acpi_ut_allocate_object_desc_dbg (
- char *module_name,
- u32 line_number,
- u32 component_id)
+ char *module_name,
+ u32 line_number,
+ u32 component_id)
{
- acpi_operand_object *object;
+ union acpi_operand_object *object;
ACPI_FUNCTION_TRACE ("ut_allocate_object_desc_dbg");
@@ -270,7 +270,7 @@ acpi_ut_allocate_object_desc_dbg (
ACPI_SET_DESCRIPTOR_TYPE (object, ACPI_DESC_TYPE_OPERAND);
ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "%p Size %X\n",
- object, (u32) sizeof (acpi_operand_object)));
+ object, (u32) sizeof (union acpi_operand_object)));
return_PTR (object);
}
@@ -290,12 +290,12 @@ acpi_ut_allocate_object_desc_dbg (
void
acpi_ut_delete_object_desc (
- acpi_operand_object *object)
+ union acpi_operand_object *object)
{
ACPI_FUNCTION_TRACE_PTR ("ut_delete_object_desc", object);
- /* Object must be an acpi_operand_object */
+ /* Object must be an union acpi_operand_object */
if (ACPI_GET_DESCRIPTOR_TYPE (object) != ACPI_DESC_TYPE_OPERAND) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
@@ -353,11 +353,11 @@ acpi_ut_delete_object_cache (
acpi_status
acpi_ut_get_simple_object_size (
- acpi_operand_object *internal_object,
- acpi_size *obj_length)
+ union acpi_operand_object *internal_object,
+ acpi_size *obj_length)
{
- acpi_size length;
- acpi_status status = AE_OK;
+ acpi_size length;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_PTR ("ut_get_simple_object_size", internal_object);
@@ -372,7 +372,7 @@ acpi_ut_get_simple_object_size (
/* Start with the length of the Acpi object */
- length = sizeof (acpi_object);
+ length = sizeof (union acpi_object);
if (ACPI_GET_DESCRIPTOR_TYPE (internal_object) == ACPI_DESC_TYPE_NAMED) {
/* Object is a named object (reference), just return the length */
@@ -471,14 +471,14 @@ acpi_ut_get_simple_object_size (
acpi_status
acpi_ut_get_element_length (
- u8 object_type,
- acpi_operand_object *source_object,
- acpi_generic_state *state,
- void *context)
+ u8 object_type,
+ union acpi_operand_object *source_object,
+ union acpi_generic_state *state,
+ void *context)
{
- acpi_status status = AE_OK;
- acpi_pkg_info *info = (acpi_pkg_info *) context;
- acpi_size object_space;
+ acpi_status status = AE_OK;
+ struct acpi_pkg_info *info = (struct acpi_pkg_info *) context;
+ acpi_size object_space;
switch (object_type) {
@@ -536,11 +536,11 @@ acpi_ut_get_element_length (
acpi_status
acpi_ut_get_package_object_size (
- acpi_operand_object *internal_object,
- acpi_size *obj_length)
+ union acpi_operand_object *internal_object,
+ acpi_size *obj_length)
{
- acpi_status status;
- acpi_pkg_info info;
+ acpi_status status;
+ struct acpi_pkg_info info;
ACPI_FUNCTION_TRACE_PTR ("ut_get_package_object_size", internal_object);
@@ -561,7 +561,7 @@ acpi_ut_get_package_object_size (
* just add the length of the package objects themselves.
* Round up to the next machine word.
*/
- info.length += ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (acpi_object)) *
+ info.length += ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object)) *
(acpi_size) info.num_packages;
/* Return the total package length */
@@ -587,10 +587,10 @@ acpi_ut_get_package_object_size (
acpi_status
acpi_ut_get_object_size(
- acpi_operand_object *internal_object,
- acpi_size *obj_length)
+ union acpi_operand_object *internal_object,
+ acpi_size *obj_length)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_ENTRY ();
diff --git a/drivers/acpi/utilities/utxface.c b/drivers/acpi/utilities/utxface.c
index 04d20ca06988..07096a391e2a 100644
--- a/drivers/acpi/utilities/utxface.c
+++ b/drivers/acpi/utilities/utxface.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2002, R. Byron Moore
+ * Copyright (C) 2000 - 2003, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -51,7 +51,7 @@ acpi_status
acpi_initialize_subsystem (
void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_initialize_subsystem");
@@ -117,9 +117,9 @@ acpi_initialize_subsystem (
acpi_status
acpi_enable_subsystem (
- u32 flags)
+ u32 flags)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("acpi_enable_subsystem");
@@ -211,9 +211,9 @@ acpi_enable_subsystem (
acpi_status
acpi_initialize_objects (
- u32 flags)
+ u32 flags)
{
- acpi_status status = AE_OK;
+ acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("acpi_initialize_objects");
@@ -272,7 +272,7 @@ acpi_initialize_objects (
acpi_status
acpi_terminate (void)
{
- acpi_status status;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_terminate");
@@ -353,11 +353,11 @@ acpi_subsystem_status (void)
acpi_status
acpi_get_system_info (
- acpi_buffer *out_buffer)
+ struct acpi_buffer *out_buffer)
{
- acpi_system_info *info_ptr;
- u32 i;
- acpi_status status;
+ struct acpi_system_info *info_ptr;
+ u32 i;
+ acpi_status status;
ACPI_FUNCTION_TRACE ("acpi_get_system_info");
@@ -372,7 +372,7 @@ acpi_get_system_info (
/* Validate/Allocate/Clear caller buffer */
- status = acpi_ut_initialize_buffer (out_buffer, sizeof (acpi_system_info));
+ status = acpi_ut_initialize_buffer (out_buffer, sizeof (struct acpi_system_info));
if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status);
}
@@ -380,7 +380,7 @@ acpi_get_system_info (
/*
* Populate the return buffer
*/
- info_ptr = (acpi_system_info *) out_buffer->pointer;
+ info_ptr = (struct acpi_system_info *) out_buffer->pointer;
info_ptr->acpi_ca_version = ACPI_CA_VERSION;
@@ -437,8 +437,8 @@ acpi_get_system_info (
acpi_status
acpi_install_initialization_handler (
- acpi_init_handler handler,
- u32 function)
+ acpi_init_handler handler,
+ u32 function)
{
if (!handler) {
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 29e1f2b88268..9966a6fa4ea6 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -42,7 +42,7 @@ ACPI_MODULE_NAME ("acpi_utils")
#ifdef ACPI_DEBUG_OUTPUT
#define acpi_util_eval_error(h,p,s) {\
char prefix[80] = {'\0'};\
- acpi_buffer buffer = {sizeof(prefix), prefix};\
+ struct acpi_buffer buffer = {sizeof(prefix), prefix};\
acpi_get_name(h, ACPI_FULL_PATHNAME, &buffer);\
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Evaluate [%s.%s]: %s\n",\
(char *) prefix, p, acpi_format_exception(s))); }
@@ -53,9 +53,9 @@ ACPI_MODULE_NAME ("acpi_utils")
acpi_status
acpi_extract_package (
- acpi_object *package,
- acpi_buffer *format,
- acpi_buffer *buffer)
+ union acpi_object *package,
+ struct acpi_buffer *format,
+ struct acpi_buffer *buffer)
{
u32 size_required = 0;
u32 tail_offset = 0;
@@ -95,7 +95,7 @@ acpi_extract_package (
*/
for (i=0; i<format_count; i++) {
- acpi_object *element = &(package->package.elements[i]);
+ union acpi_object *element = &(package->package.elements[i]);
if (!element) {
return_ACPI_STATUS(AE_BAD_DATA);
@@ -167,7 +167,7 @@ acpi_extract_package (
for (i=0; i<format_count; i++) {
u8 **pointer = NULL;
- acpi_object *element = &(package->package.elements[i]);
+ union acpi_object *element = &(package->package.elements[i]);
if (!element) {
return_ACPI_STATUS(AE_BAD_DATA);
@@ -239,12 +239,12 @@ acpi_status
acpi_evaluate_integer (
acpi_handle handle,
acpi_string pathname,
- acpi_object_list *arguments,
+ struct acpi_object_list *arguments,
unsigned long *data)
{
acpi_status status = AE_OK;
- acpi_object element;
- acpi_buffer buffer = {sizeof(acpi_object), &element};
+ union acpi_object element;
+ struct acpi_buffer buffer = {sizeof(union acpi_object), &element};
ACPI_FUNCTION_TRACE("acpi_evaluate_integer");
@@ -324,13 +324,13 @@ acpi_status
acpi_evaluate_reference (
acpi_handle handle,
acpi_string pathname,
- acpi_object_list *arguments,
+ struct acpi_object_list *arguments,
struct acpi_handle_list *list)
{
acpi_status status = AE_OK;
- acpi_object *package = NULL;
- acpi_object *element = NULL;
- acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ union acpi_object *package = NULL;
+ union acpi_object *element = NULL;
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
u32 i = 0;
ACPI_FUNCTION_TRACE("acpi_evaluate_reference");
@@ -345,7 +345,7 @@ acpi_evaluate_reference (
if (ACPI_FAILURE(status))
goto end;
- package = (acpi_object *) buffer.pointer;
+ package = (union acpi_object *) buffer.pointer;
if ((buffer.length == 0) || !package) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
diff --git a/drivers/hotplug/acpiphp_glue.c b/drivers/hotplug/acpiphp_glue.c
index a42c31dde190..6c16481c4102 100644
--- a/drivers/hotplug/acpiphp_glue.c
+++ b/drivers/hotplug/acpiphp_glue.c
@@ -230,11 +230,11 @@ static int detect_ejectable_slots (acpi_handle *bridge_handle)
* TBD: _TRA, etc.
*/
static void
-decode_acpi_resource (acpi_resource *resource, struct acpiphp_bridge *bridge)
+decode_acpi_resource (struct acpi_resource *resource, struct acpiphp_bridge *bridge)
{
- acpi_resource_address16 *address16_data;
- acpi_resource_address32 *address32_data;
- acpi_resource_address64 *address64_data;
+ struct acpi_resource_address16 *address16_data;
+ struct acpi_resource_address32 *address32_data;
+ struct acpi_resource_address64 *address64_data;
struct pci_resource *res;
u32 resource_type, producer_consumer, address_length;
@@ -252,7 +252,7 @@ decode_acpi_resource (acpi_resource *resource, struct acpiphp_bridge *bridge)
switch (resource->id) {
case ACPI_RSTYPE_ADDRESS16:
- address16_data = (acpi_resource_address16 *)&resource->data;
+ address16_data = (struct acpi_resource_address16 *)&resource->data;
resource_type = address16_data->resource_type;
producer_consumer = address16_data->producer_consumer;
min_address_range = address16_data->min_address_range;
@@ -264,7 +264,7 @@ decode_acpi_resource (acpi_resource *resource, struct acpiphp_bridge *bridge)
break;
case ACPI_RSTYPE_ADDRESS32:
- address32_data = (acpi_resource_address32 *)&resource->data;
+ address32_data = (struct acpi_resource_address32 *)&resource->data;
resource_type = address32_data->resource_type;
producer_consumer = address32_data->producer_consumer;
min_address_range = address32_data->min_address_range;
@@ -276,7 +276,7 @@ decode_acpi_resource (acpi_resource *resource, struct acpiphp_bridge *bridge)
break;
case ACPI_RSTYPE_ADDRESS64:
- address64_data = (acpi_resource_address64 *)&resource->data;
+ address64_data = (struct acpi_resource_address64 *)&resource->data;
resource_type = address64_data->resource_type;
producer_consumer = address64_data->producer_consumer;
min_address_range = address64_data->min_address_range;
@@ -296,7 +296,7 @@ decode_acpi_resource (acpi_resource *resource, struct acpiphp_bridge *bridge)
break;
}
- resource = (acpi_resource *)((char*)resource + resource->length);
+ resource = (struct acpi_resource *)((char*)resource + resource->length);
if (found && producer_consumer == ACPI_PRODUCER && address_length > 0) {
switch (resource_type) {
@@ -389,9 +389,9 @@ static struct pci_bus *find_pci_bus(const struct list_head *list, int bus)
static void decode_hpp(struct acpiphp_bridge *bridge)
{
acpi_status status;
- acpi_buffer buffer = { .length = ACPI_ALLOCATE_BUFFER,
- .pointer = NULL};
- acpi_object *package;
+ struct acpi_buffer buffer = { .length = ACPI_ALLOCATE_BUFFER,
+ .pointer = NULL};
+ union acpi_object *package;
int i;
/* default numbers */
@@ -407,7 +407,7 @@ static void decode_hpp(struct acpiphp_bridge *bridge)
return;
}
- package = (acpi_object *) buffer.pointer;
+ package = (union acpi_object *) buffer.pointer;
if (!package || package->type != ACPI_TYPE_PACKAGE ||
package->package.count != 4 || !package->package.elements) {
@@ -476,8 +476,8 @@ static void init_bridge_misc (struct acpiphp_bridge *bridge)
static void add_host_bridge (acpi_handle *handle, int seg, int bus)
{
acpi_status status;
- acpi_buffer buffer = { .length = ACPI_ALLOCATE_BUFFER,
- .pointer = NULL};
+ struct acpi_buffer buffer = { .length = ACPI_ALLOCATE_BUFFER,
+ .pointer = NULL};
struct acpiphp_bridge *bridge;
@@ -772,10 +772,10 @@ static acpi_status
find_host_bridge (acpi_handle handle, u32 lvl, void *context, void **rv)
{
acpi_status status;
- acpi_device_info info;
+ struct acpi_device_info info;
char objname[5];
- acpi_buffer buffer = { .length = sizeof(objname),
- .pointer = objname };
+ struct acpi_buffer buffer = { .length = sizeof(objname),
+ .pointer = objname };
status = acpi_get_object_info(handle, &info);
if (ACPI_FAILURE(status)) {
@@ -837,8 +837,8 @@ static int power_off_slot (struct acpiphp_slot *slot)
acpi_status status;
struct acpiphp_func *func;
struct list_head *l;
- acpi_object_list arg_list;
- acpi_object arg;
+ struct acpi_object_list arg_list;
+ union acpi_object arg;
int retval = 0;
@@ -1069,8 +1069,8 @@ static void handle_hotplug_event_bridge (acpi_handle handle, u32 type, void *con
{
struct acpiphp_bridge *bridge;
char objname[64];
- acpi_buffer buffer = { .length = sizeof(objname),
- .pointer = objname };
+ struct acpi_buffer buffer = { .length = sizeof(objname),
+ .pointer = objname };
bridge = (struct acpiphp_bridge *)context;
@@ -1120,8 +1120,8 @@ static void handle_hotplug_event_func (acpi_handle handle, u32 type, void *conte
{
struct acpiphp_func *func;
char objname[64];
- acpi_buffer buffer = { .length = sizeof(objname),
- .pointer = objname };
+ struct acpi_buffer buffer = { .length = sizeof(objname),
+ .pointer = objname };
acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
diff --git a/drivers/input/mouse/psmouse.c b/drivers/input/mouse/psmouse.c
index 15485a970abd..e50a4814057a 100644
--- a/drivers/input/mouse/psmouse.c
+++ b/drivers/input/mouse/psmouse.c
@@ -192,7 +192,7 @@ static void psmouse_interrupt(struct serio *serio, unsigned char data, unsigned
return;
}
- if (psmouse->pktcnt && time_after(jiffies, psmouse->last + HZ/20)) {
+ if (psmouse->pktcnt && time_after(jiffies, psmouse->last + HZ/2)) {
printk(KERN_WARNING "psmouse.c: Lost synchronization, throwing %d bytes away.\n", psmouse->pktcnt);
psmouse->pktcnt = 0;
}
diff --git a/drivers/serial/21285.c b/drivers/serial/21285.c
index a746b299a56b..67d42083fcd2 100644
--- a/drivers/serial/21285.c
+++ b/drivers/serial/21285.c
@@ -233,12 +233,29 @@ static void serial21285_shutdown(struct uart_port *port)
}
static void
-serial21285_change_speed(struct uart_port *port, unsigned int cflag,
- unsigned int iflag, unsigned int quot)
+serial21285_set_termios(struct uart_port *port, struct termios *termios,
+ struct termios *old)
{
- unsigned int h_lcr;
+ unsigned long flags;
+ unsigned int quot, h_lcr;
+
+ /*
+ * We don't support modem control lines.
+ */
+ termios->c_cflag &= ~(HUPCL | CRTSCTS | CMSPAR);
+ termios->c_cflag |= CLOCAL;
+
+ /*
+ * We don't support BREAK character recognition.
+ */
+ termios->c_iflag &= ~(IGNBRK | BRKINT);
+
+ /*
+ * Ask the core to calculate the divisor for us.
+ */
+ quot = uart_get_divisor(port, termios, old);
- switch (cflag & CSIZE) {
+ switch (termios->c_cflag & CSIZE) {
case CS5:
h_lcr = 0x00;
break;
@@ -253,34 +270,44 @@ serial21285_change_speed(struct uart_port *port, unsigned int cflag,
break;
}
- if (cflag & CSTOPB)
+ if (termios->c_cflag & CSTOPB)
h_lcr |= H_UBRLCR_STOPB;
- if (cflag & PARENB) {
+ if (termios->c_cflag & PARENB) {
h_lcr |= H_UBRLCR_PARENB;
- if (!(cflag & PARODD))
+ if (!(termios->c_cflag & PARODD))
h_lcr |= H_UBRLCR_PAREVN;
}
if (port->fifosize)
h_lcr |= H_UBRLCR_FIFO;
+ spin_lock_irqsave(&port->lock, flags);
+
+ /*
+ * Update the per-port timeout.
+ */
+ uart_update_timeout(port, termios->c_cflag, quot);
+
+ /*
+ * Which character status flags are we interested in?
+ */
port->read_status_mask = RXSTAT_OVERRUN;
- if (iflag & INPCK)
+ if (termios->c_iflag & INPCK)
port->read_status_mask |= RXSTAT_FRAME | RXSTAT_PARITY;
/*
- * Characters to ignore
+ * Which character status flags should we ignore?
*/
port->ignore_status_mask = 0;
- if (iflag & IGNPAR)
+ if (termios->c_iflag & IGNPAR)
port->ignore_status_mask |= RXSTAT_FRAME | RXSTAT_PARITY;
- if (iflag & IGNBRK && iflag & IGNPAR)
+ if (termios->c_iflag & IGNBRK && termios->c_iflag & IGNPAR)
port->ignore_status_mask |= RXSTAT_OVERRUN;
/*
* Ignore all characters if CREAD is not set.
*/
- if ((cflag & CREAD) == 0)
+ if ((termios->c_cflag & CREAD) == 0)
port->ignore_status_mask |= RXSTAT_DUMMY_READ;
quot -= 1;
@@ -290,6 +317,8 @@ serial21285_change_speed(struct uart_port *port, unsigned int cflag,
*CSR_M_UBRLCR = (quot >> 8) & 0x0f;
*CSR_H_UBRLCR = h_lcr;
*CSR_UARTCON = 1;
+
+ spin_unlock_irqrestore(&port->lock, flags);
}
static const char *serial21285_type(struct uart_port *port)
@@ -340,7 +369,7 @@ static struct uart_ops serial21285_ops = {
.break_ctl = serial21285_break_ctl,
.startup = serial21285_startup,
.shutdown = serial21285_shutdown,
- .change_speed = serial21285_change_speed,
+ .set_termios = serial21285_set_termios,
.type = serial21285_type,
.release_port = serial21285_release_port,
.request_port = serial21285_request_port,
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index a1f70113a338..d71cbbfe13e9 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -1174,7 +1174,7 @@ static int serial8250_startup(struct uart_port *port)
/*
* Clear the FIFO buffers and disable them.
- * (they will be reeanbled in change_speed())
+ * (they will be reeanbled in set_termios())
*/
if (uart_config[up->port.type].flags & UART_CLEAR_FIFO) {
serial_outp(up, UART_FCR, UART_FCR_ENABLE_FIFO);
@@ -1241,7 +1241,7 @@ static int serial8250_startup(struct uart_port *port)
/*
* Finally, enable interrupts. Note: Modem status interrupts
- * are set via change_speed(), which will be occuring imminently
+ * are set via set_termios(), which will be occuring imminently
* anyway, so we don't enable them here.
*/
up->ier = UART_IER_RLSI | UART_IER_RDI;
@@ -1319,14 +1319,15 @@ static void serial8250_shutdown(struct uart_port *port)
}
static void
-serial8250_change_speed(struct uart_port *port, unsigned int cflag,
- unsigned int iflag, unsigned int quot)
+serial8250_set_termios(struct uart_port *port, struct termios *termios,
+ struct termios *old)
{
struct uart_8250_port *up = (struct uart_8250_port *)port;
unsigned char cval, fcr = 0;
unsigned long flags;
+ unsigned int quot;
- switch (cflag & CSIZE) {
+ switch (termios->c_cflag & CSIZE) {
case CS5:
cval = 0x00;
break;
@@ -1342,18 +1343,23 @@ serial8250_change_speed(struct uart_port *port, unsigned int cflag,
break;
}
- if (cflag & CSTOPB)
+ if (termios->c_cflag & CSTOPB)
cval |= 0x04;
- if (cflag & PARENB)
+ if (termios->c_cflag & PARENB)
cval |= UART_LCR_PARITY;
- if (!(cflag & PARODD))
+ if (!(termios->c_cflag & PARODD))
cval |= UART_LCR_EPAR;
#ifdef CMSPAR
- if (cflag & CMSPAR)
+ if (termios->c_cflag & CMSPAR)
cval |= UART_LCR_SPAR;
#endif
/*
+ * Ask the core to calculate the divisor for us.
+ */
+ quot = uart_get_divisor(port, termios, old);
+
+ /*
* Work around a bug in the Oxford Semiconductor 952 rev B
* chip which causes it to seriously miscalculate baud rates
* when DLL is 0.
@@ -1375,52 +1381,58 @@ serial8250_change_speed(struct uart_port *port, unsigned int cflag,
if (up->port.type == PORT_16750)
fcr |= UART_FCR7_64BYTE;
+ /*
+ * Ok, we're now changing the port state. Do it with
+ * interrupts disabled.
+ */
+ spin_lock_irqsave(&up->port.lock, flags);
+
+ /*
+ * Update the per-port timeout.
+ */
+ uart_update_timeout(port, termios->c_cflag, quot);
+
up->port.read_status_mask = UART_LSR_OE | UART_LSR_THRE | UART_LSR_DR;
- if (iflag & INPCK)
+ if (termios->c_iflag & INPCK)
up->port.read_status_mask |= UART_LSR_FE | UART_LSR_PE;
- if (iflag & (BRKINT | PARMRK))
+ if (termios->c_iflag & (BRKINT | PARMRK))
up->port.read_status_mask |= UART_LSR_BI;
/*
* Characteres to ignore
*/
up->port.ignore_status_mask = 0;
- if (iflag & IGNPAR)
+ if (termios->c_iflag & IGNPAR)
up->port.ignore_status_mask |= UART_LSR_PE | UART_LSR_FE;
- if (iflag & IGNBRK) {
+ if (termios->c_iflag & IGNBRK) {
up->port.ignore_status_mask |= UART_LSR_BI;
/*
* If we're ignoring parity and break indicators,
* ignore overruns too (for real raw support).
*/
- if (iflag & IGNPAR)
+ if (termios->c_iflag & IGNPAR)
up->port.ignore_status_mask |= UART_LSR_OE;
}
/*
* ignore all characters if CREAD is not set
*/
- if ((cflag & CREAD) == 0)
+ if ((termios->c_cflag & CREAD) == 0)
up->port.ignore_status_mask |= UART_LSR_DR;
/*
- * Ok, we're now changing the port state. Do it with
- * interrupts disabled.
- */
- spin_lock_irqsave(&up->port.lock, flags);
-
- /*
* CTS flow control flag and modem status interrupts
*/
up->ier &= ~UART_IER_MSI;
- if (UART_ENABLE_MS(&up->port, cflag))
+ if (UART_ENABLE_MS(&up->port, termios->c_cflag))
up->ier |= UART_IER_MSI;
serial_out(up, UART_IER, up->ier);
if (uart_config[up->port.type].flags & UART_STARTECH) {
serial_outp(up, UART_LCR, 0xBF);
- serial_outp(up, UART_EFR, cflag & CRTSCTS ? UART_EFR_CTS :0);
+ serial_outp(up, UART_EFR,
+ termios->c_cflag & CRTSCTS ? UART_EFR_CTS :0);
}
serial_outp(up, UART_LCR, cval | UART_LCR_DLAB);/* set DLAB */
serial_outp(up, UART_DLL, quot & 0xff); /* LS of divisor */
@@ -1728,7 +1740,7 @@ static struct uart_ops serial8250_pops = {
.break_ctl = serial8250_break_ctl,
.startup = serial8250_startup,
.shutdown = serial8250_shutdown,
- .change_speed = serial8250_change_speed,
+ .set_termios = serial8250_set_termios,
.pm = serial8250_pm,
.type = serial8250_type,
.release_port = serial8250_release_port,
diff --git a/drivers/serial/amba.c b/drivers/serial/amba.c
index adde27fa69f3..9b04883f2f6b 100644
--- a/drivers/serial/amba.c
+++ b/drivers/serial/amba.c
@@ -403,14 +403,19 @@ static void ambauart_shutdown(struct uart_port *port)
}
static void
-ambauart_change_speed(struct uart_port *port, unsigned int cflag,
- unsigned int iflag, unsigned int quot)
+ambauart_set_termios(struct uart_port *port, struct termios *termios,
+ struct termios *old)
{
unsigned int lcr_h, old_cr;
unsigned long flags;
+ unsigned int quot;
- /* byte size and parity */
- switch (cflag & CSIZE) {
+ /*
+ * Ask the core to calculate the divisor for us.
+ */
+ quot = uart_get_divisor(port, termios, old);
+
+ switch (termios->c_cflag & CSIZE) {
case CS5:
lcr_h = AMBA_UARTLCR_H_WLEN_5;
break;
@@ -424,49 +429,55 @@ ambauart_change_speed(struct uart_port *port, unsigned int cflag,
lcr_h = AMBA_UARTLCR_H_WLEN_8;
break;
}
- if (cflag & CSTOPB)
+ if (termios->c_cflag & CSTOPB)
lcr_h |= AMBA_UARTLCR_H_STP2;
- if (cflag & PARENB) {
+ if (termios->c_cflag & PARENB) {
lcr_h |= AMBA_UARTLCR_H_PEN;
- if (!(cflag & PARODD))
+ if (!(termios->c_cflag & PARODD))
lcr_h |= AMBA_UARTLCR_H_EPS;
}
if (port->fifosize > 1)
lcr_h |= AMBA_UARTLCR_H_FEN;
+ spin_lock_irqsave(&port->lock, flags);
+
+ /*
+ * Update the per-port timeout.
+ */
+ uart_update_timeout(port, termios->c_cflag, quot);
+
port->read_status_mask = AMBA_UARTRSR_OE;
- if (iflag & INPCK)
+ if (termios->c_iflag & INPCK)
port->read_status_mask |= AMBA_UARTRSR_FE | AMBA_UARTRSR_PE;
- if (iflag & (BRKINT | PARMRK))
+ if (termios->c_iflag & (BRKINT | PARMRK))
port->read_status_mask |= AMBA_UARTRSR_BE;
/*
* Characters to ignore
*/
port->ignore_status_mask = 0;
- if (iflag & IGNPAR)
+ if (termios->c_iflag & IGNPAR)
port->ignore_status_mask |= AMBA_UARTRSR_FE | AMBA_UARTRSR_PE;
- if (iflag & IGNBRK) {
+ if (termios->c_iflag & IGNBRK) {
port->ignore_status_mask |= AMBA_UARTRSR_BE;
/*
* If we're ignoring parity and break indicators,
* ignore overruns too (for real raw support).
*/
- if (iflag & IGNPAR)
+ if (termios->c_iflag & IGNPAR)
port->ignore_status_mask |= AMBA_UARTRSR_OE;
}
/*
* Ignore all characters if CREAD is not set.
*/
- if ((cflag & CREAD) == 0)
+ if ((termios->c_cflag & CREAD) == 0)
port->ignore_status_mask |= UART_DUMMY_RSR_RX;
/* first, disable everything */
- spin_lock_irqsave(&port->lock, flags);
old_cr = UART_GET_CR(port) & ~AMBA_UARTCR_MSIE;
- if (UART_ENABLE_MS(port, cflag))
+ if (UART_ENABLE_MS(port, termios->c_cflag))
old_cr |= AMBA_UARTCR_MSIE;
UART_PUT_CR(port, 0);
@@ -546,7 +557,7 @@ static struct uart_ops amba_pops = {
.break_ctl = ambauart_break_ctl,
.startup = ambauart_startup,
.shutdown = ambauart_shutdown,
- .change_speed = ambauart_change_speed,
+ .set_termios = ambauart_set_termios,
.type = ambauart_type,
.release_port = ambauart_release_port,
.request_port = ambauart_request_port,
diff --git a/drivers/serial/anakin.c b/drivers/serial/anakin.c
index 272f35c01d54..1d8902171f74 100644
--- a/drivers/serial/anakin.c
+++ b/drivers/serial/anakin.c
@@ -283,13 +283,36 @@ static void anakin_shutdown(struct uart_port *port)
}
static void
-anakin_change_speed(struct uart_port *port, unsigned int cflag,
- unsigned int iflag, unsigned int quot)
+anakin_set_termios(struct uart_port *port, struct termios *termios,
+ struct termios *old)
{
- unsigned int flags;
+ unsigned long flags;
+ unsigned int quot;
+
+ /*
+ * We don't support parity, stop bits, or anything other
+ * than 8 bits, so clear these termios flags.
+ */
+ termios->c_cflag &= ~(CSIZE | CSTOPB | PARENB | PARODD | CREAD);
+ termios->c_cflag |= CS8;
+
+ /*
+ * We don't appear to support any error conditions either.
+ */
+ termios->c_iflag &= ~(INPCK | IGNPAR | IGNBRK | BRKINT);
+
+ /*
+ * Ask the core to calculate the divisor for us.
+ */
+ quot = uart_get_divisor(port, termios, old);
spin_lock_irqsave(&port->lock, flags);
- while (!(anakin_in(port, 0x10) & TXEMPTY));
+
+ uart_update_timeout(port, termios->c_cflag, quot);
+
+ while (!(anakin_in(port, 0x10) & TXEMPTY))
+ barrier();
+
anakin_out(port, 0x10, (anakin_in(port, 0x10) & ~PRESCALER)
| (quot << 3));
@@ -314,7 +337,7 @@ static struct uart_ops anakin_pops = {
.break_ctl = anakin_break_ctl,
.startup = anakin_startup,
.shutdown = anakin_shutdown,
- .change_speed = anakin_change_speed,
+ .set_termios = anakin_set_termios,
.type = anakin_type,
};
diff --git a/drivers/serial/clps711x.c b/drivers/serial/clps711x.c
index 51c7b660e445..e2bfd6d5e50f 100644
--- a/drivers/serial/clps711x.c
+++ b/drivers/serial/clps711x.c
@@ -317,14 +317,23 @@ static void clps711xuart_shutdown(struct uart_port *port)
}
static void
-clps711xuart_change_speed(struct uart_port *port, unsigned int cflag,
- unsigned int iflag, unsigned int quot)
+clps711xuart_set_termios(struct uart_port *port, struct termios *termios,
+ struct termios *old)
{
- unsigned int ubrlcr;
+ unsigned int ubrlcr, quot;
unsigned long flags;
- /* byte size and parity */
- switch (cflag & CSIZE) {
+ /*
+ * We don't implement CREAD.
+ */
+ termios->c_cflag |= CREAD;
+
+ /*
+ * Ask the core to calculate the divisor for us.
+ */
+ quot = uart_get_divisor(port, termios, old);
+
+ switch (termios->c_cflag & CSIZE) {
case CS5:
ubrlcr = UBRLCR_WRDLEN5;
break;
@@ -338,40 +347,44 @@ clps711xuart_change_speed(struct uart_port *port, unsigned int cflag,
ubrlcr = UBRLCR_WRDLEN8;
break;
}
- if (cflag & CSTOPB)
+ if (termios->c_cflag & CSTOPB)
ubrlcr |= UBRLCR_XSTOP;
- if (cflag & PARENB) {
+ if (termios->c_cflag & PARENB) {
ubrlcr |= UBRLCR_PRTEN;
- if (!(cflag & PARODD))
+ if (!(termios->c_cflag & PARODD))
ubrlcr |= UBRLCR_EVENPRT;
}
if (port->fifosize > 1)
ubrlcr |= UBRLCR_FIFOEN;
+ spin_lock_irqsave(&port->lock, flags);
+
+ /*
+ * Update the per-port timeout.
+ */
+ uart_update_timeout(port, termios->c_cflag, quot);
+
port->read_status_mask = UARTDR_OVERR;
- if (iflag & INPCK)
+ if (termios->c_iflag & INPCK)
port->read_status_mask |= UARTDR_PARERR | UARTDR_FRMERR;
/*
* Characters to ignore
*/
port->ignore_status_mask = 0;
- if (iflag & IGNPAR)
+ if (termios->c_iflag & IGNPAR)
port->ignore_status_mask |= UARTDR_FRMERR | UARTDR_PARERR;
- if (iflag & IGNBRK) {
+ if (termios->c_iflag & IGNBRK) {
/*
* If we're ignoring parity and break indicators,
* ignore overruns to (for real raw support).
*/
- if (iflag & IGNPAR)
+ if (termios->c_iflag & IGNPAR)
port->ignore_status_mask |= UARTDR_OVERR;
}
quot -= 1;
- /* first, disable everything */
- spin_lock_irqsave(&port->lock, flags);
-
clps_writel(ubrlcr | quot, UBRLCR(port));
spin_unlock_irqrestore(&port->lock, flags);
@@ -411,7 +424,7 @@ static struct uart_ops clps711x_pops = {
.break_ctl = clps711xuart_break_ctl,
.startup = clps711xuart_startup,
.shutdown = clps711xuart_shutdown,
- .change_speed = clps711xuart_change_speed,
+ .set_termios = clps711xuart_set_termios,
.type = clps711xuart_type,
.config_port = clps711xuart_config_port,
.release_port = clps711xuart_release_port,
diff --git a/drivers/serial/core.c b/drivers/serial/core.c
index 22d42e3b18e9..4541e7b7be15 100644
--- a/drivers/serial/core.c
+++ b/drivers/serial/core.c
@@ -314,60 +314,72 @@ EXPORT_SYMBOL(uart_update_timeout);
* uart_get_baud_rate - return baud rate for a particular port
* @port: uart_port structure describing the port in question.
* @termios: desired termios settings.
+ * @old: old termios (or NULL)
+ * @min: minimum acceptable baud rate
+ * @max: maximum acceptable baud rate
*
* Decode the termios structure into a numeric baud rate,
* taking account of the magic 38400 baud rate (with spd_*
* flags), and mapping the %B0 rate to 9600 baud.
*/
unsigned int
-uart_get_baud_rate(struct uart_port *port, struct termios *termios)
+uart_get_baud_rate(struct uart_port *port, struct termios *termios,
+ struct termios *old, unsigned int min, unsigned int max)
{
- unsigned int baud = tty_termios_baud_rate(termios);
+ unsigned int try, baud, altbaud = 38400;
+ unsigned int flags = port->flags & UPF_SPD_MASK;
- /*
- * The spd_hi, spd_vhi, spd_shi, spd_warp kludge...
- * Die! Die! Die!
- */
- if (baud == 38400) {
- unsigned int flags = port->flags & UPF_SPD_MASK;
-
- if (flags == UPF_SPD_HI)
- baud = 57600;
- if (flags == UPF_SPD_VHI)
- baud = 115200;
- if (flags == UPF_SPD_SHI)
- baud = 230400;
- if (flags == UPF_SPD_WARP)
- baud = 460800;
- }
+ if (flags == UPF_SPD_HI)
+ altbaud = 57600;
+ if (flags == UPF_SPD_VHI)
+ altbaud = 115200;
+ if (flags == UPF_SPD_SHI)
+ altbaud = 230400;
+ if (flags == UPF_SPD_WARP)
+ altbaud = 460800;
- /*
- * Special case: B0 rate.
- */
- if (baud == 0)
- baud = 9600;
+ for (try = 0; try < 2; try++) {
+ baud = tty_termios_baud_rate(termios);
- return baud;
-}
+ /*
+ * The spd_hi, spd_vhi, spd_shi, spd_warp kludge...
+ * Die! Die! Die!
+ */
+ if (baud == 38400)
+ baud = altbaud;
-EXPORT_SYMBOL(uart_get_baud_rate);
+ /*
+ * Special case: B0 rate.
+ */
+ if (baud == 0)
+ baud = 9600;
-static inline unsigned int
-uart_calculate_quot(struct uart_port *port, unsigned int baud)
-{
- unsigned int quot;
+ if (baud >= min && baud <= max)
+ return baud;
- /*
- * Old custom speed handling.
- */
- if (baud == 38400 && (port->flags & UPF_SPD_MASK) == UPF_SPD_CUST)
- quot = port->custom_divisor;
- else
- quot = port->uartclk / (16 * baud);
+ /*
+ * Oops, the quotient was zero. Try again with
+ * the old baud rate if possible.
+ */
+ termios->c_cflag &= ~CBAUD;
+ if (old) {
+ termios->c_cflag |= old->c_cflag & CBAUD;
+ old = NULL;
+ continue;
+ }
- return quot;
+ /*
+ * As a last resort, if the quotient is zero,
+ * default to 9600 bps
+ */
+ termios->c_cflag |= B9600;
+ }
+
+ return 0;
}
+EXPORT_SYMBOL(uart_get_baud_rate);
+
/**
* uart_get_divisor - return uart clock divisor
* @port: uart_port structure describing the port.
@@ -387,34 +399,18 @@ unsigned int
uart_get_divisor(struct uart_port *port, struct termios *termios,
struct termios *old_termios)
{
- unsigned int quot, try;
-
- for (try = 0; try < 3; try ++) {
- unsigned int baud;
-
- /* Determine divisor based on baud rate */
- baud = uart_get_baud_rate(port, termios);
- quot = uart_calculate_quot(port, baud);
- if (quot)
- return quot;
+ unsigned int quot, baud, max = port->uartclk / 16;
- /*
- * Oops, the quotient was zero. Try again with
- * the old baud rate if possible.
- */
- termios->c_cflag &= ~CBAUD;
- if (old_termios) {
- termios->c_cflag |= old_termios->c_cflag & CBAUD;
- old_termios = NULL;
- continue;
- }
+ /* Determine divisor based on baud rate */
+ baud = uart_get_baud_rate(port, termios, old_termios, 0, max);
- /*
- * As a last resort, if the quotient is zero,
- * default to 9600 bps
- */
- termios->c_cflag |= B9600;
- }
+ /*
+ * Old custom speed handling.
+ */
+ if (baud == 38400 && (port->flags & UPF_SPD_MASK) == UPF_SPD_CUST)
+ quot = port->custom_divisor;
+ else
+ quot = port->uartclk / (16 * baud);
return quot;
}
@@ -427,7 +423,6 @@ uart_change_speed(struct uart_info *info, struct termios *old_termios)
struct tty_struct *tty = info->tty;
struct uart_port *port = info->port;
struct termios *termios;
- unsigned int quot;
/*
* If we have no tty, termios, or the port does not exist,
@@ -451,10 +446,7 @@ uart_change_speed(struct uart_info *info, struct termios *old_termios)
else
info->flags |= UIF_CHECK_CD;
- quot = uart_get_divisor(port, termios, old_termios);
- uart_update_timeout(port, termios->c_cflag, quot);
-
- port->ops->change_speed(port, termios->c_cflag, termios->c_iflag, quot);
+ port->ops->set_termios(port, termios, old_termios);
}
static inline void
@@ -827,7 +819,7 @@ uart_set_info(struct uart_info *info, struct serial_struct *newinfo)
port->irq = new_serial.irq;
port->uartclk = new_serial.baud_base * 16;
- port->flags = new_serial.flags & UPF_FLAGS;
+ port->flags = new_serial.flags & UPF_CHANGE_MASK;
port->custom_divisor = new_serial.custom_divisor;
state->close_delay = new_serial.close_delay * HZ / 100;
state->closing_wait = new_serial.closing_wait * HZ / 100;
@@ -1267,7 +1259,6 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
if (tty->ldisc.flush_buffer)
tty->ldisc.flush_buffer(tty);
tty->closing = 0;
- info->event = 0;
info->tty = NULL;
if (info->blocked_open) {
if (info->state->close_delay) {
@@ -1376,7 +1367,6 @@ static void uart_hangup(struct tty_struct *tty)
return;
}
uart_shutdown(info);
- info->event = 0;
state->count = 0;
info->flags &= ~UIF_NORMAL_ACTIVE;
info->tty = NULL;
@@ -1859,10 +1849,13 @@ int __init
uart_set_options(struct uart_port *port, struct console *co,
int baud, int parity, int bits, int flow)
{
- unsigned int cflag = CREAD | HUPCL | CLOCAL;
- unsigned int quot;
+ struct termios termios;
int i;
+ memset(&termios, 0, sizeof(struct termios));
+
+ termios.c_cflag = CREAD | HUPCL | CLOCAL;
+
/*
* Construct a cflag setting.
*/
@@ -1870,28 +1863,27 @@ uart_set_options(struct uart_port *port, struct console *co,
if (baud_rates[i].rate <= baud)
break;
- cflag |= baud_rates[i].cflag;
+ termios.c_cflag |= baud_rates[i].cflag;
if (bits == 7)
- cflag |= CS7;
+ termios.c_cflag |= CS7;
else
- cflag |= CS8;
+ termios.c_cflag |= CS8;
switch (parity) {
case 'o': case 'O':
- cflag |= PARODD;
+ termios.c_cflag |= PARODD;
/*fall through*/
case 'e': case 'E':
- cflag |= PARENB;
+ termios.c_cflag |= PARENB;
break;
}
if (flow == 'r')
- cflag |= CRTSCTS;
+ termios.c_cflag |= CRTSCTS;
- co->cflag = cflag;
- quot = (port->uartclk / (16 * baud));
- port->ops->change_speed(port, cflag, 0, quot);
+ port->ops->set_termios(port, &termios, NULL);
+ co->cflag = termios.c_cflag;
return 0;
}
diff --git a/drivers/serial/mux.c b/drivers/serial/mux.c
index 9c4b52f61fed..3ef15146632e 100644
--- a/drivers/serial/mux.c
+++ b/drivers/serial/mux.c
@@ -268,17 +268,16 @@ static void mux_shutdown(struct uart_port *port)
}
/**
- * mux_change_speed - Chane port parameters.
+ * mux_set_termios - Chane port parameters.
* @port: Ptr to the uart_port.
- * @cflag: character flags.
- * @iflag: interrupt flags.
- * @quot:
+ * @termios: new termios settings.
+ * @old: old termios settings.
*
* The Serial Mux does not support this function.
*/
static void
-mux_change_speed(struct uart_port *port, unsigned int cflag,
- unsigned int iflag, unsigned int quot)
+mux_set_termios(struct uart_port *port, struct termios *termios,
+ struct termios *old)
{
}
@@ -388,7 +387,7 @@ static struct uart_ops mux_pops = {
.break_ctl = mux_break_ctl,
.startup = mux_startup,
.shutdown = mux_shutdown,
- .change_speed = mux_change_speed,
+ .set_termios = mux_set_termios,
.type = mux_type,
.release_port = mux_release_port,
.request_port = mux_request_port,
diff --git a/drivers/serial/nb85e_uart.c b/drivers/serial/nb85e_uart.c
index 5a9dd7aa7e3d..03c6b15e89cb 100644
--- a/drivers/serial/nb85e_uart.c
+++ b/drivers/serial/nb85e_uart.c
@@ -440,15 +440,13 @@ static void nb85e_uart_shutdown (struct uart_port *port)
}
static void
-nb85e_uart_change_speed (struct uart_port *port, unsigned cflags,
- unsigned iflag, unsigned quot)
+nb85e_uart_set_termios (struct uart_port *port, struct termios *termios,
+ struct termios *old)
{
- /* The serial framework doesn't give us the baud rate directly, but
- insists on calculating a `quotient' from it, and giving us that
- instead. Get the real baud rate from the tty code instead. */
- int baud = tty_get_baud_rate (port->info->tty);
+ /* FIXME: Which termios flags does this driver support? --rmk */
- nb85e_uart_configure (port->line, cflags, baud);
+ nb85e_uart_configure (port->line, termios->c_cflags,
+ uart_get_baud_rate(port, termios));
}
static const char *nb85e_uart_type (struct uart_port *port)
@@ -483,7 +481,7 @@ static struct uart_ops nb85e_uart_ops = {
.break_ctl = nb85e_uart_break_ctl,
.startup = nb85e_uart_startup,
.shutdown = nb85e_uart_shutdown,
- .change_speed = nb85e_uart_change_speed,
+ .set_termios = nb85e_uart_set_termios,
.type = nb85e_uart_type,
.release_port = nb85e_uart_nop,
.request_port = nb85e_uart_success,
diff --git a/drivers/serial/sa1100.c b/drivers/serial/sa1100.c
index 4134ebdd1391..1690a7c2c2c5 100644
--- a/drivers/serial/sa1100.c
+++ b/drivers/serial/sa1100.c
@@ -436,36 +436,50 @@ static void sa1100_shutdown(struct uart_port *port)
}
static void
-sa1100_change_speed(struct uart_port *port, unsigned int cflag,
- unsigned int iflag, unsigned int quot)
+sa1100_set_termios(struct uart_port *port, struct termios *termios,
+ struct termios *old)
{
struct sa1100_port *sport = (struct sa1100_port *)port;
unsigned long flags;
- unsigned int utcr0, old_utcr3;
+ unsigned int utcr0, old_utcr3, quot;
+ unsigned int old_csize = old ? old->c_cflag & CSIZE : CS8;
- /* byte size and parity */
- switch (cflag & CSIZE) {
- case CS7:
- utcr0 = 0;
- break;
- default:
- utcr0 = UTCR0_DSS;
- break;
+ /*
+ * We only support CS7 and CS8.
+ */
+ while ((termios->c_cflag & CSIZE) != CS7 &&
+ (termios->c_cflag & CSIZE) != CS8) {
+ termios->c_cflag &= ~CSIZE;
+ termios->c_cflag |= old_csize;
+ old_csize = CS8;
}
- if (cflag & CSTOPB)
+
+ if ((termios->c_cflag & CSIZE) == CS8)
+ utcr0 = UTCR0_DSS;
+ else
+ utcr0 = 0;
+
+ if (termios->c_cflag & CSTOPB)
utcr0 |= UTCR0_SBS;
- if (cflag & PARENB) {
+ if (termios->c_cflag & PARENB) {
utcr0 |= UTCR0_PE;
- if (!(cflag & PARODD))
+ if (!(termios->c_cflag & PARODD))
utcr0 |= UTCR0_OES;
}
+ /*
+ * Ask the core to calculate the divisor for us.
+ */
+ quot = uart_get_divisor(port, termios, old);
+
+ spin_lock_irqsave(&sport->port.lock, flags);
+
sport->port.read_status_mask &= UTSR0_TO_SM(UTSR0_TFS);
sport->port.read_status_mask |= UTSR1_TO_SM(UTSR1_ROR);
- if (iflag & INPCK)
+ if (termios->c_iflag & INPCK)
sport->port.read_status_mask |=
UTSR1_TO_SM(UTSR1_FRE | UTSR1_PRE);
- if (iflag & (BRKINT | PARMRK))
+ if (termios->c_iflag & (BRKINT | PARMRK))
sport->port.read_status_mask |=
UTSR0_TO_SM(UTSR0_RBB | UTSR0_REB);
@@ -473,29 +487,36 @@ sa1100_change_speed(struct uart_port *port, unsigned int cflag,
* Characters to ignore
*/
sport->port.ignore_status_mask = 0;
- if (iflag & IGNPAR)
+ if (termios->c_iflag & IGNPAR)
sport->port.ignore_status_mask |=
UTSR1_TO_SM(UTSR1_FRE | UTSR1_PRE);
- if (iflag & IGNBRK) {
+ if (termios->c_iflag & IGNBRK) {
sport->port.ignore_status_mask |=
UTSR0_TO_SM(UTSR0_RBB | UTSR0_REB);
/*
* If we're ignoring parity and break indicators,
* ignore overruns too (for real raw support).
*/
- if (iflag & IGNPAR)
+ if (termios->c_iflag & IGNPAR)
sport->port.ignore_status_mask |=
UTSR1_TO_SM(UTSR1_ROR);
}
del_timer_sync(&sport->timer);
- /* first, disable interrupts and drain transmitter */
- spin_lock_irqsave(&sport->port.lock, flags);
+ /*
+ * Update the per-port timeout.
+ */
+ uart_update_timeout(port, termios->c_cflag, quot);
+
+ /*
+ * disable interrupts and drain transmitter
+ */
old_utcr3 = UART_GET_UTCR3(sport);
UART_PUT_UTCR3(sport, old_utcr3 & ~(UTCR3_RIE | UTCR3_TIE));
- while (UART_GET_UTSR1(sport) & UTSR1_TBY);
+ while (UART_GET_UTSR1(sport) & UTSR1_TBY)
+ barrier();
/* then, disable everything */
UART_PUT_UTCR3(sport, 0);
@@ -512,7 +533,7 @@ sa1100_change_speed(struct uart_port *port, unsigned int cflag,
UART_PUT_UTCR3(sport, old_utcr3);
- if (UART_ENABLE_MS(&sport->port, cflag))
+ if (UART_ENABLE_MS(&sport->port, termios->c_cflag))
sa1100_enable_ms(&sport->port);
spin_unlock_irqrestore(&sport->port.lock, flags);
@@ -597,7 +618,7 @@ static struct uart_ops sa1100_pops = {
.break_ctl = sa1100_break_ctl,
.startup = sa1100_startup,
.shutdown = sa1100_shutdown,
- .change_speed = sa1100_change_speed,
+ .set_termios = sa1100_set_termios,
.type = sa1100_type,
.release_port = sa1100_release_port,
.request_port = sa1100_request_port,
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c
index e93c8e9b3b7a..cd971f0d27b0 100644
--- a/drivers/serial/sunsab.c
+++ b/drivers/serial/sunsab.c
@@ -583,10 +583,22 @@ static void sunsab_shutdown(struct uart_port *port)
tmp &= ~SAB82532_MODE_RAC;
writeb(tmp, &up->regs->rw.mode);
+ /*
+ * XXX FIXME
+ *
+ * If the chip is powered down here the system hangs/crashes during
+ * reboot or shutdown. This needs to be investigated further,
+ * similar behaviour occurs in 2.4 when the driver is configured
+ * as a module only. One hint may be that data is sometimes
+ * transmitted at 9600 baud during shutdown (regardless of the
+ * speed the chip was configured for when the port was open).
+ */
+#if 0
/* Power Down */
tmp = readb(&up->regs->rw.ccr0);
tmp &= ~SAB82532_CCR0_PU;
writeb(tmp, &up->regs->rw.ccr0);
+#endif
spin_unlock_irqrestore(&up->port.lock, flags);
}
@@ -751,20 +763,15 @@ static void sunsab_convert_to_sab(struct uart_sunsab_port *up, unsigned int cfla
}
/* port->lock is not held. */
-static void sunsab_change_speed(struct uart_port *port, unsigned int cflag,
- unsigned int iflag, unsigned int quot)
+static void sunsab_set_termios(struct uart_port *port, struct termios *termios,
+ struct termios *old)
{
struct uart_sunsab_port *up = (struct uart_sunsab_port *) port;
unsigned long flags;
- int baud;
+ int baud = uart_get_baud_rate(port, termios);
spin_lock_irqsave(&up->port.lock, flags);
-
- /* Undo what generic UART core did. */
- baud = (SAB_BASE_BAUD / (quot * 16));
-
- sunsab_convert_to_sab(up, cflag, iflag, baud);
-
+ sunsab_convert_to_sab(up, termios->c_cflag, termios->c_iflag, baud);
spin_unlock_irqrestore(&up->port.lock, flags);
}
@@ -807,7 +814,7 @@ static struct uart_ops sunsab_pops = {
.break_ctl = sunsab_break_ctl,
.startup = sunsab_startup,
.shutdown = sunsab_shutdown,
- .change_speed = sunsab_change_speed,
+ .set_termios = sunsab_set_termios,
.type = sunsab_type,
.release_port = sunsab_release_port,
.request_port = sunsab_request_port,
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c
index aa02c74a43d0..4879bfd96356 100644
--- a/drivers/serial/sunsu.c
+++ b/drivers/serial/sunsu.c
@@ -660,7 +660,7 @@ static int sunsu_startup(struct uart_port *port)
/*
* Clear the FIFO buffers and disable them.
- * (they will be reeanbled in change_speed())
+ * (they will be reeanbled in set_termios())
*/
if (uart_config[up->port.type].flags & UART_CLEAR_FIFO) {
serial_outp(up, UART_FCR, UART_FCR_ENABLE_FIFO);
@@ -714,7 +714,7 @@ static int sunsu_startup(struct uart_port *port)
/*
* Finally, enable interrupts. Note: Modem status interrupts
- * are set via change_speed(), which will be occuring imminently
+ * are set via set_termios(), which will be occuring imminently
* anyway, so we don't enable them here.
*/
up->ier = UART_IER_RLSI | UART_IER_RDI;
@@ -844,6 +844,17 @@ sunsu_change_speed(struct uart_port *port, unsigned int cflag,
if (up->port.type == PORT_16750)
fcr |= UART_FCR7_64BYTE;
+ /*
+ * Ok, we're now changing the port state. Do it with
+ * interrupts disabled.
+ */
+ spin_lock_irqsave(&up->port.lock, flags);
+
+ /*
+ * Update the per-port timeout.
+ */
+ uart_update_timeout(port, cflag, quot);
+
up->port.read_status_mask = UART_LSR_OE | UART_LSR_THRE | UART_LSR_DR;
if (iflag & INPCK)
up->port.read_status_mask |= UART_LSR_FE | UART_LSR_PE;
@@ -879,11 +890,6 @@ sunsu_change_speed(struct uart_port *port, unsigned int cflag,
if (UART_ENABLE_MS(&up->port, cflag))
up->ier |= UART_IER_MSI;
- /*
- * Ok, we're now changing the port state. Do it with
- * interrupts disabled.
- */
- spin_lock_irqsave(&up->port.lock, flags);
serial_out(up, UART_IER, up->ier);
if (uart_config[up->port.type].flags & UART_STARTECH) {
@@ -910,6 +916,20 @@ sunsu_change_speed(struct uart_port *port, unsigned int cflag,
spin_unlock_irqrestore(&up->port.lock, flags);
}
+static void
+sunsu_set_termios(struct uart_port *port, struct termios *termios,
+ struct termios *old)
+{
+ unsigned int quot;
+
+ /*
+ * Ask the core to calculate the divisor for us.
+ */
+ quot = uart_get_divisor(port, termios, old);
+
+ sunsu_change_speed(port, termios->c_cflag, termios->c_iflag, quot);
+}
+
static void sunsu_release_port(struct uart_port *port)
{
}
@@ -960,7 +980,7 @@ static struct uart_ops sunsu_pops = {
.break_ctl = sunsu_break_ctl,
.startup = sunsu_startup,
.shutdown = sunsu_shutdown,
- .change_speed = sunsu_change_speed,
+ .set_termios = sunsu_set_termios,
.type = sunsu_type,
.release_port = sunsu_release_port,
.request_port = sunsu_request_port,
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c
index b3c334adc64f..287d9b5cb642 100644
--- a/drivers/serial/sunzilog.c
+++ b/drivers/serial/sunzilog.c
@@ -917,26 +917,27 @@ sunzilog_convert_to_zs(struct uart_sunzilog_port *up, unsigned int cflag,
/* The port lock is not held. */
static void
-sunzilog_change_speed(struct uart_port *port, unsigned int cflag,
- unsigned int iflag, unsigned int quot)
+sunzilog_set_termios(struct uart_port *port, struct termios *termios,
+ struct termios *old)
{
struct uart_sunzilog_port *up = (struct uart_sunzilog_port *) port;
unsigned long flags;
int baud, brg;
+ baud = uart_get_baud_rate(port, termios);
+
spin_lock_irqsave(&up->port.lock, flags);
- baud = (ZS_CLOCK / (quot * 16));
brg = BPS_TO_BRG(baud, ZS_CLOCK / ZS_CLOCK_DIVISOR);
- sunzilog_convert_to_zs(up, cflag, iflag, brg);
+ sunzilog_convert_to_zs(up, termios->c_cflag, termios->c_iflag, brg);
- if (UART_ENABLE_MS(&up->port, cflag))
+ if (UART_ENABLE_MS(&up->port, termios->c_cflag))
up->flags |= SUNZILOG_FLAG_MODEM_STATUS;
else
up->flags &= ~SUNZILOG_FLAG_MODEM_STATUS;
- up->cflag = cflag;
+ up->cflag = termios->c_cflag;
sunzilog_maybe_update_regs(up, ZILOG_CHANNEL_FROM_PORT(port));
@@ -982,7 +983,7 @@ static struct uart_ops sunzilog_pops = {
.break_ctl = sunzilog_break_ctl,
.startup = sunzilog_startup,
.shutdown = sunzilog_shutdown,
- .change_speed = sunzilog_change_speed,
+ .set_termios = sunzilog_set_termios,
.type = sunzilog_type,
.release_port = sunzilog_release_port,
.request_port = sunzilog_request_port,
@@ -1036,91 +1037,69 @@ static void __init sunzilog_alloc_tables(void)
/* We used to attempt to use the address property of the Zilog device node
* but that totally is not necessary on sparc64.
*/
-static struct zilog_layout * __init get_zs_sun4u(int chip, int node)
+static struct zilog_layout * __init get_zs_sun4u(int chip, int zsnode)
{
- unsigned long mapped_addr = 0xdeadbeefUL;
+ unsigned long mapped_addr;
unsigned int sun4u_ino;
- int zsnode, seen;
-
- zsnode = node;
- seen = 0;
- while (zsnode) {
- int slave;
-
- zsnode = prom_searchsiblings(zsnode, "zs");
- if (zsnode == 0 || zsnode == -1)
- break;
- slave = prom_getintdefault(zsnode, "slave", -1);
- if ((slave == chip) || (seen == chip)) {
- struct sbus_bus *sbus = NULL;
- struct sbus_dev *sdev = NULL;
- int err;
-
- if (central_bus == NULL) {
- for_each_sbus(sbus) {
- for_each_sbusdev(sdev, sbus) {
- if (sdev->prom_node == zsnode)
- goto found;
- }
- }
- }
- found:
- if (sdev == NULL && central_bus == NULL) {
- prom_printf("SunZilog: sdev&&central == NULL for "
- "Zilog %d in get_zs_sun4u.\n", chip);
- prom_halt();
- }
- if (central_bus == NULL) {
- mapped_addr =
- sbus_ioremap(&sdev->resource[0], 0,
- PAGE_SIZE,
- "Zilog Registers");
- } else {
- struct linux_prom_registers zsregs[1];
-
- err = prom_getproperty(zsnode, "reg",
- (char *) &zsregs[0],
- sizeof(zsregs));
- if (err == -1) {
- prom_printf("SunZilog: Cannot map "
- "Zilog %d regs on "
- "central bus.\n", chip);
- prom_halt();
- }
- apply_fhc_ranges(central_bus->child,
- &zsregs[0], 1);
- apply_central_ranges(central_bus, &zsregs[0], 1);
- mapped_addr =
- (((u64)zsregs[0].which_io)<<32UL) |
- ((u64)zsregs[0].phys_addr);
- }
-
- if (zilog_irq == -1) {
- if (central_bus) {
- unsigned long iclr, imap;
-
- iclr = central_bus->child->fhc_regs.uregs
- + FHC_UREGS_ICLR;
- imap = central_bus->child->fhc_regs.uregs
- + FHC_UREGS_IMAP;
- zilog_irq = build_irq(12, 0, iclr, imap);
- } else {
- err = prom_getproperty(zsnode, "interrupts",
- (char *) &sun4u_ino,
- sizeof(sun4u_ino));
- zilog_irq = sbus_build_irq(sbus_root, sun4u_ino);
- }
+ struct sbus_bus *sbus = NULL;
+ struct sbus_dev *sdev = NULL;
+ int err;
+
+ if (central_bus == NULL) {
+ for_each_sbus(sbus) {
+ for_each_sbusdev(sdev, sbus) {
+ if (sdev->prom_node == zsnode)
+ goto found;
}
- break;
}
- zsnode = prom_getsibling(zsnode);
- seen++;
}
-
- if (zsnode == 0 || zsnode == -1) {
- prom_printf("SunZilog: Cannot find Zilog %d in get_zs_sun4u.\n", chip);
+ found:
+ if (sdev == NULL && central_bus == NULL) {
+ prom_printf("SunZilog: sdev&&central == NULL for "
+ "Zilog %d in get_zs_sun4u.\n", chip);
prom_halt();
}
+ if (central_bus == NULL) {
+ mapped_addr =
+ sbus_ioremap(&sdev->resource[0], 0,
+ PAGE_SIZE,
+ "Zilog Registers");
+ } else {
+ struct linux_prom_registers zsregs[1];
+
+ err = prom_getproperty(zsnode, "reg",
+ (char *) &zsregs[0],
+ sizeof(zsregs));
+ if (err == -1) {
+ prom_printf("SunZilog: Cannot map "
+ "Zilog %d regs on "
+ "central bus.\n", chip);
+ prom_halt();
+ }
+ apply_fhc_ranges(central_bus->child,
+ &zsregs[0], 1);
+ apply_central_ranges(central_bus, &zsregs[0], 1);
+ mapped_addr =
+ (((u64)zsregs[0].which_io)<<32UL) |
+ ((u64)zsregs[0].phys_addr);
+ }
+
+ if (zilog_irq == -1) {
+ if (central_bus) {
+ unsigned long iclr, imap;
+
+ iclr = central_bus->child->fhc_regs.uregs
+ + FHC_UREGS_ICLR;
+ imap = central_bus->child->fhc_regs.uregs
+ + FHC_UREGS_IMAP;
+ zilog_irq = build_irq(12, 0, iclr, imap);
+ } else {
+ err = prom_getproperty(zsnode, "interrupts",
+ (char *) &sun4u_ino,
+ sizeof(sun4u_ino));
+ zilog_irq = sbus_build_irq(sbus_root, sun4u_ino);
+ }
+ }
return (struct zilog_layout *) mapped_addr;
}
diff --git a/drivers/serial/uart00.c b/drivers/serial/uart00.c
index 19cbe5f9ce57..8b53824b0ee0 100644
--- a/drivers/serial/uart00.c
+++ b/drivers/serial/uart00.c
@@ -314,14 +314,24 @@ static void uart00_break_ctl(struct uart_port *port, int break_state)
}
static void
-uart00_change_speed(struct uart_port *port, unsigned int cflag,
- unsigned int iflag, unsigned int quot)
+uart00_set_termios(struct uart_port *port, struct termios *termios,
+ struct termios *old)
{
- unsigned int uart_mc, old_ies;
+ unsigned int uart_mc, old_ies, quot;
unsigned long flags;
+ /*
+ * We don't support CREAD (yet)
+ */
+ termios->c_cflag |= CREAD;
+
+ /*
+ * Ask the core to calculate the divisor for us.
+ */
+ quot = uart_get_divisor(port, termios, old);
+
/* byte size and parity */
- switch (cflag & CSIZE) {
+ switch (termios->c_cflag & CSIZE) {
case CS5:
uart_mc = UART_MC_CLS_CHARLEN_5;
break;
@@ -335,41 +345,47 @@ uart00_change_speed(struct uart_port *port, unsigned int cflag,
uart_mc = UART_MC_CLS_CHARLEN_8;
break;
}
- if (cflag & CSTOPB)
+ if (termios->c_cflag & CSTOPB)
uart_mc|= UART_MC_ST_TWO;
- if (cflag & PARENB) {
+ if (termios->c_cflag & PARENB) {
uart_mc |= UART_MC_PE_MSK;
- if (!(cflag & PARODD))
+ if (!(termios->c_cflag & PARODD))
uart_mc |= UART_MC_EP_MSK;
}
+ spin_lock_irqsave(&port->lock, flags);
+
+ /*
+ * Update the per-port timeout.
+ */
+ uart_update_timeout(port, termios->c_cflag, quot);
+
port->read_status_mask = UART_RDS_OE_MSK;
- if (iflag & INPCK)
+ if (termios->c_iflag & INPCK)
port->read_status_mask |= UART_RDS_FE_MSK | UART_RDS_PE_MSK;
- if (iflag & (BRKINT | PARMRK))
+ if (termios->c_iflag & (BRKINT | PARMRK))
port->read_status_mask |= UART_RDS_BI_MSK;
/*
* Characters to ignore
*/
port->ignore_status_mask = 0;
- if (iflag & IGNPAR)
+ if (termios->c_iflag & IGNPAR)
port->ignore_status_mask |= UART_RDS_FE_MSK | UART_RDS_PE_MSK;
- if (iflag & IGNBRK) {
+ if (termios->c_iflag & IGNBRK) {
port->ignore_status_mask |= UART_RDS_BI_MSK;
/*
* If we're ignoring parity and break indicators,
* ignore overruns to (for real raw support).
*/
- if (iflag & IGNPAR)
+ if (termios->c_iflag & IGNPAR)
port->ignore_status_mask |= UART_RDS_OE_MSK;
}
/* first, disable everything */
- spin_lock_irqsave(&port->lock, flags);
old_ies = UART_GET_IES(port);
- if (UART_ENABLE_MS(port, cflag))
+ if (UART_ENABLE_MS(port, termios->c_cflag))
old_ies |= UART_IES_ME_MSK;
/* Set baud rate */
@@ -495,7 +511,7 @@ static struct uart_ops uart00_pops = {
.break_ctl = uart00_break_ctl,
.startup = uart00_startup,
.shutdown = uart00_shutdown,
- .change_speed = uart00_change_speed,
+ .set_termios = uart00_set_termios,
.type = uart00_type,
.release_port = uart00_release_port,
.request_port = uart00_request_port,
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
index ad6e09065762..21ffbaa2082a 100644
--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -610,7 +610,8 @@ static ssize_t usblp_write(struct file *file, const char *buffer, size_t count,
{
DECLARE_WAITQUEUE(wait, current);
struct usblp *usblp = file->private_data;
- int timeout, err = 0, writecount = 0;
+ int timeout, err = 0;
+ size_t writecount = 0;
while (writecount < count) {
if (!usblp->wcomplete) {
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
index 9ca856cd6a42..52ebc9b3b9f6 100644
--- a/drivers/usb/core/hcd-pci.c
+++ b/drivers/usb/core/hcd-pci.c
@@ -147,7 +147,7 @@ clean_3:
goto clean_2;
}
- dev_info (*hcd->controller, "%s\n", hcd->product_desc);
+ dev_info (hcd->controller, "%s\n", hcd->product_desc);
#ifndef __sparc__
sprintf (buf, "%d", dev->irq);
@@ -156,7 +156,7 @@ clean_3:
#endif
if (request_irq (dev->irq, usb_hcd_irq, SA_SHIRQ, hcd->description, hcd)
!= 0) {
- dev_err (*hcd->controller,
+ dev_err (hcd->controller,
"request interrupt %s failed\n", bufp);
retval = -EBUSY;
goto clean_3;
@@ -165,7 +165,7 @@ clean_3:
hcd->regs = base;
hcd->region = region;
- dev_info (*hcd->controller, "irq %s, %s %p\n", bufp,
+ dev_info (hcd->controller, "irq %s, %s %p\n", bufp,
(driver->flags & HCD_MEMORY) ? "pci mem" : "io base",
base);
@@ -207,7 +207,7 @@ void usb_hcd_pci_remove (struct pci_dev *dev)
hcd = pci_get_drvdata(dev);
if (!hcd)
return;
- dev_info (*hcd->controller, "remove, state %x\n", hcd->state);
+ dev_info (hcd->controller, "remove, state %x\n", hcd->state);
if (in_interrupt ()) BUG ();
@@ -234,7 +234,7 @@ void usb_hcd_pci_remove (struct pci_dev *dev)
usb_deregister_bus (&hcd->self);
if (atomic_read (&hcd->self.refcnt) != 1) {
- dev_warn (*hcd->controller,
+ dev_warn (hcd->controller,
"dangling refs (%d) to bus %d!\n",
atomic_read (&hcd->self.refcnt) - 1,
hcd->self.busnum);
@@ -285,7 +285,7 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, u32 state)
int retval;
hcd = pci_get_drvdata(dev);
- dev_info (*hcd->controller, "suspend to state %d\n", state);
+ dev_info (hcd->controller, "suspend to state %d\n", state);
pci_save_state (dev, hcd->pci_state);
@@ -314,12 +314,12 @@ int usb_hcd_pci_resume (struct pci_dev *dev)
int retval;
hcd = pci_get_drvdata(dev);
- dev_info (*hcd->controller, "resume\n");
+ dev_info (hcd->controller, "resume\n");
/* guard against multiple resumes (APM bug?) */
atomic_inc (&hcd->resume_count);
if (atomic_read (&hcd->resume_count) != 1) {
- dev_err (*hcd->controller, "concurrent PCI resumes\n");
+ dev_err (hcd->controller, "concurrent PCI resumes\n");
retval = 0;
goto done;
}
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 526dabe7ac66..9344e2d9c3ed 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -347,7 +347,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
/* FALLTHROUGH */
case DeviceOutRequest | USB_REQ_CLEAR_FEATURE:
case DeviceOutRequest | USB_REQ_SET_FEATURE:
- dev_dbg (*hcd->controller, "no device features yet yet\n");
+ dev_dbg (hcd->controller, "no device features yet yet\n");
break;
case DeviceRequest | USB_REQ_GET_CONFIGURATION:
ubuf [0] = 1;
@@ -390,7 +390,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
break;
case DeviceOutRequest | USB_REQ_SET_ADDRESS:
// wValue == urb->dev->devaddr
- dev_dbg (*hcd->controller, "root hub device address %d\n",
+ dev_dbg (hcd->controller, "root hub device address %d\n",
wValue);
break;
@@ -405,7 +405,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
/* FALLTHROUGH */
case EndpointOutRequest | USB_REQ_CLEAR_FEATURE:
case EndpointOutRequest | USB_REQ_SET_FEATURE:
- dev_dbg (*hcd->controller, "no endpoint features yet\n");
+ dev_dbg (hcd->controller, "no endpoint features yet\n");
break;
/* CLASS REQUESTS (and errors) */
@@ -419,12 +419,12 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
error:
/* "protocol stall" on error */
urb->status = -EPIPE;
- dev_dbg (*hcd->controller, "unsupported hub control message (maxchild %d)\n",
+ dev_dbg (hcd->controller, "unsupported hub control message (maxchild %d)\n",
urb->dev->maxchild);
}
if (urb->status) {
urb->actual_length = 0;
- dev_dbg (*hcd->controller, "CTRL: TypeReq=0x%x val=0x%x idx=0x%x len=%d ==> %d\n",
+ dev_dbg (hcd->controller, "CTRL: TypeReq=0x%x val=0x%x idx=0x%x len=%d ==> %d\n",
typeReq, wValue, wIndex, wLength, urb->status);
}
if (bufp) {
@@ -457,7 +457,7 @@ static int rh_status_urb (struct usb_hcd *hcd, struct urb *urb)
if (timer_pending (&hcd->rh_timer)
|| urb->status != -EINPROGRESS
|| urb->transfer_buffer_length < len) {
- dev_dbg (*hcd->controller, "not queuing status urb, stat %d\n", urb->status);
+ dev_dbg (hcd->controller, "not queuing status urb, stat %d\n", urb->status);
return -EINVAL;
}
@@ -668,7 +668,7 @@ void usb_register_bus(struct usb_bus *bus)
usbfs_add_bus (bus);
- dev_info (*bus->controller, "new USB bus registered, assigned bus number %d\n", bus->busnum);
+ dev_info (bus->controller, "new USB bus registered, assigned bus number %d\n", bus->busnum);
}
EXPORT_SYMBOL (usb_register_bus);
@@ -682,7 +682,7 @@ EXPORT_SYMBOL (usb_register_bus);
*/
void usb_deregister_bus (struct usb_bus *bus)
{
- dev_info (*bus->controller, "USB bus %d deregistered\n", bus->busnum);
+ dev_info (bus->controller, "USB bus %d deregistered\n", bus->busnum);
/*
* NOTE: make sure that all the devices are removed by the
@@ -718,7 +718,7 @@ int usb_register_root_hub (struct usb_device *usb_dev, struct device *parent_dev
sprintf (&usb_dev->dev.bus_id[0], "usb%d", usb_dev->bus->busnum);
retval = usb_new_device (usb_dev, parent_dev);
if (retval)
- dev_err (*parent_dev, "can't register root hub for %s, %d\n",
+ dev_err (parent_dev, "can't register root hub for %s, %d\n",
usb_dev->dev.bus_id, retval);
return retval;
}
@@ -825,7 +825,7 @@ int usb_check_bandwidth (struct usb_device *dev, struct urb *urb)
#else
"would have ";
#endif
- dev_dbg (dev->dev, "usb_check_bandwidth %sFAILED: %d + %ld = %d usec\n",
+ dev_dbg (&dev->dev, "usb_check_bandwidth %sFAILED: %d + %ld = %d usec\n",
mode, old_alloc, bustime, new_alloc);
#endif
#ifdef CONFIG_USB_BANDWIDTH
@@ -864,7 +864,7 @@ void usb_claim_bandwidth (struct usb_device *dev, struct urb *urb, int bustime,
urb->bandwidth = bustime;
#ifdef USB_BANDWIDTH_MESSAGES
- dev_dbg (dev->dev, "bandwidth alloc increased by %d (%s) to %d for %d requesters\n",
+ dev_dbg (&dev->dev, "bandwidth alloc increased by %d (%s) to %d for %d requesters\n",
bustime,
isoc ? "ISOC" : "INTR",
dev->bus->bandwidth_allocated,
@@ -893,7 +893,7 @@ void usb_release_bandwidth (struct usb_device *dev, struct urb *urb, int isoc)
dev->bus->bandwidth_int_reqs--;
#ifdef USB_BANDWIDTH_MESSAGES
- dev_dbg (dev->dev, "bandwidth alloc reduced by %d (%s) to %d for %d requesters\n",
+ dev_dbg (&dev->dev, "bandwidth alloc reduced by %d (%s) to %d for %d requesters\n",
urb->bandwidth,
isoc ? "ISOC" : "INTR",
dev->bus->bandwidth_allocated,
@@ -1154,7 +1154,7 @@ static int hcd_unlink_urb (struct urb *urb)
*/
if (!(urb->transfer_flags & URB_ASYNC_UNLINK)) {
if (in_interrupt ()) {
- dev_dbg (*hcd->controller, "non-async unlink in_interrupt");
+ dev_dbg (hcd->controller, "non-async unlink in_interrupt");
retval = -EWOULDBLOCK;
goto done;
}
@@ -1180,7 +1180,7 @@ static int hcd_unlink_urb (struct urb *urb)
/* hcds shouldn't really fail these calls, but... */
if (retval) {
- dev_dbg (*sys, "dequeue %p --> %d\n", urb, retval);
+ dev_dbg (sys, "dequeue %p --> %d\n", urb, retval);
if (!(urb->transfer_flags & URB_ASYNC_UNLINK)) {
spin_lock_irqsave (&urb->lock, flags);
urb->complete = splice.complete;
@@ -1203,7 +1203,7 @@ done:
spin_unlock_irqrestore (&urb->lock, flags);
bye:
if (retval && sys)
- dev_dbg (*sys, "hcd_unlink_urb %p fail %d\n", urb, retval);
+ dev_dbg (sys, "hcd_unlink_urb %p fail %d\n", urb, retval);
return retval;
}
@@ -1234,7 +1234,7 @@ static int hcd_free_dev (struct usb_device *udev)
/* device driver problem with refcounts? */
if (!list_empty (&dev->urb_list)) {
- dev_dbg (*hcd->controller, "free busy dev, %s devnum %d (bug!)\n",
+ dev_dbg (hcd->controller, "free busy dev, %s devnum %d (bug!)\n",
hcd->self.bus_name, udev->devnum);
return -EINVAL;
}
@@ -1367,7 +1367,7 @@ void usb_hc_died (struct usb_hcd *hcd)
dev = list_entry (devlist, struct hcd_dev, dev_list);
list_for_each (urblist, &dev->urb_list) {
urb = list_entry (urblist, struct urb, urb_list);
- dev_dbg (*hcd->controller, "shutdown %s urb %p pipe %x, current status %d\n",
+ dev_dbg (hcd->controller, "shutdown %s urb %p pipe %x, current status %d\n",
hcd->self.bus_name, urb, urb->pipe, urb->status);
if (urb->status == -EINPROGRESS)
urb->status = -ESHUTDOWN;
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index d185edba0fa6..f23744d8749b 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -263,7 +263,7 @@ static void usb_hub_power_on(struct usb_hub *hub)
int i;
/* Enable power to the ports */
- dev_dbg(*hubdev(interface_to_usbdev(hub->intf)),
+ dev_dbg(hubdev(interface_to_usbdev(hub->intf)),
"enabling power on all ports\n");
dev = interface_to_usbdev(hub->intf);
for (i = 0; i < hub->descriptor->bNbrPorts; i++)
@@ -307,7 +307,7 @@ static int usb_hub_configure(struct usb_hub *hub,
hub_dev = hubdev(dev);
dev->maxchild = hub->descriptor->bNbrPorts;
- dev_info (*hub_dev, "%d port%s detected\n", dev->maxchild,
+ dev_info (hub_dev, "%d port%s detected\n", dev->maxchild,
(dev->maxchild == 1) ? "" : "s");
le16_to_cpus(&hub->descriptor->wHubCharacteristics);
@@ -321,33 +321,33 @@ static int usb_hub_configure(struct usb_hub *hub,
[((i + 1) / 8)] & (1 << ((i + 1) % 8))
? 'F' : 'R';
portstr[dev->maxchild] = 0;
- dev_dbg(*hub_dev, "compound device; port removable status: %s\n", portstr);
+ dev_dbg(hub_dev, "compound device; port removable status: %s\n", portstr);
} else
- dev_dbg(*hub_dev, "standalone hub\n");
+ dev_dbg(hub_dev, "standalone hub\n");
switch (hub->descriptor->wHubCharacteristics & HUB_CHAR_LPSM) {
case 0x00:
- dev_dbg(*hub_dev, "ganged power switching\n");
+ dev_dbg(hub_dev, "ganged power switching\n");
break;
case 0x01:
- dev_dbg(*hub_dev, "individual port power switching\n");
+ dev_dbg(hub_dev, "individual port power switching\n");
break;
case 0x02:
case 0x03:
- dev_dbg(*hub_dev, "unknown reserved power switching mode\n");
+ dev_dbg(hub_dev, "unknown reserved power switching mode\n");
break;
}
switch (hub->descriptor->wHubCharacteristics & HUB_CHAR_OCPM) {
case 0x00:
- dev_dbg(*hub_dev, "global over-current protection\n");
+ dev_dbg(hub_dev, "global over-current protection\n");
break;
case 0x08:
- dev_dbg(*hub_dev, "individual port over-current protection\n");
+ dev_dbg(hub_dev, "individual port over-current protection\n");
break;
case 0x10:
case 0x18:
- dev_dbg(*hub_dev, "no over-current protection\n");
+ dev_dbg(hub_dev, "no over-current protection\n");
break;
}
@@ -358,16 +358,16 @@ static int usb_hub_configure(struct usb_hub *hub,
case 0:
break;
case 1:
- dev_dbg(*hub_dev, "Single TT\n");
+ dev_dbg(hub_dev, "Single TT\n");
hub->tt.hub = dev;
break;
case 2:
- dev_dbg(*hub_dev, "TT per port\n");
+ dev_dbg(hub_dev, "TT per port\n");
hub->tt.hub = dev;
hub->tt.multi = 1;
break;
default:
- dev_dbg(*hub_dev, "Unrecognized hub protocol %d\n",
+ dev_dbg(hub_dev, "Unrecognized hub protocol %d\n",
dev->descriptor.bDeviceProtocol);
break;
}
@@ -375,26 +375,26 @@ static int usb_hub_configure(struct usb_hub *hub,
switch (hub->descriptor->wHubCharacteristics & HUB_CHAR_TTTT) {
case 0x00:
if (dev->descriptor.bDeviceProtocol != 0)
- dev_dbg(*hub_dev, "TT requires at most 8 FS bit times\n");
+ dev_dbg(hub_dev, "TT requires at most 8 FS bit times\n");
break;
case 0x20:
- dev_dbg(*hub_dev, "TT requires at most 16 FS bit times\n");
+ dev_dbg(hub_dev, "TT requires at most 16 FS bit times\n");
break;
case 0x40:
- dev_dbg(*hub_dev, "TT requires at most 24 FS bit times\n");
+ dev_dbg(hub_dev, "TT requires at most 24 FS bit times\n");
break;
case 0x60:
- dev_dbg(*hub_dev, "TT requires at most 32 FS bit times\n");
+ dev_dbg(hub_dev, "TT requires at most 32 FS bit times\n");
break;
}
- dev_dbg(*hub_dev, "Port indicators are %s supported\n",
+ dev_dbg(hub_dev, "Port indicators are %s supported\n",
(hub->descriptor->wHubCharacteristics & HUB_CHAR_PORTIND)
? "" : "not");
- dev_dbg(*hub_dev, "power on to power good time: %dms\n",
+ dev_dbg(hub_dev, "power on to power good time: %dms\n",
hub->descriptor->bPwrOn2PwrGood * 2);
- dev_dbg(*hub_dev, "hub controller current requirement: %dmA\n",
+ dev_dbg(hub_dev, "hub controller current requirement: %dmA\n",
hub->descriptor->bHubContrCurrent);
ret = usb_get_hub_status(dev, &hubstatus);
@@ -405,11 +405,11 @@ static int usb_hub_configure(struct usb_hub *hub,
le16_to_cpus(&hubstatus.wHubStatus);
- dev_dbg(*hub_dev, "local power source is %s\n",
+ dev_dbg(hub_dev, "local power source is %s\n",
(hubstatus.wHubStatus & HUB_STATUS_LOCAL_POWER)
? "lost (inactive)" : "good");
- dev_dbg(*hub_dev, "%sover-current condition exists\n",
+ dev_dbg(hub_dev, "%sover-current condition exists\n",
(hubstatus.wHubStatus & HUB_STATUS_OVERCURRENT) ? "" : "no ");
/* Start the interrupt endpoint */
@@ -442,7 +442,7 @@ static int usb_hub_configure(struct usb_hub *hub,
return 0;
fail:
- dev_err (hub->intf->dev, "config failed, %s (err %d)\n",
+ dev_err (&hub->intf->dev, "config failed, %s (err %d)\n",
message, ret);
/* hub_disconnect() frees urb and descriptor */
return ret;
@@ -505,7 +505,7 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id)
if ((desc->desc.bInterfaceSubClass != 0) &&
(desc->desc.bInterfaceSubClass != 1)) {
descriptor_error:
- dev_err (intf->dev, "bad descriptor, ignoring hub\n");
+ dev_err (&intf->dev, "bad descriptor, ignoring hub\n");
return -EIO;
}
@@ -529,7 +529,7 @@ descriptor_error:
}
/* We found a hub */
- dev_info (*hubdev (dev), "USB hub found\n");
+ dev_info (hubdev (dev), "USB hub found\n");
hub = kmalloc(sizeof(*hub), GFP_KERNEL);
if (!hub) {
@@ -714,7 +714,7 @@ static int usb_hub_port_wait_reset(struct usb_device *hub, int port,
if (delay_time >= 2 * HUB_SHORT_RESET_TIME)
delay = HUB_LONG_RESET_TIME;
- dev_dbg (*hubdev (hub),
+ dev_dbg (hubdev (hub),
"port %d not reset yet, waiting %dms\n",
port + 1, delay);
}
@@ -740,13 +740,13 @@ static int usb_hub_port_reset(struct usb_device *hub, int port,
return status;
}
- dev_dbg (*hubdev (hub),
+ dev_dbg (hubdev (hub),
"port %d not enabled, trying reset again...\n",
port + 1);
delay = HUB_LONG_RESET_TIME;
}
- dev_err (*hubdev (hub),
+ dev_err (hubdev (hub),
"Cannot enable port %i. Maybe the USB cable is bad?\n",
port + 1);
@@ -814,7 +814,7 @@ static int usb_hub_port_debounce(struct usb_device *hub, int port)
}
/* XXX Replace this with dbg() when 2.6 is about to ship. */
- dev_info (*hubdev (hub),
+ dev_info (hubdev (hub),
"debounce: port %d: delay %dms stable %d status 0x%x\n",
port + 1, delay_time, stable_count, portstatus);
@@ -829,7 +829,7 @@ static void usb_hub_port_connect_change(struct usb_hub *hubstate, int port,
unsigned int delay = HUB_SHORT_RESET_TIME;
int i;
- dev_dbg (hubstate->intf->dev,
+ dev_dbg (&hubstate->intf->dev,
"port %d, status %x, change %x, %s\n",
port + 1, portstatus, portchange, portspeed (portstatus));
@@ -849,7 +849,7 @@ static void usb_hub_port_connect_change(struct usb_hub *hubstate, int port,
}
if (usb_hub_port_debounce(hub, port)) {
- dev_err (hubstate->intf->dev,
+ dev_err (&hubstate->intf->dev,
"connect-debounce failed, port %d disabled\n",
port+1);
usb_hub_port_disable(hub, port);
@@ -870,7 +870,7 @@ static void usb_hub_port_connect_change(struct usb_hub *hubstate, int port,
/* Allocate a new device struct */
dev = usb_alloc_dev(hub, hub->bus);
if (!dev) {
- dev_err (hubstate->intf->dev,
+ dev_err (&hubstate->intf->dev,
"couldn't allocate usb_device\n");
break;
}
@@ -914,10 +914,10 @@ static void usb_hub_port_connect_change(struct usb_hub *hubstate, int port,
len = snprintf (dev->devpath, sizeof dev->devpath,
"%d", port + 1);
if (len == sizeof dev->devpath)
- dev_err (hubstate->intf->dev,
+ dev_err (&hubstate->intf->dev,
"devpath size! usb/%03d/%03d path %s\n",
dev->bus->busnum, dev->devnum, dev->devpath);
- dev_info (hubstate->intf->dev,
+ dev_info (&hubstate->intf->dev,
"new USB device on port %d, assigned address %d\n",
port + 1, dev->devnum);
@@ -1006,7 +1006,7 @@ static void usb_hub_events(void)
if (portchange & USB_PORT_STAT_C_CONNECTION) {
usb_hub_port_connect_change(hub, i, portstatus, portchange);
} else if (portchange & USB_PORT_STAT_C_ENABLE) {
- dev_dbg (*hubdev (dev),
+ dev_dbg (hubdev (dev),
"port %d enable change, status %x\n",
i + 1, portstatus);
usb_clear_port_feature(dev,
diff --git a/drivers/usb/core/usb-debug.c b/drivers/usb/core/usb-debug.c
index f0348fa89dbb..ea5d4f766bb6 100644
--- a/drivers/usb/core/usb-debug.c
+++ b/drivers/usb/core/usb-debug.c
@@ -177,7 +177,7 @@ void usb_show_string(struct usb_device *dev, char *id, int index)
if (!(buf = kmalloc(256, GFP_KERNEL)))
return;
if (usb_string(dev, index, buf, 256) > 0)
- dev_printk(KERN_INFO, dev->dev, "%s: %s\n", id, buf);
+ dev_printk(KERN_INFO, &dev->dev, "%s: %s\n", id, buf);
kfree(buf);
}
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index 1ca898312c5e..fdcc4607fe34 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -84,19 +84,19 @@ int usb_device_probe(struct device *dev)
const struct usb_device_id *id;
int error = -ENODEV;
- dev_dbg(*dev, "%s\n", __FUNCTION__);
+ dev_dbg(dev, "%s\n", __FUNCTION__);
if (!driver->probe)
return error;
if (!try_module_get(driver->owner)) {
- dev_err (*dev, "Can't get a module reference for %s\n", driver->name);
+ dev_err (dev, "Can't get a module reference for %s\n", driver->name);
return error;
}
id = usb_match_id (intf, driver->id_table);
if (id) {
- dev_dbg (*dev, "%s - got id\n", __FUNCTION__);
+ dev_dbg (dev, "%s - got id\n", __FUNCTION__);
down (&driver->serialize);
error = driver->probe (intf, id);
up (&driver->serialize);
@@ -118,7 +118,7 @@ int usb_device_remove(struct device *dev)
driver = to_usb_driver(dev->driver);
if (!driver) {
- dev_err(*dev, "%s does not have a valid driver to work with!",
+ dev_err(dev, "%s does not have a valid driver to work with!",
__FUNCTION__);
return -ENODEV;
}
@@ -126,7 +126,7 @@ int usb_device_remove(struct device *dev)
if (!try_module_get(driver->owner)) {
// FIXME this happens even when we just rmmod
// drivers that aren't in active use...
- dev_err(*dev, "Dieing driver still bound to device.\n");
+ dev_err(dev, "Dieing driver still bound to device.\n");
return -EIO;
}
@@ -827,7 +827,7 @@ void usb_disconnect(struct usb_device **pdev)
*pdev = NULL;
- dev_info (dev->dev, "USB disconnect, address %d\n", dev->devnum);
+ dev_info (&dev->dev, "USB disconnect, address %d\n", dev->devnum);
/* Free up all the children before we remove this device */
for (i = 0; i < USB_MAXCHILDREN; i++) {
@@ -836,7 +836,7 @@ void usb_disconnect(struct usb_device **pdev)
usb_disconnect(child);
}
- dev_dbg (dev->dev, "unregistering interfaces\n");
+ dev_dbg (&dev->dev, "unregistering interfaces\n");
if (dev->actconfig) {
for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
struct usb_interface *interface = &dev->actconfig->interface[i];
@@ -846,7 +846,7 @@ void usb_disconnect(struct usb_device **pdev)
}
}
- dev_dbg (dev->dev, "unregistering device\n");
+ dev_dbg (&dev->dev, "unregistering device\n");
/* Free the device number and remove the /proc/bus/usb entry */
if (dev->devnum > 0) {
clear_bit(dev->devnum, dev->bus->devmap.devicemap);
@@ -931,7 +931,7 @@ static void set_device_description (struct usb_device *dev)
if (prod && usb_string (dev, prod, prod_str, 256) > 0) {
#ifdef DEBUG
- dev_printk (KERN_INFO, dev->dev, "Product: %s\n", prod_str);
+ dev_printk (KERN_INFO, &dev->dev, "Product: %s\n", prod_str);
#endif
} else {
prod_str = 0;
@@ -939,7 +939,7 @@ static void set_device_description (struct usb_device *dev)
if (mfgr && usb_string (dev, mfgr, mfgr_str, 256) > 0) {
#ifdef DEBUG
- dev_printk (KERN_INFO, dev->dev, "Manufacturer: %s\n", mfgr_str);
+ dev_printk (KERN_INFO, &dev->dev, "Manufacturer: %s\n", mfgr_str);
#endif
} else {
mfgr_str = 0;
@@ -1042,7 +1042,7 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
wait_ms(200);
}
if (err < 0) {
- dev_err(dev->dev, "USB device not accepting new address=%d (error=%d)\n",
+ dev_err(&dev->dev, "USB device not accepting new address=%d (error=%d)\n",
dev->devnum, err);
clear_bit(dev->devnum, dev->bus->devmap.devicemap);
dev->devnum = -1;
@@ -1060,9 +1060,9 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
if (err < 8) {
if (err < 0)
- dev_err(dev->dev, "USB device not responding, giving up (error=%d)\n", err);
+ dev_err(&dev->dev, "USB device not responding, giving up (error=%d)\n", err);
else
- dev_err(dev->dev, "USB device descriptor short read (expected %i, got %i)\n", 8, err);
+ dev_err(&dev->dev, "USB device descriptor short read (expected %i, got %i)\n", 8, err);
clear_bit(dev->devnum, dev->bus->devmap.devicemap);
dev->devnum = -1;
return 1;
@@ -1077,9 +1077,9 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
err = usb_get_device_descriptor(dev);
if (err < (signed)sizeof(dev->descriptor)) {
if (err < 0)
- dev_err(dev->dev, "unable to get device descriptor (error=%d)\n", err);
+ dev_err(&dev->dev, "unable to get device descriptor (error=%d)\n", err);
else
- dev_err(dev->dev, "USB device descriptor short read (expected %Zi, got %i)\n",
+ dev_err(&dev->dev, "USB device descriptor short read (expected %Zi, got %i)\n",
sizeof(dev->descriptor), err);
clear_bit(dev->devnum, dev->bus->devmap.devicemap);
@@ -1089,7 +1089,7 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
err = usb_get_configuration(dev);
if (err < 0) {
- dev_err(dev->dev, "unable to get device %d configuration (error=%d)\n",
+ dev_err(&dev->dev, "unable to get device %d configuration (error=%d)\n",
dev->devnum, err);
clear_bit(dev->devnum, dev->bus->devmap.devicemap);
dev->devnum = -1;
@@ -1099,7 +1099,7 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
/* we set the default configuration here */
err = usb_set_configuration(dev, dev->config[0].desc.bConfigurationValue);
if (err) {
- dev_err(dev->dev, "failed to set device %d default configuration (error=%d)\n",
+ dev_err(&dev->dev, "failed to set device %d default configuration (error=%d)\n",
dev->devnum, err);
clear_bit(dev->devnum, dev->bus->devmap.devicemap);
dev->devnum = -1;
@@ -1108,7 +1108,7 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
/* USB device state == configured ... tell the world! */
- dev_dbg(dev->dev, "new device strings: Mfr=%d, Product=%d, SerialNumber=%d\n",
+ dev_dbg(&dev->dev, "new device strings: Mfr=%d, Product=%d, SerialNumber=%d\n",
dev->descriptor.iManufacturer, dev->descriptor.iProduct, dev->descriptor.iSerialNumber);
set_device_description (dev);
@@ -1151,7 +1151,7 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
dev->bus->bus_name, dev->devpath,
desc->bInterfaceNumber);
}
- dev_dbg (dev->dev, "%s - registering interface %s\n", __FUNCTION__, interface->dev.bus_id);
+ dev_dbg (&dev->dev, "%s - registering interface %s\n", __FUNCTION__, interface->dev.bus_id);
device_add (&interface->dev);
usb_create_driverfs_intf_files (interface);
}
diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c
index 3cb4fe3a1ad2..6dcc5b9fcdbe 100644
--- a/drivers/usb/host/ehci-dbg.c
+++ b/drivers/usb/host/ehci-dbg.c
@@ -18,38 +18,14 @@
/* this file is part of ehci-hcd.c */
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,50)
-
#define ehci_dbg(ehci, fmt, args...) \
- dev_dbg (*(ehci)->hcd.controller, fmt, ## args )
+ dev_dbg ((ehci)->hcd.controller , fmt , ## args )
#define ehci_err(ehci, fmt, args...) \
- dev_err (*(ehci)->hcd.controller, fmt, ## args )
+ dev_err ((ehci)->hcd.controller , fmt , ## args )
#define ehci_info(ehci, fmt, args...) \
- dev_info (*(ehci)->hcd.controller, fmt, ## args )
+ dev_info ((ehci)->hcd.controller , fmt , ## args )
#define ehci_warn(ehci, fmt, args...) \
- dev_warn (*(ehci)->hcd.controller, fmt, ## args )
-
-#else
-
-#ifdef DEBUG
-#define ehci_dbg(ehci, fmt, args...) \
- printk(KERN_DEBUG "%s %s: " fmt, hcd_name, \
- (ehci)->hcd.pdev->slot_name, ## args )
-#else
-#define ehci_dbg(ehci, fmt, args...) do { } while (0)
-#endif
-
-#define ehci_err(ehci, fmt, args...) \
- printk(KERN_ERR "%s %s: " fmt, hcd_name, \
- (ehci)->hcd.pdev->slot_name, ## args )
-#define ehci_info(ehci, fmt, args...) \
- printk(KERN_INFO "%s %s: " fmt, hcd_name, \
- (ehci)->hcd.pdev->slot_name, ## args )
-#define ehci_warn(ehci, fmt, args...) \
- printk(KERN_WARNING "%s %s: " fmt, hcd_name, \
- (ehci)->hcd.pdev->slot_name, ## args )
-#endif
-
+ dev_warn ((ehci)->hcd.controller , fmt , ## args )
#ifdef EHCI_VERBOSE_DEBUG
# define vdbg dbg
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 3da8c9b228ef..02724f00fba6 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -637,9 +637,13 @@ static void ehci_work (struct ehci_hcd *ehci, struct pt_regs *regs)
static void ehci_irq (struct usb_hcd *hcd, struct pt_regs *regs)
{
struct ehci_hcd *ehci = hcd_to_ehci (hcd);
- u32 status = readl (&ehci->regs->status);
+ u32 status;
int bh;
+ spin_lock (&ehci->lock);
+
+ status = readl (&ehci->regs->status);
+
/* e.g. cardbus physical eject */
if (status == ~(u32) 0) {
ehci_dbg (ehci, "device removed\n");
@@ -648,9 +652,7 @@ static void ehci_irq (struct usb_hcd *hcd, struct pt_regs *regs)
status &= INTR_MASK;
if (!status) /* irq sharing? */
- return;
-
- spin_lock (&ehci->lock);
+ goto done;
/* clear (just) interrupts */
writel (status, &ehci->regs->status);
@@ -693,6 +695,7 @@ dead:
if (bh)
ehci_work (ehci, regs);
+done:
spin_unlock (&ehci->lock);
}
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
index 699c191b70f5..fef1e3688b65 100644
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -222,7 +222,7 @@ ehci_urb_done (struct ehci_hcd *ehci, struct urb *urb, struct pt_regs *regs)
static unsigned
qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh, struct pt_regs *regs)
{
- struct ehci_qtd *last = 0;
+ struct ehci_qtd *last = 0, *end = qh->dummy;
struct list_head *entry, *tmp;
int stopped = 0;
unsigned count = 0;
@@ -253,6 +253,10 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh, struct pt_regs *regs)
last = 0;
}
+ /* ignore urbs submitted during completions we reported */
+ if (qtd == end)
+ break;
+
/* hardware copies qtd out of qh overlay */
rmb ();
token = le32_to_cpu (qtd->hw_token);
@@ -967,25 +971,28 @@ static void
scan_async (struct ehci_hcd *ehci, struct pt_regs *regs)
{
struct ehci_qh *qh;
- unsigned count;
+ if (!++(ehci->stamp))
+ ehci->stamp++;
rescan:
qh = ehci->async->qh_next.qh;
- count = 0;
if (likely (qh != 0)) {
do {
/* clean any finished work for this qh */
- if (!list_empty (&qh->qtd_list)) {
+ if (!list_empty (&qh->qtd_list)
+ && qh->stamp != ehci->stamp) {
int temp;
/* unlinks could happen here; completion
- * reporting drops the lock.
+ * reporting drops the lock. rescan using
+ * the latest schedule, but don't rescan
+ * qhs we already finished (no looping).
*/
qh = qh_get (qh);
+ qh->stamp = ehci->stamp;
temp = qh_completions (ehci, qh, regs);
qh_put (ehci, qh);
if (temp != 0) {
- count += temp;
goto rescan;
}
}
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index f57b8e3e179e..7b49ddf0648a 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -81,6 +81,7 @@ struct ehci_hcd { /* one per controller */
struct pci_pool *sitd_pool; /* sitd per split iso urb */
struct timer_list watchdog;
+ unsigned stamp;
#ifdef EHCI_STATS
struct ehci_stats stats;
@@ -306,6 +307,7 @@ struct ehci_qh {
struct ehci_qtd *dummy;
atomic_t refcount;
+ unsigned stamp;
u8 qh_state;
#define QH_STATE_LINKED 1 /* HC sees this */
diff --git a/drivers/usb/host/ohci-dbg.c b/drivers/usb/host/ohci-dbg.c
index c175e87c80f5..406290b54b8b 100644
--- a/drivers/usb/host/ohci-dbg.c
+++ b/drivers/usb/host/ohci-dbg.c
@@ -75,7 +75,7 @@ urb_print (struct urb * urb, char * str, int small)
static void ohci_dump_intr_mask (struct device *dev, char *label, __u32 mask)
{
- dev_dbg (*dev, "%s: 0x%08x%s%s%s%s%s%s%s%s%s\n",
+ dev_dbg (dev, "%s: 0x%08x%s%s%s%s%s%s%s%s%s\n",
label,
mask,
(mask & OHCI_INTR_MIE) ? " MIE" : "",
@@ -93,7 +93,7 @@ static void ohci_dump_intr_mask (struct device *dev, char *label, __u32 mask)
static void maybe_print_eds (struct device *dev, char *label, __u32 value)
{
if (value)
- dev_dbg (*dev, "%s %08x\n", label, value);
+ dev_dbg (dev, "%s %08x\n", label, value);
}
static char *hcfs2string (int state)
@@ -115,12 +115,12 @@ static void ohci_dump_status (struct ohci_hcd *controller)
__u32 temp;
temp = readl (&regs->revision) & 0xff;
- dev_dbg (*dev, "OHCI %d.%d, %s legacy support registers\n",
+ dev_dbg (dev, "OHCI %d.%d, %s legacy support registers\n",
0x03 & (temp >> 4), (temp & 0x0f),
(temp & 0x10) ? "with" : "NO");
temp = readl (&regs->control);
- dev_dbg (*dev, "control: 0x%08x%s%s%s HCFS=%s%s%s%s%s CBSR=%d\n", temp,
+ dev_dbg (dev, "control: 0x%08x%s%s%s HCFS=%s%s%s%s%s CBSR=%d\n", temp,
(temp & OHCI_CTRL_RWE) ? " RWE" : "",
(temp & OHCI_CTRL_RWC) ? " RWC" : "",
(temp & OHCI_CTRL_IR) ? " IR" : "",
@@ -133,7 +133,7 @@ static void ohci_dump_status (struct ohci_hcd *controller)
);
temp = readl (&regs->cmdstatus);
- dev_dbg (*dev, "cmdstatus: 0x%08x SOC=%d%s%s%s%s\n", temp,
+ dev_dbg (dev, "cmdstatus: 0x%08x SOC=%d%s%s%s%s\n", temp,
(temp & OHCI_SOC) >> 16,
(temp & OHCI_OCR) ? " OCR" : "",
(temp & OHCI_BLF) ? " BLF" : "",
@@ -167,7 +167,7 @@ static void ohci_dump_roothub (struct ohci_hcd *controller, int verbose)
ndp = (temp & RH_A_NDP);
if (verbose) {
- dev_dbg (*controller->hcd.controller,
+ dev_dbg (controller->hcd.controller,
"roothub.a: %08x POTPGT=%d%s%s%s%s%s NDP=%d\n", temp,
((temp & RH_A_POTPGT) >> 24) & 0xff,
(temp & RH_A_NOCP) ? " NOCP" : "",
@@ -178,14 +178,14 @@ static void ohci_dump_roothub (struct ohci_hcd *controller, int verbose)
ndp
);
temp = roothub_b (controller);
- dev_dbg (*controller->hcd.controller,
+ dev_dbg (controller->hcd.controller,
"roothub.b: %08x PPCM=%04x DR=%04x\n",
temp,
(temp & RH_B_PPCM) >> 16,
(temp & RH_B_DR)
);
temp = roothub_status (controller);
- dev_dbg (*controller->hcd.controller,
+ dev_dbg (controller->hcd.controller,
"roothub.status: %08x%s%s%s%s%s%s\n",
temp,
(temp & RH_HS_CRWE) ? " CRWE" : "",
@@ -205,13 +205,13 @@ static void ohci_dump_roothub (struct ohci_hcd *controller, int verbose)
static void ohci_dump (struct ohci_hcd *controller, int verbose)
{
- dev_dbg (*controller->hcd.controller,
+ dev_dbg (controller->hcd.controller,
"OHCI controller state\n");
// dumps some of the state we know about
ohci_dump_status (controller);
if (controller->hcca)
- dev_dbg (*controller->hcd.controller,
+ dev_dbg (controller->hcd.controller,
"hcca frame #%04x\n", controller->hcca->frame_no);
ohci_dump_roothub (controller, 1);
}
@@ -318,6 +318,8 @@ ohci_dump_ed (struct ohci_hcd *ohci, char *label, struct ed *ed, int verbose)
}
}
+#define DRIVERFS_DEBUG_FILES /* only on 2.5 versions */
+
#else
static inline void ohci_dump (struct ohci_hcd *controller, int verbose) {}
@@ -325,6 +327,8 @@ static inline void ohci_dump (struct ohci_hcd *controller, int verbose) {}
/*-------------------------------------------------------------------------*/
+#ifdef DRIVERFS_DEBUG_FILES
+
static ssize_t
show_list (struct ohci_hcd *ohci, char *buf, size_t count, struct ed *ed)
{
@@ -355,7 +359,7 @@ show_list (struct ohci_hcd *ohci, char *buf, size_t count, struct ed *ed)
scratch,
(info & ED_SKIP) ? " s" : "",
(ed->hwHeadP & ED_H) ? " H" : "",
- (ed->hwHeadP & ED_C) ? "data1" : "data0");
+ (ed->hwHeadP & ED_C) ? data1 : data0);
size -= temp;
buf += temp;
@@ -513,7 +517,7 @@ static inline void create_debug_files (struct ohci_hcd *bus)
device_create_file (bus->hcd.controller, &dev_attr_async);
device_create_file (bus->hcd.controller, &dev_attr_periodic);
// registers
- dev_dbg (*bus->hcd.controller, "created debug files\n");
+ dev_dbg (bus->hcd.controller, "created debug files\n");
}
static inline void remove_debug_files (struct ohci_hcd *bus)
@@ -522,5 +526,12 @@ static inline void remove_debug_files (struct ohci_hcd *bus)
device_remove_file (bus->hcd.controller, &dev_attr_periodic);
}
+#else /* empty stubs for creating those files */
+
+static inline void create_debug_files (struct ohci_hcd *bus) { }
+static inline void remove_debug_files (struct ohci_hcd *bus) { }
+
+#endif /* DRIVERFS_DEBUG_FILES */
+
/*-------------------------------------------------------------------------*/
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 46d8beaf6b8b..0a3971713f28 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -383,7 +383,7 @@ static int hc_reset (struct ohci_hcd *ohci)
/* SMM owns the HC? not for long! */
if (readl (&ohci->regs->control) & OHCI_CTRL_IR) {
- dev_dbg (*ohci->hcd.controller, "USB HC TakeOver from BIOS/SMM\n");
+ dev_dbg (ohci->hcd.controller, "USB HC TakeOver from BIOS/SMM\n");
/* this timeout is arbitrary. we make it long, so systems
* depending on usb keyboards may be usable even if the
@@ -396,7 +396,7 @@ static int hc_reset (struct ohci_hcd *ohci)
while (readl (&ohci->regs->control) & OHCI_CTRL_IR) {
wait_ms (10);
if (--temp == 0) {
- dev_err (*ohci->hcd.controller, "USB HC TakeOver failed!\n");
+ dev_err (ohci->hcd.controller, "USB HC TakeOver failed!\n");
return -1;
}
}
@@ -405,7 +405,7 @@ static int hc_reset (struct ohci_hcd *ohci)
/* Disable HC interrupts */
writel (OHCI_INTR_MIE, &ohci->regs->intrdisable);
- dev_dbg (*ohci->hcd.controller, "USB HC reset_hc %s: ctrl = 0x%x ;\n",
+ dev_dbg (ohci->hcd.controller, "USB HC reset_hc %s: ctrl = 0x%x ;\n",
ohci->hcd.self.bus_name,
readl (&ohci->regs->control));
@@ -422,7 +422,7 @@ static int hc_reset (struct ohci_hcd *ohci)
temp = 30; /* ... allow extra time */
while ((readl (&ohci->regs->cmdstatus) & OHCI_HCR) != 0) {
if (--temp == 0) {
- dev_err (*ohci->hcd.controller, "USB HC reset timed out!");
+ dev_err (ohci->hcd.controller, "USB HC reset timed out!");
return -1;
}
udelay (1);
@@ -594,7 +594,7 @@ static void ohci_stop (struct usb_hcd *hcd)
{
struct ohci_hcd *ohci = hcd_to_ohci (hcd);
- dev_dbg (*hcd->controller, "stop %s controller%s\n",
+ dev_dbg (hcd->controller, "stop %s controller%s\n",
hcfs2string (ohci->hc_control & OHCI_CTRL_HCFS),
ohci->disabled ? " (disabled)" : ""
);
diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
index 167f732be345..a075776c969b 100644
--- a/drivers/usb/host/ohci-hub.c
+++ b/drivers/usb/host/ohci-hub.c
@@ -41,7 +41,7 @@ static u32 roothub_portstatus (struct ohci_hcd *hc, int i)
/*-------------------------------------------------------------------------*/
#define dbg_port(hc,label,num,value) \
- dev_dbg (*hc->hcd.controller, \
+ dev_dbg (hc->hcd.controller, \
"%s roothub.portstatus [%d] " \
"= 0x%08x%s%s%s%s%s%s%s%s%s%s%s%s\n", \
label, num, temp, \
diff --git a/drivers/usb/host/ohci-mem.c b/drivers/usb/host/ohci-mem.c
index f4bc1a75248f..b09df67e59bd 100644
--- a/drivers/usb/host/ohci-mem.c
+++ b/drivers/usb/host/ohci-mem.c
@@ -122,7 +122,7 @@ td_free (struct ohci_hcd *hc, struct td *td)
if (*prev)
*prev = td->td_hash;
else
- dev_dbg (*hc->hcd.controller, "bad hash for td %p\n", td);
+ dev_dbg (hc->hcd.controller, "bad hash for td %p\n", td);
pci_pool_free (hc->td_cache, td, td->td_dma);
}
diff --git a/drivers/usb/host/ohci-q.c b/drivers/usb/host/ohci-q.c
index 1c965df28434..402e245161cb 100644
--- a/drivers/usb/host/ohci-q.c
+++ b/drivers/usb/host/ohci-q.c
@@ -206,7 +206,7 @@ static int ed_schedule (struct ohci_hcd *ohci, struct ed *ed)
default:
branch = balance (ohci, ed->interval, ed->load);
if (branch < 0) {
- dev_dbg (*ohci->hcd.controller,
+ dev_dbg (ohci->hcd.controller,
"ERR %d, interval %d msecs, load %d\n",
branch, ed->interval, ed->load);
// FIXME if there are TDs queued, fail them!
@@ -786,7 +786,7 @@ ed_halted (struct ohci_hcd *ohci, struct td *td, int cc, struct td *rev)
}
/* help for troubleshooting: */
- dev_dbg (urb->dev->dev,
+ dev_dbg (&urb->dev->dev,
"urb %p usb-%s-%s ep-%d-%s cc %d --> status %d\n",
urb,
urb->dev->bus->bus_name, urb->dev->devpath,
diff --git a/drivers/usb/image/Kconfig b/drivers/usb/image/Kconfig
index 0c4c1dfb1d62..860e5c6b53b7 100644
--- a/drivers/usb/image/Kconfig
+++ b/drivers/usb/image/Kconfig
@@ -24,8 +24,8 @@ config USB_SCANNER
depends on USB
help
Say Y here if you want to connect a USB scanner to your computer's
- USB port. Please read <file:Documentation/usb/scanner.txt> and
- <file:Documentation/usb/scanner-hp-sane.txt> for more information.
+ USB port. Please read <file:Documentation/usb/scanner.txt> for more
+ information.
This code is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
diff --git a/drivers/usb/image/mdc800.c b/drivers/usb/image/mdc800.c
index d829ea19f454..4ebfbdec3ff3 100644
--- a/drivers/usb/image/mdc800.c
+++ b/drivers/usb/image/mdc800.c
@@ -673,7 +673,7 @@ static int mdc800_device_release (struct inode* inode, struct file *file)
*/
static ssize_t mdc800_device_read (struct file *file, char *buf, size_t len, loff_t *pos)
{
- int left=len, sts=len; /* single transfer size */
+ size_t left=len, sts=len; /* single transfer size */
char* ptr=buf;
DECLARE_WAITQUEUE(wait, current);
@@ -767,7 +767,7 @@ static ssize_t mdc800_device_read (struct file *file, char *buf, size_t len, lof
*/
static ssize_t mdc800_device_write (struct file *file, const char *buf, size_t len, loff_t *pos)
{
- int i=0;
+ size_t i=0;
DECLARE_WAITQUEUE(wait, current);
down (&mdc800->io_lock);
diff --git a/drivers/usb/image/scanner.c b/drivers/usb/image/scanner.c
index d0fee7cd6061..2f4faf65d067 100644
--- a/drivers/usb/image/scanner.c
+++ b/drivers/usb/image/scanner.c
@@ -1,7 +1,7 @@
/* -*- linux-c -*- */
/*
- * Driver for USB Scanners (linux-2.5.52)
+ * Driver for USB Scanners (linux-2.5.54)
*
* Copyright (C) 1999, 2000, 2001, 2002 David E. Nelson
*
@@ -328,13 +328,21 @@
* - Accept devices with more than one interface. Only use interfaces that
* look like belonging to scanners.
* - Fix compilation error when debugging is enabled.
+ * - Add locking to ioctl_scanner(). Thanks to Oliver Neukum
+ * <oliver@neukum.name>.
*
+ * 0.4.10 01/07/2003
+ * - Added vendor/product ids for Visioneer scanners.
+ * - Print information about user-supplied ids only once at startup instead
+ * of everytime any USB device is plugged in.
+ * - Removed PV8630 ioctls. Use the standard ioctls instead.
+ * - Made endpoint detection more generic. Basically, only one bulk-in
+ * endpoint is required, everything else is optional.
+ *
* TODO
- * - Remove the 2/3 endpoint limitation
* - Performance
* - Select/poll methods
* - More testing
- * - Proper registry/assignment for LM9830 ioctl's
* - More general usage ioctl's
*
*
@@ -713,74 +721,22 @@ ioctl_scanner(struct inode *inode, struct file *file,
{
struct usb_device *dev;
struct scn_usb_data *scn = file->private_data;
+ int retval = -ENOTTY;
int scn_minor;
scn_minor = USB_SCN_MINOR(inode);
+ down(&(scn->sem));
dev = scn->scn_dev;
switch (cmd)
{
case SCANNER_IOCTL_VENDOR :
- return (put_user(dev->descriptor.idVendor, (unsigned int *) arg));
+ retval = (put_user(dev->descriptor.idVendor, (unsigned int *) arg));
+ break;
case SCANNER_IOCTL_PRODUCT :
- return (put_user(dev->descriptor.idProduct, (unsigned int *) arg));
-#ifdef PV8630
- case PV8630_IOCTL_INREQUEST :
- {
- int result;
-
- struct {
- __u8 data;
- __u8 request;
- __u16 value;
- __u16 index;
- } args;
-
- if (copy_from_user(&args, (void *)arg, sizeof(args)))
- return -EFAULT;
-
- result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
- args.request, USB_TYPE_VENDOR|
- USB_RECIP_DEVICE|USB_DIR_IN,
- args.value, args.index, &args.data,
- 1, HZ*5);
-
- dbg("ioctl_scanner(%d): inreq: args.data:%x args.value:%x args.index:%x args.request:%x\n", scn_minor, args.data, args.value, args.index, args.request);
-
- if (copy_to_user((void *)arg, &args, sizeof(args)))
- return -EFAULT;
-
- dbg("ioctl_scanner(%d): inreq: result:%d\n", scn_minor, result);
-
- return result;
- }
- case PV8630_IOCTL_OUTREQUEST :
- {
- int result;
-
- struct {
- __u8 request;
- __u16 value;
- __u16 index;
- } args;
-
- if (copy_from_user(&args, (void *)arg, sizeof(args)))
- return -EFAULT;
-
- dbg("ioctl_scanner(%d): outreq: args.value:%x args.index:%x args.request:%x\n", scn_minor, args.value, args.index, args.request);
-
- result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
- args.request, USB_TYPE_VENDOR|
- USB_RECIP_DEVICE|USB_DIR_OUT,
- args.value, args.index, NULL,
- 0, HZ*5);
-
- dbg("ioctl_scanner(%d): outreq: result:%d\n", scn_minor, result);
-
- return result;
- }
-#endif /* PV8630 */
+ retval = (put_user(dev->descriptor.idProduct, (unsigned int *) arg));
+ break;
case SCANNER_IOCTL_CTRLMSG:
{
struct ctrlmsg_ioctl {
@@ -789,19 +745,26 @@ ioctl_scanner(struct inode *inode, struct file *file,
} cmsg;
int pipe, nb, ret;
unsigned char buf[64];
-
- if (copy_from_user(&cmsg, (void *)arg, sizeof(cmsg)))
- return -EFAULT;
+ retval = 0;
+
+ if (copy_from_user(&cmsg, (void *)arg, sizeof(cmsg))) {
+ retval = -EFAULT;
+ break;
+ }
nb = cmsg.req.wLength;
- if (nb > sizeof(buf))
- return -EINVAL;
+ if (nb > sizeof(buf)) {
+ retval = -EINVAL;
+ break;
+ }
if ((cmsg.req.bRequestType & 0x80) == 0) {
pipe = usb_sndctrlpipe(dev, 0);
- if (nb > 0 && copy_from_user(buf, cmsg.data, nb))
- return -EFAULT;
+ if (nb > 0 && copy_from_user(buf, cmsg.data, nb)) {
+ retval = -EFAULT;
+ break;
+ }
} else {
pipe = usb_rcvctrlpipe(dev, 0);
}
@@ -814,18 +777,20 @@ ioctl_scanner(struct inode *inode, struct file *file,
if (ret < 0) {
err("ioctl_scanner(%d): control_msg returned %d\n", scn_minor, ret);
- return -EIO;
+ retval = -EIO;
+ break;
}
if (nb > 0 && (cmsg.req.bRequestType & 0x80) && copy_to_user(cmsg.data, buf, nb))
- return -EFAULT;
+ retval = -EFAULT;
- return 0;
+ break;
}
default:
- return -ENOTTY;
+ break;
}
- return 0;
+ up(&(scn->sem));
+ return retval;
}
static struct
@@ -856,10 +821,6 @@ probe_scanner(struct usb_interface *intf,
char have_bulk_in, have_bulk_out, have_intr;
char name[10];
- if (vendor != -1 && product != -1) {
- info("probe_scanner: User specified USB scanner -- Vendor:Product - %x:%x", vendor, product);
- }
-
dbg("probe_scanner: USB dev address:%p", dev);
/*
@@ -913,45 +874,52 @@ probe_scanner(struct usb_interface *intf,
if (interface[0].desc.bInterfaceClass != USB_CLASS_VENDOR_SPEC &&
interface[0].desc.bInterfaceClass != USB_CLASS_PER_INTERFACE &&
- interface[0].desc.bInterfaceClass != 16) {
+ interface[0].desc.bInterfaceClass != SCN_CLASS_SCANJET) {
dbg("probe_scanner: This interface doesn't look like a scanner (class=0x%x).", interface[0].desc.bInterfaceClass);
return -ENODEV;
}
/*
- * Start checking for one or two bulk endpoints and an optional
- * interrupt endpoint. If we have an interrupt endpoint go ahead and
+ * Start checking for bulk and interrupt endpoints. We are only using the first
+ * one of each type of endpoint. If we have an interrupt endpoint go ahead and
* setup the handler. FIXME: This is a future enhancement...
*/
dbg("probe_scanner: Number of Endpoints:%d", (int) interface->desc.bNumEndpoints);
- if ((interface->desc.bNumEndpoints < 1) || (interface->desc.bNumEndpoints > 3)) {
- info("probe_scanner: Only 1, 2, or 3 endpoints supported.");
- return -ENODEV;
- }
-
ep_cnt = have_bulk_in = have_bulk_out = have_intr = 0;
while (ep_cnt < interface->desc.bNumEndpoints) {
endpoint = &interface->endpoint[ep_cnt].desc;
- if (!have_bulk_in && IS_EP_BULK_IN(endpoint)) {
+ if (IS_EP_BULK_IN(endpoint)) {
ep_cnt++;
+ if (have_bulk_in) {
+ info ("probe_scanner: ignoring additional bulk_in_ep:%d", ep_cnt);
+ continue;
+ }
have_bulk_in = ep_cnt;
dbg("probe_scanner: bulk_in_ep:%d", have_bulk_in);
continue;
}
- if (!have_bulk_out && IS_EP_BULK_OUT(endpoint)) {
+ if (IS_EP_BULK_OUT(endpoint)) {
ep_cnt++;
+ if (have_bulk_out) {
+ info ("probe_scanner: ignoring additional bulk_out_ep:%d", ep_cnt);
+ continue;
+ }
have_bulk_out = ep_cnt;
dbg("probe_scanner: bulk_out_ep:%d", have_bulk_out);
continue;
}
- if (!have_intr && IS_EP_INTR(endpoint)) {
+ if (IS_EP_INTR(endpoint)) {
ep_cnt++;
+ if (have_intr) {
+ info ("probe_scanner: ignoring additional intr_ep:%d", ep_cnt);
+ continue;
+ }
have_intr = ep_cnt;
dbg("probe_scanner: intr_ep:%d", have_intr);
continue;
@@ -966,31 +934,11 @@ probe_scanner(struct usb_interface *intf,
* should have.
*/
- switch(interface->desc.bNumEndpoints) {
- case 1:
- if (!have_bulk_in) {
- info("probe_scanner: One bulk-in endpoint required.");
- return -EIO;
- }
- break;
- case 2:
- if (!have_bulk_in || !have_bulk_out) {
- info("probe_scanner: Two bulk endpoints required.");
- return -EIO;
- }
- break;
- case 3:
- if (!have_bulk_in || !have_bulk_out || !have_intr) {
- info("probe_scanner: Two bulk endpoints and one interrupt endpoint required.");
- return -EIO;
- }
- break;
- default:
- info("probe_scanner: Endpoint determination failed -- consult Documentation/usb/scanner.txt");
+ if (!have_bulk_in) {
+ err("probe_scanner: One bulk-in endpoint required.");
return -EIO;
}
-
/*
* Determine a minor number and initialize the structure associated
* with it. The problem with this is that we are counting on the fact
@@ -1069,7 +1017,6 @@ probe_scanner(struct usb_interface *intf,
break;
case 0x055f: /* Mustek */
case 0x0400: /* Another Mustek */
- case 0x0ff5: /* And yet another Mustek */
scn->rd_nak_timeout = HZ * 1;
default:
scn->rd_nak_timeout = RD_NAK_TIMEOUT;
@@ -1171,6 +1118,8 @@ usb_scanner_init (void)
return -1;
info(DRIVER_VERSION ":" DRIVER_DESC);
+ if (vendor != -1 && product != -1)
+ info("probe_scanner: User specified USB scanner -- Vendor:Product - %x:%x", vendor, product);
return 0;
}
diff --git a/drivers/usb/image/scanner.h b/drivers/usb/image/scanner.h
index f95980c5e7aa..6defdf138a90 100644
--- a/drivers/usb/image/scanner.h
+++ b/drivers/usb/image/scanner.h
@@ -1,5 +1,5 @@
/*
- * Driver for USB Scanners (linux-2.5.52)
+ * Driver for USB Scanners (linux-2.5.54)
*
* Copyright (C) 1999, 2000, 2001, 2002 David E. Nelson
*
@@ -38,13 +38,7 @@
// #define DEBUG
-/* Enable this to support the older ioctl interfaces scanners that
- * a PV8630 Scanner-On-Chip. The prefered method is the
- * SCANNER_IOCTL_CTRLMSG ioctl.
- */
-// #define PV8630
-
-#define DRIVER_VERSION "0.4.9"
+#define DRIVER_VERSION "0.4.10"
#define DRIVER_DESC "USB Scanner Driver"
#include <linux/usb.h>
@@ -122,6 +116,7 @@ static struct usb_device_id scanner_device_ids [] = {
{ USB_DEVICE(0x0458, 0x2016) }, /* ColorPage-HR6X */
/* Hewlett Packard */
{ USB_DEVICE(0x03f0, 0x0505) }, /* ScanJet 2100C */
+ { USB_DEVICE(0x03f0, 0x0605) }, /* 2200C */
{ USB_DEVICE(0x03f0, 0x0901) }, /* 2300C */
{ USB_DEVICE(0x03f0, 0x0205) }, /* 3300C */
{ USB_DEVICE(0x03f0, 0x0405) }, /* 3400C */
@@ -134,7 +129,6 @@ static struct usb_device_id scanner_device_ids [] = {
// { USB_DEVICE(0x03f0, 0x0701) }, /* 5300C - NOT SUPPORTED - see http://www.neatech.nl/oss/HP5300C/ */
{ USB_DEVICE(0x03f0, 0x0201) }, /* 6200C */
{ USB_DEVICE(0x03f0, 0x0601) }, /* 6300C */
- { USB_DEVICE(0x03f0, 0x605) }, /* 2200C */
/* iVina */
{ USB_DEVICE(0x0638, 0x0268) }, /* 1200U */
/* Lexmark */
@@ -242,6 +236,8 @@ static struct usb_device_id scanner_device_ids [] = {
{ USB_DEVICE(0x04a7, 0x0311) }, /* 6200 EPP/USB */
{ USB_DEVICE(0x04a7, 0x0321) }, /* OneTouch 8100 EPP/USB */
{ USB_DEVICE(0x04a7, 0x0331) }, /* OneTouch 8600 EPP/USB */
+ { USB_DEVICE(0x0461, 0x0345) }, /* 6200 (actually Primax?) */
+ { USB_DEVICE(0x0461, 0x0371) }, /* Onetouch 8920 USB (actually Primax?) */
{ } /* Terminating entry */
};
@@ -268,19 +264,15 @@ MODULE_DEVICE_TABLE (usb, scanner_device_ids);
#define RD_EXPIRE 12 /* Number of attempts to wait X seconds */
-/* FIXME: These are NOT registered ioctls()'s */
-#ifdef PV8630
-#define PV8630_IOCTL_INREQUEST 69
-#define PV8630_IOCTL_OUTREQUEST 70
-#endif /* PV8630 */
-
-
/* read vendor and product IDs from the scanner */
#define SCANNER_IOCTL_VENDOR _IOR('U', 0x20, int)
#define SCANNER_IOCTL_PRODUCT _IOR('U', 0x21, int)
/* send/recv a control message to the scanner */
#define SCANNER_IOCTL_CTRLMSG _IOWR('U', 0x22, struct usb_ctrlrequest)
+/* USB bInterfaceClass used by Hewlett-Packard ScanJet 3300c and Genius HR6
+ USB - Vivid III */
+#define SCN_CLASS_SCANJET 16
#ifdef CONFIG_USB_DYNAMIC_MINORS
#define SCN_MAX_MNR 256
diff --git a/drivers/usb/input/pid.c b/drivers/usb/input/pid.c
index 6752f17b9df6..ad838ccede15 100644
--- a/drivers/usb/input/pid.c
+++ b/drivers/usb/input/pid.c
@@ -48,9 +48,7 @@
/* Called when a transfer is completed */
static void hid_pid_ctrl_out(struct urb *u, struct pt_regs *regs)
{
-#ifdef DEBUG
- printk("hid_pid_ctrl_out - Transfer Completed\n");
-#endif
+ dev_dbg(&u->dev->dev, "hid_pid_ctrl_out - Transfer Completed\n");
}
static void hid_pid_exit(struct hid_device* hid)
@@ -64,32 +62,29 @@ static void hid_pid_exit(struct hid_device* hid)
}
static int pid_upload_periodic(struct hid_ff_pid *pid, struct ff_effect *effect, int is_update) {
-
- printk("Requested periodic force upload\n");
+ dev_info(&pid->hid->dev->dev, "requested periodic force upload\n");
return 0;
}
static int pid_upload_constant(struct hid_ff_pid *pid, struct ff_effect *effect, int is_update) {
- printk("Requested constant force upload\n");
+ dev_info(&pid->hid->dev->dev, "requested constant force upload\n");
return 0;
}
static int pid_upload_condition(struct hid_ff_pid *pid, struct ff_effect *effect, int is_update) {
- printk("Requested Condition force upload\n");
+ dev_info(&pid->hid->dev->dev, "requested Condition force upload\n");
return 0;
}
static int pid_upload_ramp(struct hid_ff_pid *pid, struct ff_effect *effect, int is_update) {
- printk("Request ramp force upload\n");
+ dev_info(&pid->hid->dev->dev, "request ramp force upload\n");
return 0;
}
static int hid_pid_event(struct hid_device *hid, struct input_dev *input,
unsigned int type, unsigned int code, int value)
{
-#ifdef DEBUG
- printk ("PID event received: type=%d,code=%d,value=%d.\n",type,code,value);
-#endif
+ dev_dbg(&hid->dev->dev, "PID event received: type=%d,code=%d,value=%d.\n", type, code, value);
if (type != EV_FF)
return -1;
@@ -127,20 +122,20 @@ static int hid_pid_erase(struct input_dev *dev, int id)
/* Find report */
ret = hid_find_report_by_usage(hid, wanted_report, &report, HID_OUTPUT_REPORT);
if(!ret) {
- printk("Couldn't find report\n");
+ dev_err(&hid->dev->dev, "couldn't find report\n");
return ret;
}
/* Find field */
field = (struct hid_field *) kmalloc(sizeof(struct hid_field), GFP_KERNEL);
if(!field) {
- printk("Couldn't allocate field\n");
+ dev_err(&hid->dev->dev, "couldn't allocate field\n");
return -ENOMEM;
}
ret = hid_set_field(field, ret, pid->effects[id].device_id);
if(!ret) {
- printk("Couldn't set field\n");
+ dev_err(&hid->dev->dev, "couldn't set field\n");
return ret;
}
@@ -169,7 +164,7 @@ static int hid_pid_flush(struct input_dev *dev, struct file *file)
if ( current->pid == pid->effects[i].owner
&& test_bit(FF_PID_FLAGS_USED, &pid->effects[i].flags))
if (hid_pid_erase(dev, i))
- warn("erase effect %d failed", i);
+ dev_warn(&hid->dev->dev, "erase effect %d failed", i);
return 0;
}
@@ -183,14 +178,10 @@ static int hid_pid_upload_effect(struct input_dev *dev,
int is_update;
int flags=0;
-#ifdef DEBUG
- printk("Upload effect called: effect_type=%x\n",effect->type);
-#endif
+ dev_dbg(&pid_private->hid->dev->dev, "upload effect called: effect_type=%x\n",effect->type);
/* Check this effect type is supported by this device */
if (!test_bit(effect->type, dev->ffbit)) {
-#ifdef DEBUG
- printk("Invalid kind of effect requested.\n");
-#endif
+ dev_dbg(&pid_private->hid->dev->dev, "invalid kind of effect requested.\n");
return -EINVAL;
}
@@ -209,16 +200,12 @@ static int hid_pid_upload_effect(struct input_dev *dev,
if ( id == FF_EFFECTS_MAX) {
// TEMP - We need to get ff_effects_max correctly first: || id >= dev->ff_effects_max) {
-#ifdef DEBUG
- printk("Not enough device memory\n");
-#endif
+ dev_dbg(&pid_private->hid->dev->dev, "Not enough device memory\n");
return -ENOMEM;
}
effect->id = id;
-#ifdef DEBUG
- printk("Effect ID is %d\n.",id);
-#endif
+ dev_dbg(&pid_private->hid->dev->dev, "effect ID is %d\n.",id);
pid_private->effects[id].owner = current->pid;
pid_private->effects[id].flags = (1<<FF_PID_FLAGS_USED);
spin_unlock_irqrestore(&pid_private->lock,flags);
@@ -265,9 +252,7 @@ static int hid_pid_upload_effect(struct input_dev *dev,
break;
default:
-#ifdef DEBUG
- printk("Invalid type of effect requested - %x.\n", effect->type);
-#endif
+ dev_dbg(&pid_private->hid->dev->dev, "invalid type of effect requested - %x.\n", effect->type);
return -EINVAL;
}
/* If a packet was sent, forbid new updates until we are notified
diff --git a/drivers/usb/misc/Makefile b/drivers/usb/misc/Makefile
index 18567cbf915f..e333dbe6d07b 100644
--- a/drivers/usb/misc/Makefile
+++ b/drivers/usb/misc/Makefile
@@ -3,14 +3,14 @@
# (the ones that don't fit into any other categories)
#
-export-objs := atmsar.o
-
obj-$(CONFIG_USB_AUERSWALD) += auerswald.o
obj-$(CONFIG_USB_BRLVGER) += brlvger.o
obj-$(CONFIG_USB_EMI26) += emi26.o
obj-$(CONFIG_USB_LCD) += usblcd.o
obj-$(CONFIG_USB_RIO500) += rio500.o
-obj-$(CONFIG_USB_SPEEDTOUCH) += speedtouch.o atmsar.o
+obj-$(CONFIG_USB_SPEEDTOUCH) += speedtch.o
obj-$(CONFIG_USB_TEST) += usbtest.o
obj-$(CONFIG_USB_TIGL) += tiglusb.o
obj-$(CONFIG_USB_USS720) += uss720.o
+
+speedtch-objs := speedtouch.o atmsar.o
diff --git a/drivers/usb/misc/atmsar.c b/drivers/usb/misc/atmsar.c
index 9bed94f13175..79ccb77c46b5 100644
--- a/drivers/usb/misc/atmsar.c
+++ b/drivers/usb/misc/atmsar.c
@@ -1,81 +1,77 @@
+/******************************************************************************
+ * atmsar.c -- General SAR library for ATM devices.
+ *
+ * Copyright (C) 2000, Johan Verrept
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ ******************************************************************************/
+
/*
- * General SAR library for ATM devices.
- *
- * Written By Johan Verrept ( Johan.Verrept@advalvas.be )
+ * Written by Johan Verrept (Johan.Verrept@advalvas.be)
*
- * Copyright (c) 2000, Johan Verrept
+ * 0.2.4A: - Version for inclusion in 2.5 series kernel
+ * - Modifications by Richard Purdie (rpurdie@rpsys.net)
+ * - replaced "sarlib" with "atmsar"
+ * - adaptations for inclusion in kernel tree
*
- * This code falls under the GNU General Public License, see COPYING for details
+ * 0.2.4: - Fixed wrong buffer overrun check in atmsar_decode_rawcell()
+ * reported by Stephen Robinson <stephen.robinson@zen.co.uk>
+ * - Fixed bug when input skb did not contain a multple of 52/53
+ * bytes (would happen when the speedtouch device resynced)
+ * also reported by Stephen Robinson <stephen.robinson@zen.co.uk>
*
- * This package is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-Version 0.2.4A:
- - Version for inclusion in 2.5 series kernel
- - Modifcations by Richard Purdie (rpurdie@rpsys.net)
- - replaced "sarlib" with "atmsar"
- - adaptations for inclusion in kernel tree
-
-Version 0.2.4:
- - Fixed wrong buffer overrun check in atmsar_decode_rawcell()
- reported by Stephen Robinson <stephen.robinson@zen.co.uk>
- - Fixed bug when input skb did not contain a multple of 52/53 bytes.
- (would happen when the speedtouch device resynced)
- also reported by Stephen Robinson <stephen.robinson@zen.co.uk>
-
-Version 0.2.3:
- - Fixed wrong allocation size. caused memory corruption in some
- cases. Reported by Vladimir Dergachev <volodya@mindspring.com>
- - Added some comments
-
-Version 0.2.2:
- - Fixed CRCASM (patch from Linus Flannagan <linusf@netservices.eng.net>)
- - Fixed problem when user did NOT use the ATMSAR_USE_53BYTE_CELL flag.
- (reported by Piers Scannell <email@lot105.com> )
- - No more in-buffer rewriting for cloned buffers.
- - Removed the PII specific CFLAGS in the Makefile.
-
-Version 0.2.1:
- - removed dependancy on alloc_tx. tis presented problems when using
- this with the br2684 code.
-
-Version 0.2:
- - added AAL0 reassembly
- - added alloc_tx support
- - replaced alloc_skb in decode functions to dev_alloc_skb to allow
- calling from interrupt
- - fixed embarassing AAL5 bug. I was setting the pti bit in the wrong
- byte...
- - fixed another emabrassing bug.. picked up the wrong crc type and
- forgot to invert the crc result...
- - fixed AAL5 length calculations.
- - removed automatic skb freeing from encode functions.
- This caused problems because i did kfree_skb it, while it
- needed to be popped. I cannot determine though whether it
- needs to be popped or not. Figu'e it out ye'self ;-)
- - added mru field. This is the buffersize. atmsar_decode_aal0 will
- use when it allocates a receive buffer. A stop gap for real
- buffer management.
-
-Version 0.1:
- - library created.
- - only contains AAL5, AAL0 can be easily added. ( actually, only
- AAL0 reassembly is missing)
-*/
+ * 0.2.3: - Fixed wrong allocation size. caused memory corruption in some
+ * cases. Reported by Vladimir Dergachev <volodya@mindspring.com>
+ * - Added some comments
+ *
+ * 0.2.2: - Fixed CRCASM
+ * patch from Linus Flannagan <linusf@netservices.eng.net>
+ * - Fixed problem when user did NOT use the
+ * ATMSAR_USE_53BYTE_CELL flag.
+ * reported by Piers Scannell <email@lot105.com>
+ * - No more in-buffer rewriting for cloned buffers.
+ * - Removed the PII specific CFLAGS in the Makefile.
+ *
+ * 0.2.1: - removed dependancy on alloc_tx. tis presented problems when
+ * using this with the br2684 code.
+ *
+ * 0.2: - added AAL0 reassembly
+ * - added alloc_tx support
+ * - replaced alloc_skb in decode functions to dev_alloc_skb to
+ * allow calling from interrupt
+ * - fixed embarassing AAL5 bug. I was setting the pti bit in the
+ * wrong byte...
+ * - fixed another emabrassing bug.. picked up the wrong crc type
+ * and forgot to invert the crc result...
+ * - fixed AAL5 length calculations.
+ * - removed automatic skb freeing from encode functions.
+ * This caused problems because i did kfree_skb it, while it
+ * needed to be popped. I cannot determine though whether it
+ * needs to be popped or not. Figu'e it out ye'self ;-)
+ * - added mru field. This is the buffersize. atmsar_decode_aal0
+ * will use when it allocates a receive buffer. A stop gap for
+ * real buffer management.
+ *
+ * 0.1: - library created.
+ * - only contains AAL5, AAL0 can be easily added. (actually, only
+ * AAL0 reassembly is missing)
+ *
+ */
#include "atmsar.h"
-#include <linux/module.h>
-#include <linux/init.h>
-
-#define DRIVER_AUTHOR "Johan Verrept, Johan.Verrept@advalvas.be"
-#define DRIVER_DESC "General SAR library for ATM devices"
-#define DRIVER_VERSION "0.2.4A"
/***********************
**
@@ -220,7 +216,7 @@ unsigned long calc_crc (char *mem, int len, unsigned initial)
#define crc32( crc, mem, len) calc_crc(mem, len, crc);
-/* initialiation routines. not used at the moment
+/* initialization routines. not used at the moment
* I will avoid these as long as possible !!
*/
@@ -302,7 +298,7 @@ struct atmsar_vcc_data *atmsar_open (struct atmsar_vcc_data **list, struct atm_v
/*
* This gives problems with the ATM layer alloc_tx().
* It is not usable from interrupt context and for
- * some reason this is used in interurpt context
+ * some reason this is used in interrupt context
* with br2684.c
*
if (vcc->alloc_tx)
@@ -587,7 +583,7 @@ struct sk_buff *atmsar_decode_rawcell (struct atmsar_vcc_data *list, struct sk_b
vcc->reasBuffer = dev_alloc_skb (vcc->mtu);
/* if alloc fails, we just drop the cell. it is possible that we can still
- * receive cells on other vcc's
+ * receive cells on other vcc's
*/
if (vcc->reasBuffer) {
/* if (buffer overrun) discard received cells until now */
@@ -693,28 +689,3 @@ struct sk_buff *atmsar_decode_aal5 (struct atmsar_vcc_data *ctx, struct sk_buff
PDEBUG ("atmsar_decode_aal5 returns pdu 0x%p with length %d\n", skb, skb->len);
return skb;
};
-
-
-static int start (void)
-{
- return 0;
-}
-
-static void cleanup (void)
-{
-}
-
-module_init (start);
-module_exit (cleanup);
-
-EXPORT_SYMBOL (atmsar_open);
-EXPORT_SYMBOL (atmsar_close);
-EXPORT_SYMBOL (atmsar_encode_rawcell);
-EXPORT_SYMBOL (atmsar_encode_aal5);
-EXPORT_SYMBOL (atmsar_decode_rawcell);
-EXPORT_SYMBOL (atmsar_decode_aal5);
-EXPORT_SYMBOL (atmsar_alloc_tx);
-
-MODULE_AUTHOR (DRIVER_AUTHOR);
-MODULE_DESCRIPTION (DRIVER_DESC);
-MODULE_LICENSE ("GPL");
diff --git a/drivers/usb/misc/atmsar.h b/drivers/usb/misc/atmsar.h
index e7f05dc307af..d15342b671c1 100644
--- a/drivers/usb/misc/atmsar.h
+++ b/drivers/usb/misc/atmsar.h
@@ -1,15 +1,26 @@
-/*
+#ifndef _ATMSAR_H_
+#define _ATMSAR_H_
+
+/******************************************************************************
+ * atmsar.h -- General SAR library for ATM devices.
*
- * General SAR library for ATM devices.
+ * Copyright (C) 2000, Johan Verrept
*
- * Copyright (c) 2000, Johan Verrept
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
*
- * This code falls under the GNU General Public License, see COPYING for details.
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
*
- */
-
-#ifndef _ATMSAR_H_
-#define _ATMSAR_H_
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ ******************************************************************************/
#include <linux/kernel.h>
#include <linux/proc_fs.h>
diff --git a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c
index 48b0e8ba6a81..c9f43dc14f0b 100644
--- a/drivers/usb/misc/auerswald.c
+++ b/drivers/usb/misc/auerswald.c
@@ -1946,9 +1946,6 @@ static int auerswald_probe (struct usb_interface *intf,
if (intf->altsetting->desc.bInterfaceNumber != 0)
return -ENODEV;
- /* prevent module unloading while sleeping */
- MOD_INC_USE_COUNT;
-
/* allocate memory for our device and intialize it */
cp = kmalloc (sizeof(auerswald_t), GFP_KERNEL);
if (cp == NULL) {
@@ -2066,7 +2063,6 @@ static int auerswald_probe (struct usb_interface *intf,
/* Error exit: clean up the memory */
pfail: auerswald_delete (cp);
- MOD_DEC_USE_COUNT;
return -EIO;
}
@@ -2138,9 +2134,6 @@ static void auerswald_disconnect (struct usb_interface *intf)
if (scp) scp->disconnect( scp);
}
}
-
- /* The device releases this module */
- MOD_DEC_USE_COUNT;
}
/* Descriptor for the devices which are served by this driver.
diff --git a/drivers/usb/misc/brlvger.c b/drivers/usb/misc/brlvger.c
index 4c8191072665..5438c6a4306b 100644
--- a/drivers/usb/misc/brlvger.c
+++ b/drivers/usb/misc/brlvger.c
@@ -467,8 +467,6 @@ brlvger_open(struct inode *inode, struct file *file)
n = devnum - BRLVGER_MINOR;
- MOD_INC_USE_COUNT;
-
do {
down(&disconnect_sem);
priv = display_table[n];
@@ -478,7 +476,6 @@ brlvger_open(struct inode *inode, struct file *file)
if (file->f_flags & O_NONBLOCK) {
dbg3("Failing non-blocking open: "
"device %d not connected", n);
- MOD_DEC_USE_COUNT;
return -EAGAIN;
}
/* Blocking open. One global wait queue will
@@ -490,7 +487,6 @@ brlvger_open(struct inode *inode, struct file *file)
!= NULL);
if(ret) {
dbg2("Interrupted wait for device %d", n);
- MOD_DEC_USE_COUNT;
return ret;
}
}
@@ -504,7 +500,7 @@ brlvger_open(struct inode *inode, struct file *file)
/* Only one process can open each device, no sharing. */
ret = -EBUSY;
if(priv->opened)
- goto error;
+ goto out;
dbg("Opening display %d", priv->subminor);
@@ -512,7 +508,7 @@ brlvger_open(struct inode *inode, struct file *file)
priv->intr_urb = usb_alloc_urb(0, GFP_KERNEL);
if(!priv->intr_urb) {
err("Unable to allocate URB");
- goto error;
+ goto out;
}
usb_fill_int_urb( priv->intr_urb, priv->dev,
usb_rcvintpipe(priv->dev,
@@ -521,19 +517,19 @@ brlvger_open(struct inode *inode, struct file *file)
intr_callback, priv, priv->in_interrupt->bInterval);
if((ret = usb_submit_urb(priv->intr_urb, GFP_KERNEL)) <0){
err("Error %d while submitting URB", ret);
- goto error;
+ goto out;
}
/* Set voltage */
if(brlvger_set_display_voltage(priv, raw_voltage) <0) {
err("Unable to set voltage");
- goto error;
+ goto out;
}
/* Turn display on */
if((ret = brlvger_set_display_on_off(priv, 1)) <0) {
err("Error %d while turning display on", ret);
- goto error;
+ goto out;
}
/* Mark as opened, so disconnect cannot free priv. */
@@ -544,8 +540,6 @@ brlvger_open(struct inode *inode, struct file *file)
ret = 0;
goto out;
- error:
- MOD_DEC_USE_COUNT;
out:
up(&priv->open_sem);
return ret;
@@ -577,8 +571,6 @@ brlvger_release(struct inode *inode, struct file *file)
up(&priv->open_sem);
}
- MOD_DEC_USE_COUNT;
-
return 0;
}
@@ -589,7 +581,8 @@ brlvger_write(struct file *file, const char *buffer,
struct brlvger_priv *priv = file->private_data;
char buf[MAX_BRLVGER_CELLS];
int ret;
- int rs, off;
+ size_t rs;
+ loff_t off;
__u16 written;
if(!priv->dev)
diff --git a/drivers/usb/misc/rio500.c b/drivers/usb/misc/rio500.c
index 9c8e01184393..18f15014c21f 100644
--- a/drivers/usb/misc/rio500.c
+++ b/drivers/usb/misc/rio500.c
@@ -94,8 +94,6 @@ static int open_rio(struct inode *inode, struct file *file)
init_waitqueue_head(&rio->wait_q);
- MOD_INC_USE_COUNT;
-
unlock_kernel();
info("Rio opened.");
@@ -109,8 +107,6 @@ static int close_rio(struct inode *inode, struct file *file)
rio->isopen = 0;
- MOD_DEC_USE_COUNT;
-
info("Rio closed.");
return 0;
}
@@ -443,6 +439,7 @@ read_rio(struct file *file, char *buffer, size_t count, loff_t * ppos)
static struct
file_operations usb_rio_fops = {
+ .owner = THIS_MODULE,
.read = read_rio,
.write = write_rio,
.ioctl = ioctl_rio,
diff --git a/drivers/usb/misc/speedtouch.c b/drivers/usb/misc/speedtouch.c
index 601686c3b71c..a0794c9167ea 100644
--- a/drivers/usb/misc/speedtouch.c
+++ b/drivers/usb/misc/speedtouch.c
@@ -1,31 +1,49 @@
+/******************************************************************************
+ * speedtouch.c -- Alcatel SpeedTouch USB xDSL modem driver.
+ *
+ * Copyright (C) 2001, Alcatel
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59
+ * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ ******************************************************************************/
+
/*
- * Driver Module for Alcatel SpeedTouch USB xDSL modem
- * Copyright 2001, Alcatel
* Written by Johan Verrept (Johan.Verrept@advalvas.be)
*
-
-1.5A: - Version for inclusion in 2.5 series kernel
- - Modifcations by Richard Purdie (rpurdie@rpsys.net)
- - made compatible with kernel 2.5.6 onwards by changing
- udsl_usb_send_data_context->urb changed to a pointer
- and adding code to alloc and free it
- - remove_wait_queue() added to udsl_atm_processqueue_thread()
-
-1.5: - fixed memory leak when atmsar_decode_aal5 returned NULL.
- (reported by stephen.robinson@zen.co.uk)
-
-1.4: - changed the spin_lock() under interrupt to spin_lock_irqsave()
- - unlink all active send urbs of a vcc that is being closed.
-
-1.3.1: - added the version number
-
-1.3: - Added multiple send urb support
- - fixed memory leak and vcc->tx_inuse starvation bug
- when not enough memory left in vcc.
-
-1.2: - Fixed race condition in udsl_usb_send_data()
-1.1: - Turned off packet debugging
-
+ * 1.5A: - Version for inclusion in 2.5 series kernel
+ * - Modifications by Richard Purdie (rpurdie@rpsys.net)
+ * - made compatible with kernel 2.5.6 onwards by changing
+ * udsl_usb_send_data_context->urb to a pointer and adding code
+ * to alloc and free it
+ * - remove_wait_queue() added to udsl_atm_processqueue_thread()
+ *
+ * 1.5: - fixed memory leak when atmsar_decode_aal5 returned NULL.
+ * (reported by stephen.robinson@zen.co.uk)
+ *
+ * 1.4: - changed the spin_lock() under interrupt to spin_lock_irqsave()
+ * - unlink all active send urbs of a vcc that is being closed.
+ *
+ * 1.3.1: - added the version number
+ *
+ * 1.3: - Added multiple send urb support
+ * - fixed memory leak and vcc->tx_inuse starvation bug
+ * when not enough memory left in vcc.
+ *
+ * 1.2: - Fixed race condition in udsl_usb_send_data()
+ * 1.1: - Turned off packet debugging
+ *
*/
#include <linux/module.h>
@@ -44,8 +62,6 @@
#include <linux/atmdev.h>
#include "atmsar.h"
-const char *udsl_version = "1.5A";
-
/*
#define DEBUG 1
#define DEBUG_PACKET 1
@@ -736,7 +752,7 @@ void udsl_usb_data_receive (struct urb *urb, struct pt_regs *regs)
case -ENOENT: /* buffer was unlinked */
case -EILSEQ: /* unplug or timeout */
case -ETIMEDOUT: /* unplug or timeout */
- /*
+ /*
* we don't do anything here and we don't resubmit
*/
return;
@@ -1007,11 +1023,11 @@ static void udsl_usb_disconnect (struct usb_interface *intf)
*
****************************************************************************/
-static int udsl_usb_init (void)
+static int __init udsl_usb_init (void)
{
int i;
- PDEBUG ("Initializing SpeedTouch Driver Version %s\n", udsl_version);
+ PDEBUG ("Initializing SpeedTouch Driver Version " DRIVER_VERSION "\n");
for (i = 0; i < MAX_UDSL; i++)
minor_data[i] = NULL;
@@ -1022,7 +1038,7 @@ static int udsl_usb_init (void)
return usb_register (&udsl_usb_driver);
}
-static void udsl_usb_cleanup (void)
+static void __exit udsl_usb_cleanup (void)
{
/* killing threads */
udsl_atm_sar_stop ();
@@ -1035,7 +1051,7 @@ module_exit(udsl_usb_cleanup);
#ifdef DEBUG_PACKET
/*******************************************************************************
*
-* Debug
+* Debug
*
*******************************************************************************/
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
index 289ab9c6dc69..ce51a14eba0b 100644
--- a/drivers/usb/misc/usbtest.c
+++ b/drivers/usb/misc/usbtest.c
@@ -546,7 +546,300 @@ static int ch9_postconfig (struct usbtest_dev *dev)
/*-------------------------------------------------------------------------*/
-// control queueing !!
+/* use ch9 requests to test whether:
+ * (a) queues work for control, keeping N subtests queued and
+ * active (auto-resubmit) for M loops through the queue.
+ * (b) protocol stalls (control-only) will autorecover.
+ * it's quite not like bulk/intr; no halt clearing.
+ * (c) short control reads are reported and handled.
+ */
+
+struct ctrl_ctx {
+ spinlock_t lock;
+ struct usbtest_dev *dev;
+ struct completion complete;
+ unsigned count;
+ unsigned pending;
+ int status;
+ struct urb **urb;
+ struct usbtest_param *param;
+};
+
+static void ctrl_complete (struct urb *urb, struct pt_regs *regs)
+{
+ struct ctrl_ctx *ctx = urb->context;
+ struct usb_ctrlrequest *reqp;
+ int status = urb->status;
+
+ reqp = (struct usb_ctrlrequest *)urb->setup_packet;
+
+ spin_lock (&ctx->lock);
+ ctx->count--;
+ ctx->pending--;
+
+ /* FIXME verify that the completions are in the right sequence.
+ * we could store the test number with the setup packet, that
+ * buffer has extra space.
+ */
+
+ switch (status) {
+ case 0: /* success */
+ case -EREMOTEIO: /* short read */
+ if (reqp->bRequestType == (USB_DIR_IN|USB_RECIP_DEVICE)
+ && reqp->bRequest == USB_REQ_GET_DESCRIPTOR
+ && ((le16_to_cpu (reqp->wValue) >> 8)
+ == USB_DT_DEVICE)) {
+ if (reqp->wLength > USB_DT_DEVICE_SIZE
+ && status == -EREMOTEIO)
+ status = 0;
+ else if (reqp->wLength == USB_DT_DEVICE_SIZE
+ && status != 0)
+ status = -EIO;
+ if (status)
+ goto error;
+ }
+ break;
+ case -ECONNRESET: /* async unlink */
+ break;
+ case -EPIPE: /* (protocol) stall */
+ if (reqp->bRequestType == (USB_DIR_IN|USB_RECIP_INTERFACE)
+ && reqp->bRequest == USB_REQ_GET_INTERFACE)
+ status = 0;
+ else if (reqp->bRequestType == (USB_DIR_IN|USB_RECIP_DEVICE)
+ && reqp->bRequest == USB_REQ_GET_DESCRIPTOR) {
+ switch (le16_to_cpu (reqp->wValue) >> 8) {
+ case USB_DT_DEVICE_QUALIFIER:
+ case USB_DT_OTHER_SPEED_CONFIG:
+ case USB_DT_INTERFACE:
+ case USB_DT_ENDPOINT:
+ status = 0;
+ }
+ } else if (reqp->bRequestType == USB_RECIP_ENDPOINT
+ && reqp->bRequest == USB_REQ_CLEAR_FEATURE)
+ status = 0;
+ /* some stalls we plan on; others would be errors */
+ if (status == 0)
+ break;
+ /* else FALLTHROUGH */
+error:
+ default: /* this fault's an error */
+ if (ctx->status == 0) {
+ int i;
+
+ ctx->status = status;
+ info ("control queue %02x.%02x, err %d, %d left",
+ reqp->bRequestType, reqp->bRequest,
+ status, ctx->count);
+
+ /* FIXME use this "unlink everything" exit route
+ * in all cases, not just for fault cleanup.
+ * it'll be another test mode, but one that makes
+ * testing be more consistent.
+ */
+
+ /* unlink whatever's still pending */
+ for (i = 0; i < ctx->param->sglen; i++) {
+ struct urb *u = ctx->urb [i];
+
+ if (u == urb || !u->dev)
+ continue;
+ status = usb_unlink_urb (u);
+ switch (status) {
+ case -EINPROGRESS:
+ case -EBUSY:
+ continue;
+ default:
+ dbg ("urb unlink --> %d", status);
+ }
+ }
+ status = ctx->status;
+ }
+ }
+
+ /* resubmit if we need to, else mark this as done */
+ if ((status == 0) && (ctx->pending < ctx->count)) {
+ if ((status = usb_submit_urb (urb, SLAB_ATOMIC)) != 0) {
+ dbg ("can't resubmit ctrl %02x.%02x, err %d",
+ reqp->bRequestType, reqp->bRequest, status);
+ urb->dev = 0;
+ } else
+ ctx->pending++;
+ } else
+ urb->dev = 0;
+
+ /* signal completion when nothing's queued */
+ if (ctx->pending == 0)
+ complete (&ctx->complete);
+ spin_unlock (&ctx->lock);
+}
+
+static int
+test_ctrl_queue (struct usbtest_dev *dev, struct usbtest_param *param)
+{
+ struct usb_device *udev = testdev_to_usbdev (dev);
+ struct urb **urb;
+ struct ctrl_ctx context;
+ int i;
+
+ spin_lock_init (&context.lock);
+ context.dev = dev;
+ init_completion (&context.complete);
+ context.count = param->sglen * param->iterations;
+ context.pending = 0;
+ context.status = -ENOMEM;
+ context.param = param;
+
+ /* allocate and init the urbs we'll queue.
+ * as with bulk/intr sglists, sglen is the queue depth; it also
+ * controls which subtests run (more tests than sglen) or rerun.
+ */
+ urb = kmalloc (param->sglen * sizeof (struct urb *), SLAB_KERNEL);
+ if (!urb)
+ goto cleanup;
+ memset (urb, 0, param->sglen * sizeof (struct urb *));
+ for (i = 0; i < param->sglen; i++) {
+ int pipe = usb_rcvctrlpipe (udev, 0);
+ unsigned len;
+ struct urb *u;
+ struct usb_ctrlrequest req, *reqp;
+
+ /* requests here are mostly expected to succeed on any
+ * device, but some are chosen to trigger protocol stalls
+ * or short reads.
+ */
+ memset (&req, 0, sizeof req);
+ req.bRequest = USB_REQ_GET_DESCRIPTOR;
+ req.bRequestType = USB_DIR_IN|USB_RECIP_DEVICE;
+
+ switch (i % 12 /* number of subtest cases here */) {
+ case 0: // get device descriptor
+ req.wValue = cpu_to_le16 (USB_DT_DEVICE << 8);
+ len = sizeof (struct usb_device_descriptor);
+ break;
+ case 1: // get first config descriptor (only)
+ req.wValue = cpu_to_le16 ((USB_DT_CONFIG << 8) | 0);
+ len = sizeof (struct usb_config_descriptor);
+ break;
+ case 2: // get altsetting (OFTEN STALLS)
+ req.bRequest = USB_REQ_GET_INTERFACE;
+ req.bRequestType = USB_DIR_IN|USB_RECIP_INTERFACE;
+ // index = 0 means first interface
+ len = 1;
+ break;
+ case 3: // get interface status
+ req.bRequest = USB_REQ_GET_STATUS;
+ req.bRequestType = USB_DIR_IN|USB_RECIP_INTERFACE;
+ // interface 0
+ len = 2;
+ break;
+ case 4: // get device status
+ req.bRequest = USB_REQ_GET_STATUS;
+ req.bRequestType = USB_DIR_IN|USB_RECIP_DEVICE;
+ len = 2;
+ break;
+ case 5: // get device qualifier (MAY STALL)
+ req.wValue = cpu_to_le16 (USB_DT_DEVICE_QUALIFIER << 8);
+ len = sizeof (struct usb_qualifier_descriptor);
+ break;
+ case 6: // get first config descriptor, plus interface
+ req.wValue = cpu_to_le16 ((USB_DT_CONFIG << 8) | 0);
+ len = sizeof (struct usb_config_descriptor);
+ len += sizeof (struct usb_interface_descriptor);
+ break;
+ case 7: // get interface descriptor (ALWAYS STALLS)
+ req.wValue = cpu_to_le16 (USB_DT_INTERFACE << 8);
+ // interface == 0
+ len = sizeof (struct usb_interface_descriptor);
+ break;
+ // NOTE: two consecutive stalls in the queue here.
+ // that tests fault recovery a bit more aggressively.
+ case 8: // clear endpoint halt (USUALLY STALLS)
+ req.bRequest = USB_REQ_CLEAR_FEATURE;
+ req.bRequestType = USB_RECIP_ENDPOINT;
+ // wValue 0 == ep halt
+ // wIndex 0 == ep0 (shouldn't halt!)
+ len = 0;
+ pipe = usb_sndctrlpipe (udev, 0);
+ break;
+ case 9: // get endpoint status
+ req.bRequest = USB_REQ_GET_STATUS;
+ req.bRequestType = USB_DIR_IN|USB_RECIP_ENDPOINT;
+ // endpoint 0
+ len = 2;
+ break;
+ case 10: // trigger short read (EREMOTEIO)
+ req.wValue = cpu_to_le16 ((USB_DT_CONFIG << 8) | 0);
+ len = 1024;
+ break;
+ // NOTE: two consecutive _different_ faults in the queue.
+ case 11: // get endpoint descriptor (ALWAYS STALLS)
+ req.wValue = cpu_to_le16 (USB_DT_ENDPOINT << 8);
+ // endpoint == 0
+ len = sizeof (struct usb_interface_descriptor);
+ break;
+ // NOTE: sometimes even a third fault in the queue!
+ case 12: // get string 0 descriptor (MAY STALL)
+ req.wValue = cpu_to_le16 (USB_DT_STRING << 8);
+ // string == 0, for language IDs
+ len = sizeof (struct usb_interface_descriptor);
+ break;
+ default:
+ err ("bogus number of ctrl queue testcases!");
+ context.status = -EINVAL;
+ goto cleanup;
+ }
+ req.wLength = cpu_to_le16 (len);
+ urb [i] = u = simple_alloc_urb (udev, pipe, len);
+ if (!u)
+ goto cleanup;
+
+ reqp = usb_buffer_alloc (udev, sizeof req, SLAB_KERNEL,
+ &u->setup_dma);
+ if (!reqp)
+ goto cleanup;
+ *reqp = req;
+ u->setup_packet = (char *) reqp;
+
+ u->context = &context;
+ u->complete = ctrl_complete;
+ u->transfer_flags |= URB_ASYNC_UNLINK;
+ }
+
+ /* queue the urbs */
+ context.urb = urb;
+ spin_lock_irq (&context.lock);
+ for (i = 0; i < param->sglen; i++) {
+ context.status = usb_submit_urb (urb [i], SLAB_ATOMIC);
+ if (context.status != 0) {
+ dbg ("can't submit urb[%d], status %d",
+ i, context.status);
+ context.count = context.pending;
+ break;
+ }
+ context.pending++;
+ }
+ spin_unlock_irq (&context.lock);
+
+ /* FIXME set timer and time out; provide a disconnect hook */
+
+ /* wait for the last one to complete */
+ wait_for_completion (&context.complete);
+
+cleanup:
+ for (i = 0; i < param->sglen; i++) {
+ if (!urb [i])
+ continue;
+ urb [i]->dev = udev;
+ if (urb [i]->setup_packet)
+ usb_buffer_free (udev, sizeof (struct usb_ctrlrequest),
+ urb [i]->setup_packet,
+ urb [i]->setup_dma);
+ simple_free_urb (urb [i]);
+ }
+ kfree (urb);
+ return context.status;
+}
+
/*-------------------------------------------------------------------------*/
@@ -830,7 +1123,16 @@ usbtest_ioctl (struct usb_interface *intf, unsigned int code, void *buf)
dbg ("ch9 subset failed, iterations left %d", i);
break;
- // case 10: queued control
+ /* queued control messaging */
+ case 10:
+ if (param->sglen == 0)
+ break;
+ retval = 0;
+ dbg ("%s TEST 10: queue %d control calls, %d times",
+ dev->id, param->sglen,
+ param->iterations);
+ retval = test_ctrl_queue (dev, param);
+ break;
/* simple non-queued unlinks (ring with one urb) */
case 11:
diff --git a/drivers/usb/net/kaweth.c b/drivers/usb/net/kaweth.c
index 6fe19a3ca9f6..a67307b3c566 100644
--- a/drivers/usb/net/kaweth.c
+++ b/drivers/usb/net/kaweth.c
@@ -703,7 +703,7 @@ static void kaweth_usb_transmit_complete(struct urb *urb, struct pt_regs *regs)
kaweth_dbg("%s: TX status %d.", kaweth->net->name, urb->status);
netif_wake_queue(kaweth->net);
- dev_kfree_skb(skb);
+ dev_kfree_skb_irq(skb);
}
/****************************************************************
@@ -721,7 +721,7 @@ static int kaweth_start_xmit(struct sk_buff *skb, struct net_device *net)
if (kaweth->removed) {
/* our device is undergoing disconnection - we bail out */
spin_unlock(&kaweth->device_lock);
- dev_kfree_skb(skb);
+ dev_kfree_skb_irq(skb);
return 0;
}
@@ -733,7 +733,7 @@ static int kaweth_start_xmit(struct sk_buff *skb, struct net_device *net)
/* no such luck - we make our own */
struct sk_buff *copied_skb;
copied_skb = skb_copy_expand(skb, 2, 0, GFP_ATOMIC);
- dev_kfree_skb_any(skb);
+ dev_kfree_skb_irq(skb);
skb = copied_skb;
if (!copied_skb) {
kaweth->stats.tx_errors++;
@@ -763,7 +763,7 @@ static int kaweth_start_xmit(struct sk_buff *skb, struct net_device *net)
kaweth->stats.tx_errors++;
netif_start_queue(net);
- dev_kfree_skb(skb);
+ dev_kfree_skb_irq(skb);
}
else
{
diff --git a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c
index 8efd680e7b70..138ca704f779 100644
--- a/drivers/usb/net/pegasus.c
+++ b/drivers/usb/net/pegasus.c
@@ -45,7 +45,7 @@
/*
* Version Information
*/
-#define DRIVER_VERSION "v0.5.8 (2002/12/13)"
+#define DRIVER_VERSION "v0.5.9 (2002/12/31)"
#define DRIVER_AUTHOR "Petko Manolov <petkan@users.sourceforge.net>"
#define DRIVER_DESC "Pegasus/Pegasus II USB Ethernet driver"
@@ -866,6 +866,9 @@ static int pegasus_open(struct net_device *net)
return -ENOMEM;
down(&pegasus->sem);
+
+ set_registers(pegasus, EthID, 6, net->dev_addr);
+
usb_fill_bulk_urb(pegasus->rx_urb, pegasus->usb,
usb_rcvbulkpipe(pegasus->usb, 1),
pegasus->rx_skb->data, PEGASUS_MTU + 8,
diff --git a/drivers/usb/net/pegasus.h b/drivers/usb/net/pegasus.h
index 476cbeb92b97..3a9fcb7be035 100644
--- a/drivers/usb/net/pegasus.h
+++ b/drivers/usb/net/pegasus.h
@@ -239,8 +239,8 @@ PEGASUS_DEV( "Linksys USB100TX", VENDOR_LINKSYS, 0x2203,
LINKSYS_GPIO_RESET )
PEGASUS_DEV( "Linksys USB100TX", VENDOR_LINKSYS, 0x2204,
LINKSYS_GPIO_RESET | HAS_HOME_PNA )
-PEGASUS_DEV( "Linksys USB Ethernet Adapter", VENDOR_LINKSYS, 0x2206,
- LINKSYS_GPIO_RESET )
+PEGASUS_DEV( "Linksys USB10T Ethernet Adapter", VENDOR_LINKSYS, 0x2206,
+ LINKSYS_GPIO_RESET | PEGASUS_II)
PEGASUS_DEV( "Linksys USB USB100TX", VENDOR_LINKSYS, 0x400b,
LINKSYS_GPIO_RESET | PEGASUS_II )
PEGASUS_DEV( "Linksys USB10TX", VENDOR_LINKSYS, 0x200c,
diff --git a/drivers/usb/net/rtl8150.c b/drivers/usb/net/rtl8150.c
index d430dbd6e338..741130ec8744 100644
--- a/drivers/usb/net/rtl8150.c
+++ b/drivers/usb/net/rtl8150.c
@@ -21,7 +21,7 @@
#include <asm/uaccess.h>
/* Version Information */
-#define DRIVER_VERSION "v0.5.6 (2002/09/19)"
+#define DRIVER_VERSION "v0.5.7 (2002/12/31)"
#define DRIVER_AUTHOR "Petko Manolov <petkan@users.sourceforge.net>"
#define DRIVER_DESC "rtl8150 based usb-ethernet driver"
@@ -640,6 +640,9 @@ static int rtl8150_open(struct net_device *netdev)
return -ENOMEM;
down(&dev->sem);
+
+ set_registers(dev, IDR, 6, netdev->dev_addr);
+
usb_fill_bulk_urb(dev->rx_urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1),
dev->rx_skb->data, RTL8150_MTU, read_bulk_callback, dev);
if ((res = usb_submit_urb(dev->rx_urb, GFP_KERNEL)))
diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c
index f28782b6cc9f..398aa567d6ba 100644
--- a/drivers/usb/net/usbnet.c
+++ b/drivers/usb/net/usbnet.c
@@ -1363,6 +1363,16 @@ static const struct driver_info zaurus_sla300_info = {
.in = 1, .out = 2,
.epsize = 64,
};
+static const struct driver_info zaurus_slb500_info = {
+ /* Japanese B500 ~= US SL-5600 */
+ .description = "Sharp Zaurus SL-B500",
+ .flags = FLAG_FRAMING_Z,
+ .check_connect = always_connected,
+ .tx_fixup = zaurus_tx_fixup,
+
+ .in = 1, .out = 2,
+ .epsize = 64,
+};
// SL-5600 and C-700 are PXA based; should resemble A300
@@ -2331,8 +2341,7 @@ static const struct usb_device_id products [] = {
.bInterfaceSubClass = 0x00,
.bInterfaceProtocol = 0x00,
.driver_info = (unsigned long) &zaurus_sl5x00_info,
-},
-{
+}, {
.match_flags = USB_DEVICE_ID_MATCH_INT_INFO
| USB_DEVICE_ID_MATCH_DEVICE,
.idVendor = 0x04DD,
@@ -2341,6 +2350,15 @@ static const struct usb_device_id products [] = {
.bInterfaceSubClass = 0x0a,
.bInterfaceProtocol = 0x00,
.driver_info = (unsigned long) &zaurus_sla300_info,
+}, {
+ .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
+ | USB_DEVICE_ID_MATCH_DEVICE,
+ .idVendor = 0x04DD,
+ .idProduct = 0x8006,
+ .bInterfaceClass = 0x02,
+ .bInterfaceSubClass = 0x0a,
+ .bInterfaceProtocol = 0x00,
+ .driver_info = (unsigned long) &zaurus_slb500_info,
},
#endif
diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c
index dbc09ec31dd5..6691ceb54e50 100644
--- a/drivers/usb/serial/bus.c
+++ b/drivers/usb/serial/bus.c
@@ -66,7 +66,7 @@ static int usb_serial_device_probe (struct device *dev)
driver = port->serial->type;
if (driver->port_probe) {
if (!try_module_get(driver->owner)) {
- dev_err(*dev, "module get failed, exiting\n");
+ dev_err(dev, "module get failed, exiting\n");
retval = -EIO;
goto exit;
}
@@ -79,7 +79,8 @@ static int usb_serial_device_probe (struct device *dev)
minor = port->number;
tty_register_device (&usb_serial_tty_driver, minor);
- dev_info(*dev, "%s converter now attached to ttyUSB%d (or usb/tts/%d for devfs)\n",
+ dev_info(&port->serial->dev->dev,
+ "%s converter now attached to ttyUSB%d (or usb/tts/%d for devfs)\n",
driver->name, minor, minor);
exit:
@@ -101,7 +102,7 @@ static int usb_serial_device_remove (struct device *dev)
driver = port->serial->type;
if (driver->port_remove) {
if (!try_module_get(driver->owner)) {
- dev_err(*dev, "module get failed, exiting\n");
+ dev_err(dev, "module get failed, exiting\n");
retval = -EIO;
goto exit;
}
@@ -111,7 +112,7 @@ static int usb_serial_device_remove (struct device *dev)
exit:
minor = port->number;
tty_unregister_device (&usb_serial_tty_driver, minor);
- dev_info(*dev, "%s converter now disconnected from ttyUSB%d\n",
+ dev_info(dev, "%s converter now disconnected from ttyUSB%d\n",
driver->name, minor);
return retval;
diff --git a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c
index 984f1708ef78..4c3c605e6083 100644
--- a/drivers/usb/serial/empeg.c
+++ b/drivers/usb/serial/empeg.c
@@ -181,7 +181,7 @@ static int empeg_open (struct usb_serial_port *port, struct file *filp)
result = usb_submit_urb(port->read_urb, GFP_KERNEL);
if (result)
- dev_err(port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
+ dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
return result;
}
@@ -205,7 +205,7 @@ static void empeg_close (struct usb_serial_port *port, struct file * filp)
usb_unlink_urb (port->read_urb);
}
/* Uncomment the following line if you want to see some statistics in your syslog */
- /* dev_info (port->dev, "Bytes In = %d Bytes Out = %d\n", bytes_in, bytes_out); */
+ /* dev_info (&port->dev, "Bytes In = %d Bytes Out = %d\n", bytes_in, bytes_out); */
}
@@ -248,7 +248,7 @@ static int empeg_write (struct usb_serial_port *port, int from_user, const unsig
if (urb->transfer_buffer == NULL) {
urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_ATOMIC);
if (urb->transfer_buffer == NULL) {
- dev_err(port->dev, "%s no more kernel memory...\n", __FUNCTION__);
+ dev_err(&port->dev, "%s no more kernel memory...\n", __FUNCTION__);
goto exit;
}
}
@@ -278,7 +278,7 @@ static int empeg_write (struct usb_serial_port *port, int from_user, const unsig
/* send it down the pipe */
status = usb_submit_urb(urb, GFP_ATOMIC);
if (status) {
- dev_err(port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n", __FUNCTION__, status);
+ dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n", __FUNCTION__, status);
bytes_sent = status;
break;
}
@@ -426,7 +426,7 @@ static void empeg_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
- dev_err(urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+ dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
return;
@@ -451,7 +451,7 @@ static void empeg_unthrottle (struct usb_serial_port *port)
result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
- dev_err(port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
+ dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
return;
}
diff --git a/drivers/usb/serial/ezusb.c b/drivers/usb/serial/ezusb.c
index ad567d566953..676d9650f186 100644
--- a/drivers/usb/serial/ezusb.c
+++ b/drivers/usb/serial/ezusb.c
@@ -41,7 +41,7 @@ int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *da
transfer_buffer = kmalloc (length, GFP_KERNEL);
if (!transfer_buffer) {
- dev_err(serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, length);
+ dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, length);
return -ENOMEM;
}
memcpy (transfer_buffer, data, length);
@@ -56,7 +56,7 @@ int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit)
dbg("%s - %d", __FUNCTION__, reset_bit);
response = ezusb_writememory (serial, CPUCS_REG, &reset_bit, 1, 0xa0);
if (response < 0) {
- dev_err(serial->dev->dev, "%s- %d failed\n", __FUNCTION__, reset_bit);
+ dev_err(&serial->dev->dev, "%s- %d failed\n", __FUNCTION__, reset_bit);
}
return response;
}
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index ae5bdb865bdc..d70f850f843b 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -106,7 +106,7 @@ int usb_serial_generic_open (struct usb_serial_port *port, struct file *filp)
port);
result = usb_submit_urb(port->read_urb, GFP_KERNEL);
if (result)
- dev_err(port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+ dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
}
return result;
@@ -176,7 +176,7 @@ int usb_serial_generic_write (struct usb_serial_port *port, int from_user, const
/* send the data out the bulk port */
result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
if (result)
- dev_err(port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
+ dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
else
result = count;
@@ -266,7 +266,7 @@ void usb_serial_generic_read_bulk_callback (struct urb *urb, struct pt_regs *reg
usb_serial_generic_read_bulk_callback), port);
result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
- dev_err(port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+ dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
}
void usb_serial_generic_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
index 6e0efdfd5bb2..8a01a00ce822 100644
--- a/drivers/usb/serial/io_edgeport.c
+++ b/drivers/usb/serial/io_edgeport.c
@@ -572,7 +572,7 @@ static void update_edgeport_E2PROM (struct edgeport_serial *edge_serial)
record = (struct edge_firmware_image_record *)firmware;
response = rom_write (edge_serial->serial, record->ExtAddr, record->Addr, record->Len, &record->Data[0]);
if (response < 0) {
- dev_err(edge_serial->serial->dev->dev, "sram_write failed (%x, %x, %d)\n", record->ExtAddr, record->Addr, record->Len);
+ dev_err(&edge_serial->serial->dev->dev, "sram_write failed (%x, %x, %d)\n", record->ExtAddr, record->Addr, record->Len);
break;
}
firmware += sizeof (struct edge_firmware_image_record) + record->Len;
@@ -840,7 +840,7 @@ static void edge_interrupt_callback (struct urb *urb, struct pt_regs *regs)
exit:
result = usb_submit_urb (urb, GFP_ATOMIC);
if (result) {
- dev_err(urb->dev->dev, "%s - Error %d submitting control urb\n", __FUNCTION__, result);
+ dev_err(&urb->dev->dev, "%s - Error %d submitting control urb\n", __FUNCTION__, result);
}
}
@@ -889,7 +889,7 @@ static void edge_bulk_in_callback (struct urb *urb, struct pt_regs *regs)
edge_serial->read_urb->dev = edge_serial->serial->dev;
status = usb_submit_urb(edge_serial->read_urb, GFP_ATOMIC);
if (status) {
- dev_err(urb->dev->dev, "%s - usb_submit_urb(read bulk) failed, status = %d\n", __FUNCTION__, status);
+ dev_err(&urb->dev->dev, "%s - usb_submit_urb(read bulk) failed, status = %d\n", __FUNCTION__, status);
}
}
}
@@ -1057,7 +1057,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
* this interrupt will continue as long as the edgeport is connected */
response = usb_submit_urb (edge_serial->interrupt_read_urb, GFP_KERNEL);
if (response) {
- dev_err(port->dev, "%s - Error %d submitting control urb\n", __FUNCTION__, response);
+ dev_err(&port->dev, "%s - Error %d submitting control urb\n", __FUNCTION__, response);
}
}
@@ -1081,7 +1081,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
response = send_iosp_ext_cmd (edge_port, IOSP_CMD_OPEN_PORT, 0);
if (response < 0) {
- dev_err(port->dev, "%s - error sending open port command\n", __FUNCTION__);
+ dev_err(&port->dev, "%s - error sending open port command\n", __FUNCTION__);
edge_port->openPending = FALSE;
return -ENODEV;
}
@@ -1450,7 +1450,7 @@ static void send_more_port_data(struct edgeport_serial *edge_serial, struct edge
count = fifo->count;
buffer = kmalloc (count+2, GFP_ATOMIC);
if (buffer == NULL) {
- dev_err(edge_serial->serial->dev->dev, "%s - no more kernel memory...\n", __FUNCTION__);
+ dev_err(&edge_serial->serial->dev->dev, "%s - no more kernel memory...\n", __FUNCTION__);
edge_port->write_in_progress = FALSE;
return;
}
@@ -2143,7 +2143,7 @@ static void process_rcvd_status (struct edgeport_serial *edge_serial, __u8 byte2
}
edge_port = usb_get_serial_port_data(port);
if (edge_port == NULL) {
- dev_err(edge_serial->serial->dev->dev, "%s - edge_port == NULL for port %d\n", __FUNCTION__, edge_serial->rxPort);
+ dev_err(&edge_serial->serial->dev->dev, "%s - edge_port == NULL for port %d\n", __FUNCTION__, edge_serial->rxPort);
return;
}
@@ -2330,7 +2330,7 @@ static int sram_write (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u
transfer_buffer = kmalloc (64, GFP_KERNEL);
if (!transfer_buffer) {
- dev_err(serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
+ dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
return -ENOMEM;
}
@@ -2375,7 +2375,7 @@ static int rom_write (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u1
transfer_buffer = kmalloc (64, GFP_KERNEL);
if (!transfer_buffer) {
- dev_err(serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
+ dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
return -ENOMEM;
}
@@ -2420,7 +2420,7 @@ static int rom_read (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u16
transfer_buffer = kmalloc (64, GFP_KERNEL);
if (!transfer_buffer) {
- dev_err(serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
+ dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 64);
return -ENOMEM;
}
@@ -2463,7 +2463,7 @@ static int send_iosp_ext_cmd (struct edgeport_port *edge_port, __u8 command, __u
buffer = kmalloc (10, GFP_ATOMIC);
if (!buffer) {
- dev_err(edge_port->port->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 10);
+ dev_err(&edge_port->port->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 10);
return -ENOMEM;
}
@@ -2554,14 +2554,14 @@ static int send_cmd_write_baud_rate (struct edgeport_port *edge_port, int baudRa
status = calc_baud_rate_divisor (baudRate, &divisor);
if (status) {
- dev_err(edge_port->port->dev, "%s - bad baud rate\n", __FUNCTION__);
+ dev_err(&edge_port->port->dev, "%s - bad baud rate\n", __FUNCTION__);
return status;
}
// Alloc memory for the string of commands.
cmdBuffer = kmalloc (0x100, GFP_ATOMIC);
if (!cmdBuffer) {
- dev_err(edge_port->port->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 0x100);
+ dev_err(&edge_port->port->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 0x100);
return -ENOMEM;
}
currCmd = cmdBuffer;
@@ -2838,7 +2838,7 @@ static void get_manufacturing_desc (struct edgeport_serial *edge_serial)
(__u8 *)(&edge_serial->manuf_descriptor));
if (response < 1) {
- dev_err(edge_serial->serial->dev->dev, "error in getting manufacturer descriptor\n");
+ dev_err(&edge_serial->serial->dev->dev, "error in getting manufacturer descriptor\n");
} else {
char string[30];
dbg("**Manufacturer Descriptor");
@@ -2877,7 +2877,7 @@ static void get_boot_desc (struct edgeport_serial *edge_serial)
(__u8 *)(&edge_serial->boot_descriptor));
if (response < 1) {
- dev_err(edge_serial->serial->dev->dev, "error in getting boot descriptor\n");
+ dev_err(&edge_serial->serial->dev->dev, "error in getting boot descriptor\n");
} else {
dbg("**Boot Descriptor:");
dbg(" BootCodeLength: %d", edge_serial->boot_descriptor.BootCodeLength);
@@ -2938,7 +2938,7 @@ static void load_application_firmware (struct edgeport_serial *edge_serial)
record = (struct edge_firmware_image_record *)firmware;
response = sram_write (edge_serial->serial, record->ExtAddr, record->Addr, record->Len, &record->Data[0]);
if (response < 0) {
- dev_err(edge_serial->serial->dev->dev, "sram_write failed (%x, %x, %d)\n", record->ExtAddr, record->Addr, record->Len);
+ dev_err(&edge_serial->serial->dev->dev, "sram_write failed (%x, %x, %d)\n", record->ExtAddr, record->Addr, record->Len);
break;
}
firmware += sizeof (struct edge_firmware_image_record) + record->Len;
@@ -2974,7 +2974,7 @@ static int edge_startup (struct usb_serial *serial)
/* create our private serial structure */
edge_serial = kmalloc (sizeof(struct edgeport_serial), GFP_KERNEL);
if (edge_serial == NULL) {
- dev_err(serial->dev->dev, "%s - Out of memory", __FUNCTION__);
+ dev_err(&serial->dev->dev, "%s - Out of memory", __FUNCTION__);
return -ENOMEM;
}
memset (edge_serial, 0, sizeof(struct edgeport_serial));
@@ -2988,7 +2988,7 @@ static int edge_startup (struct usb_serial *serial)
get_string(dev, dev->descriptor.iProduct, &edge_serial->name[i]);
- dev_info(serial->dev->dev, "%s detected\n", edge_serial->name);
+ dev_info(&serial->dev->dev, "%s detected\n", edge_serial->name);
/* get the manufacturing descriptor for this device */
get_manufacturing_desc (edge_serial);
@@ -3030,7 +3030,7 @@ static int edge_startup (struct usb_serial *serial)
for (i = 0; i < serial->num_ports; ++i) {
edge_port = kmalloc (sizeof(struct edgeport_port), GFP_KERNEL);
if (edge_port == NULL) {
- dev_err(serial->dev->dev, "%s - Out of memory", __FUNCTION__);
+ dev_err(&serial->dev->dev, "%s - Out of memory", __FUNCTION__);
usb_set_serial_data(serial, NULL);
kfree(edge_serial);
return -ENOMEM;
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c
index c2b110225712..7ba4d95425d4 100644
--- a/drivers/usb/serial/io_ti.c
+++ b/drivers/usb/serial/io_ti.c
@@ -473,7 +473,7 @@ static int TIIsTxActive (struct edgeport_port *port)
oedb = kmalloc (sizeof (* oedb), GFP_KERNEL);
if (!oedb) {
- dev_err (port->port->dev, "%s - out of memory\n", __FUNCTION__);
+ dev_err (&port->port->dev, "%s - out of memory\n", __FUNCTION__);
return -ENOMEM;
}
@@ -592,7 +592,7 @@ static int TIChooseConfiguration (struct usb_device *dev)
dbg ("%s - MAX Power = %d", __FUNCTION__, dev->config->desc.bMaxPower*2);
if (dev->config->desc.bNumInterfaces != 1) {
- dev_err (dev->dev, "%s - bNumInterfaces is not 1, ERROR!\n", __FUNCTION__);
+ dev_err (&dev->dev, "%s - bNumInterfaces is not 1, ERROR!\n", __FUNCTION__);
return -ENODEV;
}
@@ -692,12 +692,12 @@ static int TiValidateI2cImage (struct edgeport_serial *serial)
rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL);
if (!rom_desc) {
- dev_err (*dev, "%s - out of memory\n", __FUNCTION__);
+ dev_err (dev, "%s - out of memory\n", __FUNCTION__);
return -ENOMEM;
}
buffer = kmalloc (TI_MAX_I2C_SIZE, GFP_KERNEL);
if (!buffer) {
- dev_err (*dev, "%s - out of memory when allocating buffer\n", __FUNCTION__);
+ dev_err (dev, "%s - out of memory when allocating buffer\n", __FUNCTION__);
kfree (rom_desc);
return -ENOMEM;
}
@@ -708,7 +708,7 @@ static int TiValidateI2cImage (struct edgeport_serial *serial)
goto ExitTiValidateI2cImage;
if (*buffer != 0x52) {
- dev_err (*dev, "%s - invalid buffer signature\n", __FUNCTION__);
+ dev_err (dev, "%s - invalid buffer signature\n", __FUNCTION__);
status = -ENODEV;
goto ExitTiValidateI2cImage;
}
@@ -766,7 +766,7 @@ static int TIReadManufDescriptor (struct edgeport_serial *serial, __u8 *buffer)
rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL);
if (!rom_desc) {
- dev_err (serial->serial->dev->dev, "%s - out of memory\n", __FUNCTION__);
+ dev_err (&serial->serial->dev->dev, "%s - out of memory\n", __FUNCTION__);
return -ENOMEM;
}
start_address = TIGetDescriptorAddress (serial, I2C_DESC_TYPE_ION, rom_desc);
@@ -823,7 +823,7 @@ static int BuildI2CFirmwareHeader (__u8 *header, struct device *dev)
buffer = kmalloc (buffer_size, GFP_KERNEL);
if (!buffer) {
- dev_err (*dev, "%s - out of memory\n", __FUNCTION__);
+ dev_err (dev, "%s - out of memory\n", __FUNCTION__);
return -ENOMEM;
}
@@ -984,7 +984,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
interface = &serial->serial->dev->config->interface->altsetting->desc;
if (!interface) {
- dev_err (serial->serial->dev->dev, "%s - no interface set, error!", __FUNCTION__);
+ dev_err (&serial->serial->dev->dev, "%s - no interface set, error!", __FUNCTION__);
return -ENODEV;
}
@@ -1021,7 +1021,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
*/
ti_manuf_desc = kmalloc (sizeof (*ti_manuf_desc), GFP_KERNEL);
if (!ti_manuf_desc) {
- dev_err (*dev, "%s - out of memory.\n", __FUNCTION__);
+ dev_err (dev, "%s - out of memory.\n", __FUNCTION__);
return -ENOMEM;
}
status = TIReadManufDescriptor (serial, (__u8 *)ti_manuf_desc);
@@ -1040,7 +1040,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
rom_desc = kmalloc (sizeof (*rom_desc), GFP_KERNEL);
if (!rom_desc) {
- dev_err (*dev, "%s - out of memory.\n", __FUNCTION__);
+ dev_err (dev, "%s - out of memory.\n", __FUNCTION__);
kfree (ti_manuf_desc);
return -ENOMEM;
}
@@ -1054,7 +1054,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
firmware_version = kmalloc (sizeof (*firmware_version), GFP_KERNEL);
if (!firmware_version) {
- dev_err (*dev, "%s - out of memory.\n", __FUNCTION__);
+ dev_err (dev, "%s - out of memory.\n", __FUNCTION__);
kfree (rom_desc);
kfree (ti_manuf_desc);
return -ENOMEM;
@@ -1131,7 +1131,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
}
if (record != I2C_DESC_TYPE_FIRMWARE_BLANK) {
- dev_err (*dev, "%s - error resetting device\n", __FUNCTION__);
+ dev_err (dev, "%s - error resetting device\n", __FUNCTION__);
kfree (firmware_version);
kfree (rom_desc);
kfree (ti_manuf_desc);
@@ -1162,7 +1162,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
header = kmalloc (HEADER_SIZE, GFP_KERNEL);
if (!header) {
- dev_err (*dev, "%s - out of memory.\n", __FUNCTION__);
+ dev_err (dev, "%s - out of memory.\n", __FUNCTION__);
kfree (rom_desc);
kfree (ti_manuf_desc);
return -ENOMEM;
@@ -1170,7 +1170,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
vheader = kmalloc (HEADER_SIZE, GFP_KERNEL);
if (!vheader) {
- dev_err (*dev, "%s - out of memory.\n", __FUNCTION__);
+ dev_err (dev, "%s - out of memory.\n", __FUNCTION__);
kfree (header);
kfree (rom_desc);
kfree (ti_manuf_desc);
@@ -1302,7 +1302,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
*/
ti_manuf_desc = kmalloc (sizeof (*ti_manuf_desc), GFP_KERNEL);
if (!ti_manuf_desc) {
- dev_err (*dev, "%s - out of memory.\n", __FUNCTION__);
+ dev_err (dev, "%s - out of memory.\n", __FUNCTION__);
return -ENOMEM;
}
status = TIReadManufDescriptor (serial, (__u8 *)ti_manuf_desc);
@@ -1337,7 +1337,7 @@ static int TIDownloadFirmware (struct edgeport_serial *serial)
buffer_size = (((1024 * 16) - 512) + sizeof(struct ti_i2c_image_header));
buffer = kmalloc (buffer_size, GFP_KERNEL);
if (!buffer) {
- dev_err (*dev, "%s - out of memory\n", __FUNCTION__);
+ dev_err (dev, "%s - out of memory\n", __FUNCTION__);
return -ENOMEM;
}
@@ -1702,7 +1702,7 @@ static void edge_interrupt_callback (struct urb *urb, struct pt_regs *regs)
break;
default:
- dev_err (urb->dev->dev, "%s - Unknown Interrupt code from UMP %x\n",
+ dev_err (&urb->dev->dev, "%s - Unknown Interrupt code from UMP %x\n",
__FUNCTION__, data[1]);
break;
@@ -1711,7 +1711,7 @@ static void edge_interrupt_callback (struct urb *urb, struct pt_regs *regs)
exit:
status = usb_submit_urb (urb, GFP_ATOMIC);
if (status)
- dev_err (urb->dev->dev, "%s - usb_submit_urb failed with result %d\n",
+ dev_err (&urb->dev->dev, "%s - usb_submit_urb failed with result %d\n",
__FUNCTION__, status);
}
@@ -1779,7 +1779,7 @@ exit:
/* continue always trying to read */
status = usb_submit_urb (urb, GFP_ATOMIC);
if (status)
- dev_err (urb->dev->dev, "%s - usb_submit_urb failed with result %d\n",
+ dev_err (&urb->dev->dev, "%s - usb_submit_urb failed with result %d\n",
__FUNCTION__, status);
}
@@ -1855,7 +1855,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
edge_port->dma_address = UMPD_OEDB2_ADDRESS;
break;
default:
- dev_err (port->dev, "Unknown port number!!!\n");
+ dev_err (&port->dev, "Unknown port number!!!\n");
return -ENODEV;
}
@@ -1931,7 +1931,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
/* we are the first port to be opened, let's post the interrupt urb */
urb = edge_serial->serial->port[0].interrupt_in_urb;
if (!urb) {
- dev_err (port->dev, "%s - no interrupt urb present, exiting\n", __FUNCTION__);
+ dev_err (&port->dev, "%s - no interrupt urb present, exiting\n", __FUNCTION__);
return -EINVAL;
}
urb->complete = edge_interrupt_callback;
@@ -1939,7 +1939,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
urb->dev = dev;
status = usb_submit_urb (urb, GFP_KERNEL);
if (status) {
- dev_err (port->dev, "%s - usb_submit_urb failed with value %d\n", __FUNCTION__, status);
+ dev_err (&port->dev, "%s - usb_submit_urb failed with value %d\n", __FUNCTION__, status);
return status;
}
}
@@ -1954,7 +1954,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
/* start up our bulk read urb */
urb = port->read_urb;
if (!urb) {
- dev_err (port->dev, "%s - no read urb present, exiting\n", __FUNCTION__);
+ dev_err (&port->dev, "%s - no read urb present, exiting\n", __FUNCTION__);
return -EINVAL;
}
urb->complete = edge_bulk_in_callback;
@@ -1962,7 +1962,7 @@ static int edge_open (struct usb_serial_port *port, struct file * filp)
urb->dev = dev;
status = usb_submit_urb (urb, GFP_KERNEL);
if (status) {
- dev_err (port->dev, "%s - read bulk usb_submit_urb failed with value %d\n", __FUNCTION__, status);
+ dev_err (&port->dev, "%s - read bulk usb_submit_urb failed with value %d\n", __FUNCTION__, status);
return status;
}
@@ -2072,7 +2072,7 @@ static int edge_write (struct usb_serial_port *port, int from_user, const unsign
/* send the data out the bulk port */
result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
if (result)
- dev_err(port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
+ dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
else
result = count;
@@ -2191,7 +2191,7 @@ static void edge_unthrottle (struct usb_serial_port *port)
port->read_urb->dev = port->serial->dev;
status = usb_submit_urb (port->read_urb, GFP_ATOMIC);
if (status) {
- dev_err (port->dev, "%s - usb_submit_urb failed with value %d\n", __FUNCTION__, status);
+ dev_err (&port->dev, "%s - usb_submit_urb failed with value %d\n", __FUNCTION__, status);
}
}
@@ -2217,7 +2217,7 @@ static void change_port_settings (struct edgeport_port *edge_port, struct termio
config = kmalloc (sizeof (*config), GFP_KERNEL);
if (!config) {
- dev_err (edge_port->port->dev, "%s - out of memory\n", __FUNCTION__);
+ dev_err (&edge_port->port->dev, "%s - out of memory\n", __FUNCTION__);
return;
}
@@ -2590,7 +2590,7 @@ static int edge_startup (struct usb_serial *serial)
/* create our private serial structure */
edge_serial = kmalloc (sizeof(struct edgeport_serial), GFP_KERNEL);
if (edge_serial == NULL) {
- dev_err(serial->dev->dev, "%s - Out of memory\n", __FUNCTION__);
+ dev_err(&serial->dev->dev, "%s - Out of memory\n", __FUNCTION__);
return -ENOMEM;
}
memset (edge_serial, 0, sizeof(struct edgeport_serial));
@@ -2607,7 +2607,7 @@ static int edge_startup (struct usb_serial *serial)
for (i = 0; i < serial->num_ports; ++i) {
edge_port = kmalloc (sizeof(struct edgeport_port), GFP_KERNEL);
if (edge_port == NULL) {
- dev_err(serial->dev->dev, "%s - Out of memory\n", __FUNCTION__);
+ dev_err(&serial->dev->dev, "%s - Out of memory\n", __FUNCTION__);
return -ENOMEM;
}
memset (edge_port, 0, sizeof(struct edgeport_port));
diff --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c
index 6d40da5bd9e7..9381bc4f6023 100644
--- a/drivers/usb/serial/ir-usb.c
+++ b/drivers/usb/serial/ir-usb.c
@@ -243,7 +243,7 @@ static int ir_startup (struct usb_serial *serial)
irda_desc = irda_usb_find_class_desc (serial->dev, 0);
if (irda_desc == NULL) {
- dev_err (serial->dev->dev, "IRDA class descriptor not found, device not bound\n");
+ dev_err (&serial->dev->dev, "IRDA class descriptor not found, device not bound\n");
return -ENODEV;
}
@@ -291,7 +291,7 @@ static int ir_open (struct usb_serial_port *port, struct file *filp)
/* override the default buffer sizes */
buffer = kmalloc (buffer_size, GFP_KERNEL);
if (!buffer) {
- dev_err (port->dev, "%s - out of memory.\n", __FUNCTION__);
+ dev_err (&port->dev, "%s - out of memory.\n", __FUNCTION__);
return -ENOMEM;
}
kfree (port->read_urb->transfer_buffer);
@@ -300,7 +300,7 @@ static int ir_open (struct usb_serial_port *port, struct file *filp)
buffer = kmalloc (buffer_size, GFP_KERNEL);
if (!buffer) {
- dev_err (port->dev, "%s - out of memory.\n", __FUNCTION__);
+ dev_err (&port->dev, "%s - out of memory.\n", __FUNCTION__);
return -ENOMEM;
}
kfree (port->write_urb->transfer_buffer);
@@ -320,7 +320,7 @@ static int ir_open (struct usb_serial_port *port, struct file *filp)
port);
result = usb_submit_urb(port->read_urb, GFP_KERNEL);
if (result)
- dev_err(port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
+ dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
return result;
}
@@ -353,7 +353,7 @@ static int ir_write (struct usb_serial_port *port, int from_user, const unsigned
dbg("%s - port = %d, count = %d", __FUNCTION__, port->number, count);
if (!port->tty) {
- dev_err (port->dev, "%s - no tty???\n", __FUNCTION__);
+ dev_err (&port->dev, "%s - no tty???\n", __FUNCTION__);
return 0;
}
@@ -399,7 +399,7 @@ static int ir_write (struct usb_serial_port *port, int from_user, const unsigned
result = usb_submit_urb (port->write_urb, GFP_ATOMIC);
if (result)
- dev_err(port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
+ dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
else
result = transfer_size;
@@ -504,7 +504,7 @@ static void ir_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
- dev_err(port->dev, "%s - failed resubmitting read urb, error %d\n",
+ dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n",
__FUNCTION__, result);
break ;
@@ -599,7 +599,7 @@ static void ir_set_termios (struct usb_serial_port *port, struct termios *old_te
result = usb_submit_urb (port->write_urb, GFP_KERNEL);
if (result)
- dev_err(port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
+ dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
}
return;
}
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
index 0aeafd9b417c..22c5ff4563ba 100644
--- a/drivers/usb/serial/keyspan.c
+++ b/drivers/usb/serial/keyspan.c
@@ -1035,7 +1035,7 @@ static int keyspan_fake_startup (struct usb_serial *serial)
}
if (record == NULL) {
- dev_err(serial->dev->dev, "Required keyspan firmware image (%s) unavailable.\n", fw_name);
+ dev_err(&serial->dev->dev, "Required keyspan firmware image (%s) unavailable.\n", fw_name);
return(1);
}
@@ -1049,7 +1049,7 @@ static int keyspan_fake_startup (struct usb_serial *serial)
(unsigned char *)record->data,
record->data_size, 0xa0);
if (response < 0) {
- dev_err(serial->dev->dev, "ezusb_writememory failed for Keyspan"
+ dev_err(&serial->dev->dev, "ezusb_writememory failed for Keyspan"
"firmware (%d %04X %p %d)\n",
response,
record->address, record->data, record->data_size);
@@ -1847,7 +1847,7 @@ static int keyspan_startup (struct usb_serial *serial)
if (d_details->product_id == serial->dev->descriptor.idProduct)
break;
if (d_details == NULL) {
- dev_err(serial->dev->dev, "%s - unknown product id %x\n", __FUNCTION__, serial->dev->descriptor.idProduct);
+ dev_err(&serial->dev->dev, "%s - unknown product id %x\n", __FUNCTION__, serial->dev->descriptor.idProduct);
return 1;
}
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 95d4e882f3c7..9543766f207c 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -204,7 +204,7 @@ static int pl2303_write (struct usb_serial_port *port, int from_user, const uns
port->write_urb->dev = port->serial->dev;
result = usb_submit_urb (port->write_urb, GFP_ATOMIC);
if (result)
- dev_err(port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
+ dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
else
result = count;
@@ -246,7 +246,7 @@ static void pl2303_set_termios (struct usb_serial_port *port, struct termios *ol
buf = kmalloc (7, GFP_KERNEL);
if (!buf) {
- dev_err(port->dev, "%s - out of memory.\n", __FUNCTION__);
+ dev_err(&port->dev, "%s - out of memory.\n", __FUNCTION__);
return;
}
memset (buf, 0x00, 0x07);
@@ -294,7 +294,7 @@ static void pl2303_set_termios (struct usb_serial_port *port, struct termios *ol
case B230400: baud = 230400; break;
case B460800: baud = 460800; break;
default:
- dev_err(port->dev, "pl2303 driver does not support the baudrate requested (fix it)\n");
+ dev_err(&port->dev, "pl2303 driver does not support the baudrate requested (fix it)\n");
break;
}
dbg("%s - baud = %d", __FUNCTION__, baud);
@@ -411,7 +411,7 @@ static int pl2303_open (struct usb_serial_port *port, struct file *filp)
port->read_urb->dev = serial->dev;
result = usb_submit_urb (port->read_urb, GFP_KERNEL);
if (result) {
- dev_err(port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
+ dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
pl2303_close (port, NULL);
return -EPROTO;
}
@@ -420,7 +420,7 @@ static int pl2303_open (struct usb_serial_port *port, struct file *filp)
port->interrupt_in_urb->dev = serial->dev;
result = usb_submit_urb (port->interrupt_in_urb, GFP_KERNEL);
if (result) {
- dev_err(port->dev, "%s - failed submitting interrupt urb, error %d\n", __FUNCTION__, result);
+ dev_err(&port->dev, "%s - failed submitting interrupt urb, error %d\n", __FUNCTION__, result);
pl2303_close (port, NULL);
return -EPROTO;
}
@@ -621,7 +621,7 @@ static void pl2303_read_int_callback (struct urb *urb, struct pt_regs *regs)
exit:
status = usb_submit_urb (urb, GFP_ATOMIC);
if (status)
- dev_err(urb->dev->dev, "%s - usb_submit_urb failed with result %d\n",
+ dev_err(&urb->dev->dev, "%s - usb_submit_urb failed with result %d\n",
__FUNCTION__, status);
}
@@ -658,7 +658,7 @@ static void pl2303_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
urb->dev = serial->dev;
result = usb_submit_urb(urb, GFP_ATOMIC);
if (result)
- dev_err(urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+ dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
return;
}
dbg("%s - unable to handle the error, exiting.", __FUNCTION__);
@@ -683,7 +683,7 @@ static void pl2303_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
urb->dev = serial->dev;
result = usb_submit_urb(urb, GFP_ATOMIC);
if (result)
- dev_err(urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+ dev_err(&urb->dev->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
}
return;
@@ -712,7 +712,7 @@ static void pl2303_write_bulk_callback (struct urb *urb, struct pt_regs *regs)
port->write_urb->dev = port->serial->dev;
result = usb_submit_urb (port->write_urb, GFP_ATOMIC);
if (result)
- dev_err(urb->dev->dev, "%s - failed resubmitting write urb, error %d\n", __FUNCTION__, result);
+ dev_err(&urb->dev->dev, "%s - failed resubmitting write urb, error %d\n", __FUNCTION__, result);
return;
}
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index d047ee66e123..f9fe3cc10864 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -841,7 +841,7 @@ static struct usb_serial * create_serial (struct usb_device *dev,
serial = kmalloc (sizeof (*serial), GFP_KERNEL);
if (!serial) {
- dev_err(dev->dev, "%s - out of memory\n", __FUNCTION__);
+ dev_err(&dev->dev, "%s - out of memory\n", __FUNCTION__);
return NULL;
}
memset (serial, 0, sizeof(*serial));
@@ -899,18 +899,18 @@ int usb_serial_probe(struct usb_interface *interface,
serial = create_serial (dev, interface, type);
if (!serial) {
- dev_err(interface->dev, "%s - out of memory\n", __FUNCTION__);
+ dev_err(&interface->dev, "%s - out of memory\n", __FUNCTION__);
return -ENODEV;
}
/* if this device type has a probe function, call it */
if (type->probe) {
if (!try_module_get(type->owner)) {
- dev_err(interface->dev, "module get failed, exiting\n");
+ dev_err(&interface->dev, "module get failed, exiting\n");
kfree (serial);
return -EIO;
}
- retval = type->probe (serial);
+ retval = type->probe (serial, id);
module_put(type->owner);
if (retval < 0) {
@@ -960,9 +960,7 @@ int usb_serial_probe(struct usb_interface *interface,
(dev->descriptor.idProduct == ATEN_PRODUCT_ID))) {
if (interface != &dev->actconfig->interface[0]) {
/* check out the endpoints of the other interface*/
- //interface = &dev->actconfig->interface[ifnum ^ 1];
- interface = &dev->actconfig->interface[0];
- iface_desc = &interface->altsetting[0];
+ iface_desc = &dev->actconfig->interface[0].altsetting[0];
for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
endpoint = &iface_desc->endpoint[i].desc;
if ((endpoint->bEndpointAddress & 0x80) &&
@@ -980,7 +978,7 @@ int usb_serial_probe(struct usb_interface *interface,
* properly during a later invocation of usb_serial_probe
*/
if (num_bulk_in == 0 || num_bulk_out == 0) {
- dev_info(interface->dev, "PL-2303 hack: descriptors matched but endpoints did not\n");
+ dev_info(&interface->dev, "PL-2303 hack: descriptors matched but endpoints did not\n");
kfree (serial);
return -ENODEV;
}
@@ -989,13 +987,13 @@ int usb_serial_probe(struct usb_interface *interface,
#endif
/* found all that we need */
- dev_info(interface->dev, "%s converter detected\n", type->name);
+ dev_info(&interface->dev, "%s converter detected\n", type->name);
#ifdef CONFIG_USB_SERIAL_GENERIC
if (type == &usb_serial_generic_device) {
num_ports = num_bulk_out;
if (num_ports == 0) {
- dev_err(interface->dev, "Generic device with no bulk out, not allowed.\n");
+ dev_err(&interface->dev, "Generic device with no bulk out, not allowed.\n");
kfree (serial);
return -EIO;
}
@@ -1005,7 +1003,7 @@ int usb_serial_probe(struct usb_interface *interface,
/* if this device type has a calc_num_ports function, call it */
if (type->calc_num_ports) {
if (!try_module_get(type->owner)) {
- dev_err(interface->dev, "module get failed, exiting\n");
+ dev_err(&interface->dev, "module get failed, exiting\n");
kfree (serial);
return -EIO;
}
@@ -1017,7 +1015,7 @@ int usb_serial_probe(struct usb_interface *interface,
}
if (get_free_serial (serial, num_ports, &minor) == NULL) {
- dev_err(interface->dev, "No more free serial devices\n");
+ dev_err(&interface->dev, "No more free serial devices\n");
kfree (serial);
return -ENOMEM;
}
@@ -1034,14 +1032,14 @@ int usb_serial_probe(struct usb_interface *interface,
port = &serial->port[i];
port->read_urb = usb_alloc_urb (0, GFP_KERNEL);
if (!port->read_urb) {
- dev_err(interface->dev, "No free urbs available\n");
+ dev_err(&interface->dev, "No free urbs available\n");
goto probe_error;
}
buffer_size = endpoint->wMaxPacketSize;
port->bulk_in_endpointAddress = endpoint->bEndpointAddress;
port->bulk_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
if (!port->bulk_in_buffer) {
- dev_err(interface->dev, "Couldn't allocate bulk_in_buffer\n");
+ dev_err(&interface->dev, "Couldn't allocate bulk_in_buffer\n");
goto probe_error;
}
usb_fill_bulk_urb (port->read_urb, dev,
@@ -1059,7 +1057,7 @@ int usb_serial_probe(struct usb_interface *interface,
port = &serial->port[i];
port->write_urb = usb_alloc_urb(0, GFP_KERNEL);
if (!port->write_urb) {
- dev_err(interface->dev, "No free urbs available\n");
+ dev_err(&interface->dev, "No free urbs available\n");
goto probe_error;
}
buffer_size = endpoint->wMaxPacketSize;
@@ -1067,7 +1065,7 @@ int usb_serial_probe(struct usb_interface *interface,
port->bulk_out_endpointAddress = endpoint->bEndpointAddress;
port->bulk_out_buffer = kmalloc (buffer_size, GFP_KERNEL);
if (!port->bulk_out_buffer) {
- dev_err(interface->dev, "Couldn't allocate bulk_out_buffer\n");
+ dev_err(&interface->dev, "Couldn't allocate bulk_out_buffer\n");
goto probe_error;
}
usb_fill_bulk_urb (port->write_urb, dev,
@@ -1085,14 +1083,14 @@ int usb_serial_probe(struct usb_interface *interface,
port = &serial->port[i];
port->interrupt_in_urb = usb_alloc_urb(0, GFP_KERNEL);
if (!port->interrupt_in_urb) {
- dev_err(interface->dev, "No free urbs available\n");
+ dev_err(&interface->dev, "No free urbs available\n");
goto probe_error;
}
buffer_size = endpoint->wMaxPacketSize;
port->interrupt_in_endpointAddress = endpoint->bEndpointAddress;
port->interrupt_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
if (!port->interrupt_in_buffer) {
- dev_err(interface->dev, "Couldn't allocate interrupt_in_buffer\n");
+ dev_err(&interface->dev, "Couldn't allocate interrupt_in_buffer\n");
goto probe_error;
}
usb_fill_int_urb (port->interrupt_in_urb, dev,
@@ -1121,7 +1119,7 @@ int usb_serial_probe(struct usb_interface *interface,
/* if this device type has an attach function, call it */
if (type->attach) {
if (!try_module_get(type->owner)) {
- dev_err(interface->dev, "module get failed, exiting\n");
+ dev_err(&interface->dev, "module get failed, exiting\n");
goto probe_error;
}
retval = type->attach (serial);
@@ -1253,7 +1251,7 @@ void usb_serial_disconnect(struct usb_interface *interface)
/* free up any memory that we allocated */
kfree (serial);
}
- dev_info(*dev, "device disconnected\n");
+ dev_info(dev, "device disconnected\n");
}
diff --git a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h
index ccac258bba98..24066abe925a 100644
--- a/drivers/usb/serial/usb-serial.h
+++ b/drivers/usb/serial/usb-serial.h
@@ -231,7 +231,7 @@ struct usb_serial_device_type {
struct list_head driver_list;
struct device_driver driver;
- int (*probe) (struct usb_serial *serial);
+ int (*probe) (struct usb_serial *serial, const struct usb_device_id *id);
int (*attach) (struct usb_serial *serial);
int (*calc_num_ports) (struct usb_serial *serial);
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
index 296212301f69..46f63cf50e84 100644
--- a/drivers/usb/serial/visor.c
+++ b/drivers/usb/serial/visor.c
@@ -168,7 +168,7 @@ static int visor_write_room (struct usb_serial_port *port);
static int visor_chars_in_buffer (struct usb_serial_port *port);
static void visor_throttle (struct usb_serial_port *port);
static void visor_unthrottle (struct usb_serial_port *port);
-static int visor_probe (struct usb_serial *serial);
+static int visor_probe (struct usb_serial *serial, const struct usb_device_id *id);
static int visor_calc_num_ports(struct usb_serial *serial);
static void visor_shutdown (struct usb_serial *serial);
static int visor_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
@@ -303,7 +303,7 @@ static int visor_open (struct usb_serial_port *port, struct file *filp)
if (!port->read_urb) {
/* this is needed for some brain dead Sony devices */
- dev_err(port->dev, "Device lied about number of ports, please use a lower one.\n");
+ dev_err(&port->dev, "Device lied about number of ports, please use a lower one.\n");
return -ENODEV;
}
@@ -327,7 +327,7 @@ static int visor_open (struct usb_serial_port *port, struct file *filp)
visor_read_bulk_callback, port);
result = usb_submit_urb(port->read_urb, GFP_KERNEL);
if (result) {
- dev_err(port->dev, "%s - failed submitting read urb, error %d\n",
+ dev_err(&port->dev, "%s - failed submitting read urb, error %d\n",
__FUNCTION__, result);
goto exit;
}
@@ -336,7 +336,7 @@ static int visor_open (struct usb_serial_port *port, struct file *filp)
dbg("%s - adding interrupt input for treo", __FUNCTION__);
result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL);
if (result)
- dev_err(port->dev, "%s - failed submitting interrupt urb, error %d\n",
+ dev_err(&port->dev, "%s - failed submitting interrupt urb, error %d\n",
__FUNCTION__, result);
}
exit:
@@ -363,7 +363,7 @@ static void visor_close (struct usb_serial_port *port, struct file * filp)
* device is still here */
transfer_buffer = kmalloc (0x12, GFP_KERNEL);
if (!transfer_buffer) {
- dev_err(port->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 0x12);
+ dev_err(&port->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 0x12);
} else {
/* send a shutdown message to the device */
usb_control_msg (serial->dev,
@@ -380,7 +380,7 @@ static void visor_close (struct usb_serial_port *port, struct file * filp)
usb_unlink_urb (port->interrupt_in_urb);
}
/* Uncomment the following line if you want to see some statistics in your syslog */
- /* dev_info (port->dev, "Bytes In = %d Bytes Out = %d\n", bytes_in, bytes_out); */
+ /* dev_info (&port->dev, "Bytes In = %d Bytes Out = %d\n", bytes_in, bytes_out); */
}
@@ -395,13 +395,13 @@ static int visor_write (struct usb_serial_port *port, int from_user, const unsig
buffer = kmalloc (count, GFP_ATOMIC);
if (!buffer) {
- dev_err(port->dev, "out of memory\n");
+ dev_err(&port->dev, "out of memory\n");
return -ENOMEM;
}
urb = usb_alloc_urb(0, GFP_ATOMIC);
if (!urb) {
- dev_err(port->dev, "no more free urbs\n");
+ dev_err(&port->dev, "no more free urbs\n");
kfree (buffer);
return -ENOMEM;
}
@@ -427,7 +427,7 @@ static int visor_write (struct usb_serial_port *port, int from_user, const unsig
/* send it down the pipe */
status = usb_submit_urb(urb, GFP_ATOMIC);
if (status) {
- dev_err(port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n",
+ dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed with status = %d\n",
__FUNCTION__, status);
count = status;
} else {
@@ -539,7 +539,7 @@ static void visor_read_bulk_callback (struct urb *urb, struct pt_regs *regs)
visor_read_bulk_callback, port);
result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
- dev_err(port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
+ dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result);
return;
}
@@ -577,7 +577,7 @@ static void visor_read_int_callback (struct urb *urb, struct pt_regs *regs)
exit:
result = usb_submit_urb (urb, GFP_ATOMIC);
if (result)
- dev_err(urb->dev->dev, "%s - Error %d submitting interrupt urb\n",
+ dev_err(&urb->dev->dev, "%s - Error %d submitting interrupt urb\n",
__FUNCTION__, result);
}
@@ -597,10 +597,10 @@ static void visor_unthrottle (struct usb_serial_port *port)
port->read_urb->dev = port->serial->dev;
result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
if (result)
- dev_err(port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
+ dev_err(&port->dev, "%s - failed submitting read urb, error %d\n", __FUNCTION__, result);
}
-static int visor_probe (struct usb_serial *serial)
+static int visor_probe (struct usb_serial *serial, const struct usb_device_id *id)
{
struct device *dev = &serial->dev->dev;
int response;
@@ -609,7 +609,7 @@ static int visor_probe (struct usb_serial *serial)
unsigned char *transfer_buffer = kmalloc (256, GFP_KERNEL);
if (!transfer_buffer) {
- dev_err(*dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 256);
+ dev_err(dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, 256);
return -ENOMEM;
}
@@ -622,14 +622,14 @@ static int visor_probe (struct usb_serial *serial)
response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_GET_CONNECTION_INFORMATION,
0xc2, 0x0000, 0x0000, transfer_buffer, 0x12, 300);
if (response < 0) {
- dev_err(*dev, "%s - error getting connection information\n", __FUNCTION__);
+ dev_err(dev, "%s - error getting connection information\n", __FUNCTION__);
} else {
struct visor_connection_info *connection_info = (struct visor_connection_info *)transfer_buffer;
char *string;
le16_to_cpus(&connection_info->num_ports);
num_ports = connection_info->num_ports;
- dev_info(*dev, "%s: Number of ports: %d\n", serial->type->name, connection_info->num_ports);
+ dev_info(dev, "%s: Number of ports: %d\n", serial->type->name, connection_info->num_ports);
for (i = 0; i < num_ports; ++i) {
switch (connection_info->connections[i].port_function_id) {
case VISOR_FUNCTION_GENERIC:
@@ -651,7 +651,7 @@ static int visor_probe (struct usb_serial *serial)
string = "unknown";
break;
}
- dev_info(*dev, "%s: port %d, is for %s use\n", serial->type->name,
+ dev_info(dev, "%s: port %d, is for %s use\n", serial->type->name,
connection_info->connections[i].port, string);
/* save off our num_ports info so that we can use it in the calc_num_ports call */
usb_set_serial_data(serial, (void *)(long)num_ports);
@@ -667,7 +667,7 @@ static int visor_probe (struct usb_serial *serial)
0xc2, 0x0000, 0x0000, transfer_buffer,
0x14, 300);
if (response < 0) {
- dev_err(*dev, "%s - error getting first unknown palm command\n", __FUNCTION__);
+ dev_err(dev, "%s - error getting first unknown palm command\n", __FUNCTION__);
} else {
usb_serial_debug_data (__FILE__, __FUNCTION__, 0x14, transfer_buffer);
}
@@ -676,7 +676,7 @@ static int visor_probe (struct usb_serial *serial)
0xc2, 0x0000, 0x0000, transfer_buffer,
0x14, 300);
if (response < 0) {
- dev_err(*dev, "%s - error getting second unknown palm command\n", __FUNCTION__);
+ dev_err(dev, "%s - error getting second unknown palm command\n", __FUNCTION__);
} else {
usb_serial_debug_data (__FILE__, __FUNCTION__, 0x14, transfer_buffer);
}
@@ -686,7 +686,7 @@ static int visor_probe (struct usb_serial *serial)
response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_REQUEST_BYTES_AVAILABLE,
0xc2, 0x0000, 0x0005, transfer_buffer, 0x02, 300);
if (response < 0) {
- dev_err(*dev, "%s - error getting bytes available request\n", __FUNCTION__);
+ dev_err(dev, "%s - error getting bytes available request\n", __FUNCTION__);
}
kfree (transfer_buffer);
@@ -722,11 +722,11 @@ static int clie_3_5_startup (struct usb_serial *serial)
USB_REQ_GET_CONFIGURATION, USB_DIR_IN,
0, 0, &data, 1, HZ * 3);
if (result < 0) {
- dev_err(*dev, "%s: get config number failed: %d\n", __FUNCTION__, result);
+ dev_err(dev, "%s: get config number failed: %d\n", __FUNCTION__, result);
return result;
}
if (result != 1) {
- dev_err(*dev, "%s: get config number bad return length: %d\n", __FUNCTION__, result);
+ dev_err(dev, "%s: get config number bad return length: %d\n", __FUNCTION__, result);
return -EIO;
}
@@ -736,11 +736,11 @@ static int clie_3_5_startup (struct usb_serial *serial)
USB_DIR_IN | USB_RECIP_INTERFACE,
0, 0, &data, 1, HZ * 3);
if (result < 0) {
- dev_err(*dev, "%s: get interface number failed: %d\n", __FUNCTION__, result);
+ dev_err(dev, "%s: get interface number failed: %d\n", __FUNCTION__, result);
return result;
}
if (result != 1) {
- dev_err(*dev, "%s: get interface number bad return length: %d\n", __FUNCTION__, result);
+ dev_err(dev, "%s: get interface number bad return length: %d\n", __FUNCTION__, result);
return -EIO;
}
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
index b85d613bc6cc..7738a16f5b40 100644
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
@@ -134,7 +134,7 @@ static struct usb_driver whiteheat_driver = {
};
/* function prototypes for the Connect Tech WhiteHEAT prerenumeration device */
-static int whiteheat_firmware_download (struct usb_serial *serial);
+static int whiteheat_firmware_download (struct usb_serial *serial, const struct usb_device_id *id);
static int whiteheat_firmware_attach (struct usb_serial *serial);
/* function prototypes for the Connect Tech WhiteHEAT serial converter */
@@ -269,7 +269,7 @@ static int firm_report_tx_done(struct usb_serial_port *port);
- device renumerated itself and comes up as new device id with all
firmware download completed.
*/
-static int whiteheat_firmware_download (struct usb_serial *serial)
+static int whiteheat_firmware_download (struct usb_serial *serial, const struct usb_device_id *id)
{
int response;
const struct whiteheat_hex_record *record;
diff --git a/drivers/usb/storage/freecom.c b/drivers/usb/storage/freecom.c
index c58935a2e6b0..2f3bbba3fd7b 100644
--- a/drivers/usb/storage/freecom.c
+++ b/drivers/usb/storage/freecom.c
@@ -285,7 +285,7 @@ int freecom_transport(Scsi_Cmnd *srb, struct us_data *us)
* and such will hang. */
US_DEBUGP("Device indicates that it has %d bytes available\n",
le16_to_cpu (fst->Count));
- US_DEBUGP("SCSI requested %d\n", usb_stor_transfer_length(srb));
+ US_DEBUGP("SCSI requested %d\n", srb->request_bufflen);
/* Find the length we desire to read. */
switch (srb->cmnd[0]) {
@@ -296,7 +296,7 @@ int freecom_transport(Scsi_Cmnd *srb, struct us_data *us)
length = fst->Count;
break;
default:
- length = usb_stor_transfer_length (srb);
+ length = srb->request_bufflen;
}
/* verify that this amount is legal */
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
index f74f8ac40ab0..1ff7a7a9bea7 100644
--- a/drivers/usb/storage/transport.c
+++ b/drivers/usb/storage/transport.c
@@ -56,307 +56,6 @@
#include <linux/slab.h>
/***********************************************************************
- * Helper routines
- ***********************************************************************/
-
-/* Calculate the length of the data transfer (not the command) for any
- * given SCSI command
- */
-unsigned int usb_stor_transfer_length(Scsi_Cmnd *srb)
-{
- int i;
- int doDefault = 0;
- unsigned int len = 0;
- unsigned int total = 0;
- struct scatterlist *sg;
-
- /* This table tells us:
- X = command not supported
- L = return length in cmnd[4] (8 bits).
- M = return length in cmnd[8] (8 bits).
- G = return length in cmnd[3] and cmnd[4] (16 bits)
- H = return length in cmnd[7] and cmnd[8] (16 bits)
- I = return length in cmnd[8] and cmnd[9] (16 bits)
- C = return length in cmnd[2] to cmnd[5] (32 bits)
- D = return length in cmnd[6] to cmnd[9] (32 bits)
- B = return length in blocksize so we use buff_len
- R = return length in cmnd[2] to cmnd[4] (24 bits)
- S = return length in cmnd[3] to cmnd[5] (24 bits)
- T = return length in cmnd[6] to cmnd[8] (24 bits)
- U = return length in cmnd[7] to cmnd[9] (24 bits)
- 0-9 = fixed return length
- V = 20 bytes
- W = 24 bytes
- Z = return length is mode dependant or not in command, use buff_len
- */
-
- static char *lengths =
-
- /* 0123456789ABCDEF 0123456789ABCDEF */
-
- "00XLZ6XZBXBBXXXB" "00LBBLG0R0L0GG0X" /* 00-1F */
- "XXXXT8XXB4B0BBBB" "ZZZ0B00HCSSZTBHH" /* 20-3F */
- "M0HHB0X000H0HH0X" "XHH0HHXX0TH0H0XX" /* 40-5F */
- "XXXXXXXXXXXXXXXX" "XXXXXXXXXXXXXXXX" /* 60-7F */
- "XXXXXXXXXXXXXXXX" "XXXXXXXXXXXXXXXX" /* 80-9F */
- "X0XXX00XB0BXBXBB" "ZZZ0XUIDU000XHBX" /* A0-BF */
- "XXXXXXXXXXXXXXXX" "XXXXXXXXXXXXXXXX" /* C0-DF */
- "XDXXXXXXXXXXXXXX" "XXW00HXXXXXXXXXX"; /* E0-FF */
-
- /* Commands checked in table:
-
- CHANGE_DEFINITION 40
- COMPARE 39
- COPY 18
- COPY_AND_VERIFY 3a
- ERASE 19
- ERASE_10 2c
- ERASE_12 ac
- EXCHANGE_MEDIUM a6
- FORMAT_UNIT 04
- GET_DATA_BUFFER_STATUS 34
- GET_MESSAGE_10 28
- GET_MESSAGE_12 a8
- GET_WINDOW 25 !!! Has more data than READ_CAPACITY, need to fix table
- INITIALIZE_ELEMENT_STATUS 07 !!! REASSIGN_BLOCKS luckily uses buff_len
- INQUIRY 12
- LOAD_UNLOAD 1b
- LOCATE 2b
- LOCK_UNLOCK_CACHE 36
- LOG_SELECT 4c
- LOG_SENSE 4d
- MEDIUM_SCAN 38 !!! This was M
- MODE_SELECT6 15
- MODE_SELECT_10 55
- MODE_SENSE_6 1a
- MODE_SENSE_10 5a
- MOVE_MEDIUM a5
- OBJECT_POSITION 31 !!! Same as SEARCH_DATA_EQUAL
- PAUSE_RESUME 4b
- PLAY_AUDIO_10 45
- PLAY_AUDIO_12 a5
- PLAY_AUDIO_MSF 47
- PLAY_AUDIO_TRACK_INDEX 48
- PLAY_AUDIO_TRACK_RELATIVE_10 49
- PLAY_AUDIO_TRACK_RELATIVE_12 a9
- POSITION_TO_ELEMENT 2b
- PRE-FETCH 34
- PREVENT_ALLOW_MEDIUM_REMOVAL 1e
- PRINT 0a !!! Same as WRITE_6 but is always in bytes
- READ_6 08
- READ_10 28
- READ_12 a8
- READ_BLOCK_LIMITS 05
- READ_BUFFER 3c
- READ_CAPACITY 25
- READ_CDROM_CAPACITY 25
- READ_DEFECT_DATA 37
- READ_DEFECT_DATA_12 b7
- READ_ELEMENT_STATUS b8 !!! Think this is in bytes
- READ_GENERATION 29 !!! Could also be M?
- READ_HEADER 44 !!! This was L
- READ_LONG 3e
- READ_POSITION 34 !!! This should be V but conflicts with PRE-FETCH
- READ_REVERSE 0f
- READ_SUB-CHANNEL 42 !!! Is this in bytes?
- READ_TOC 43 !!! Is this in bytes?
- READ_UPDATED_BLOCK 2d
- REASSIGN_BLOCKS 07
- RECEIVE 08 !!! Same as READ_6 probably in bytes though
- RECEIVE_DIAGNOSTIC_RESULTS 1c
- RECOVER_BUFFERED_DATA 14 !!! For PRINTERs this is bytes
- RELEASE_UNIT 17
- REQUEST_SENSE 03
- REQUEST_VOLUME_ELEMENT_ADDRESS b5 !!! Think this is in bytes
- RESERVE_UNIT 16
- REWIND 01
- REZERO_UNIT 01
- SCAN 1b !!! Conflicts with various commands, should be L
- SEARCH_DATA_EQUAL 31
- SEARCH_DATA_EQUAL_12 b1
- SEARCH_DATA_LOW 30
- SEARCH_DATA_LOW_12 b0
- SEARCH_DATA_HIGH 32
- SEARCH_DATA_HIGH_12 b2
- SEEK_6 0b !!! Conflicts with SLEW_AND_PRINT
- SEEK_10 2b
- SEND 0a !!! Same as WRITE_6, probably in bytes though
- SEND 2a !!! Similar to WRITE_10 but for scanners
- SEND_DIAGNOSTIC 1d
- SEND_MESSAGE_6 0a !!! Same as WRITE_6 - is in bytes
- SEND_MESSAGE_10 2a !!! Same as WRITE_10 - is in bytes
- SEND_MESSAGE_12 aa !!! Same as WRITE_12 - is in bytes
- SEND_OPC 54
- SEND_VOLUME_TAG b6 !!! Think this is in bytes
- SET_LIMITS 33
- SET_LIMITS_12 b3
- SET_WINDOW 24
- SLEW_AND_PRINT 0b !!! Conflicts with SEEK_6
- SPACE 11
- START_STOP_UNIT 1b
- STOP_PRINT 1b
- SYNCHRONIZE_BUFFER 10
- SYNCHRONIZE_CACHE 35
- TEST_UNIT_READY 00
- UPDATE_BLOCK 3d
- VERIFY 13
- VERIFY 2f
- VERIFY_12 af
- WRITE_6 0a
- WRITE_10 2a
- WRITE_12 aa
- WRITE_AND_VERIFY 2e
- WRITE_AND_VERIFY_12 ae
- WRITE_BUFFER 3b
- WRITE_FILEMARKS 10
- WRITE_LONG 3f
- WRITE_SAME 41
- */
-
- if (srb->sc_data_direction == SCSI_DATA_WRITE) {
- doDefault = 1;
- }
- else
- switch (lengths[srb->cmnd[0]]) {
- case 'L':
- len = srb->cmnd[4];
- break;
-
- case 'M':
- len = srb->cmnd[8];
- break;
-
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- len = lengths[srb->cmnd[0]]-'0';
- break;
-
- case 'G':
- len = (((unsigned int)srb->cmnd[3])<<8) |
- srb->cmnd[4];
- break;
-
- case 'H':
- len = (((unsigned int)srb->cmnd[7])<<8) |
- srb->cmnd[8];
- break;
-
- case 'I':
- len = (((unsigned int)srb->cmnd[8])<<8) |
- srb->cmnd[9];
- break;
-
- case 'R':
- len = (((unsigned int)srb->cmnd[2])<<16) |
- (((unsigned int)srb->cmnd[3])<<8) |
- srb->cmnd[4];
- break;
-
- case 'S':
- len = (((unsigned int)srb->cmnd[3])<<16) |
- (((unsigned int)srb->cmnd[4])<<8) |
- srb->cmnd[5];
- break;
-
- case 'T':
- len = (((unsigned int)srb->cmnd[6])<<16) |
- (((unsigned int)srb->cmnd[7])<<8) |
- srb->cmnd[8];
- break;
-
- case 'U':
- len = (((unsigned int)srb->cmnd[7])<<16) |
- (((unsigned int)srb->cmnd[8])<<8) |
- srb->cmnd[9];
- break;
-
- case 'C':
- len = (((unsigned int)srb->cmnd[2])<<24) |
- (((unsigned int)srb->cmnd[3])<<16) |
- (((unsigned int)srb->cmnd[4])<<8) |
- srb->cmnd[5];
- break;
-
- case 'D':
- len = (((unsigned int)srb->cmnd[6])<<24) |
- (((unsigned int)srb->cmnd[7])<<16) |
- (((unsigned int)srb->cmnd[8])<<8) |
- srb->cmnd[9];
- break;
-
- case 'V':
- len = 20;
- break;
-
- case 'W':
- len = 24;
- break;
-
- case 'B':
- /* Use buffer size due to different block sizes */
- doDefault = 1;
- break;
-
- case 'X':
- US_DEBUGP("Error: UNSUPPORTED COMMAND %02X\n",
- srb->cmnd[0]);
- doDefault = 1;
- break;
-
- case 'Z':
- /* Use buffer size due to mode dependence */
- doDefault = 1;
- break;
-
- default:
- US_DEBUGP("Error: COMMAND %02X out of range or table inconsistent (%c).\n",
- srb->cmnd[0], lengths[srb->cmnd[0]] );
- doDefault = 1;
- }
-
- if ( doDefault == 1 ) {
- /* Are we going to scatter gather? */
- if (srb->use_sg) {
- /* Add up the sizes of all the sg segments */
- sg = (struct scatterlist *) srb->request_buffer;
- for (i = 0; i < srb->use_sg; i++)
- total += sg[i].length;
- len = total;
-
- /* Double-check to see if the advertised buffer
- * length less than the actual buffer length --
- * in other words, we should tend towards the
- * conservative side for data transfers.
- */
- if (len > srb->request_bufflen)
- len = srb->request_bufflen;
- }
- else
- /* Just return the length of the buffer */
- len = srb->request_bufflen;
- }
-
- /* According to the linux-scsi people, any command sent which
- * violates this invariant is a bug. In the hopes of removing
- * all the complex logic above, let's find them and eliminate them.
- */
- if (len != srb->request_bufflen) {
- printk(KERN_ERR "USB len=%d, request_bufflen=%d\n", len, srb->request_bufflen);
- dump_stack();
- }
-
- return len;
-}
-
-/***********************************************************************
* Data transfer routines
***********************************************************************/
@@ -1031,7 +730,7 @@ void usb_stor_abort_transport(struct us_data *us)
int usb_stor_CBI_transport(Scsi_Cmnd *srb, struct us_data *us)
{
- unsigned int transfer_length = usb_stor_transfer_length(srb);
+ unsigned int transfer_length = srb->request_bufflen;
int result;
/* COMMAND STAGE */
@@ -1115,7 +814,7 @@ int usb_stor_CBI_transport(Scsi_Cmnd *srb, struct us_data *us)
*/
int usb_stor_CB_transport(Scsi_Cmnd *srb, struct us_data *us)
{
- unsigned int transfer_length = usb_stor_transfer_length(srb);
+ unsigned int transfer_length = srb->request_bufflen;
int result;
/* COMMAND STAGE */
@@ -1186,7 +885,7 @@ int usb_stor_Bulk_transport(Scsi_Cmnd *srb, struct us_data *us)
{
struct bulk_cb_wrap bcb;
struct bulk_cs_wrap bcs;
- unsigned int transfer_length = usb_stor_transfer_length(srb);
+ unsigned int transfer_length = srb->request_bufflen;
int result;
/* set up the command wrapper */
diff --git a/drivers/usb/storage/transport.h b/drivers/usb/storage/transport.h
index 2ad153b1dde5..0c9fe0ed3a7a 100644
--- a/drivers/usb/storage/transport.h
+++ b/drivers/usb/storage/transport.h
@@ -154,7 +154,6 @@ extern int usb_stor_Bulk_transport(Scsi_Cmnd*, struct us_data*);
extern int usb_stor_Bulk_max_lun(struct us_data*);
extern int usb_stor_Bulk_reset(struct us_data*);
-extern unsigned int usb_stor_transfer_length(Scsi_Cmnd*);
extern void usb_stor_invoke_transport(Scsi_Cmnd*, struct us_data*);
extern void usb_stor_abort_transport(struct us_data*);
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index 4fb86996cc5a..81b2d316f6f8 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -97,6 +97,22 @@ UNUSUAL_DEV( 0x04a4, 0x0004, 0x0001, 0x0001,
"DVD-CAM DZ-MV100A Camcorder",
US_SC_SCSI, US_PR_CB, NULL, US_FL_SINGLE_LUN),
+/* Reported by Khalid Aziz <khalid@gonehiking.org>
+ * This entry is needed because the device reports Sub=ff */
+UNUSUAL_DEV( 0x04b8, 0x0602, 0x0110, 0x0110,
+ "Epson",
+ "785EPX Storage",
+ US_SC_SCSI, US_PR_BULK, NULL, US_FL_SINGLE_LUN),
+
+/* Reported by Jan Willamowius <jan@willamowius.de>
+ * The device needs the flags only.
+ */
+UNUSUAL_DEV( 0x04c8, 0x0723, 0x0000, 0x9999,
+ "Konica",
+ "KD-200Z",
+ US_SC_SCSI, US_PR_BULK, NULL,
+ US_FL_START_STOP),
+
UNUSUAL_DEV( 0x04cb, 0x0100, 0x0000, 0x2210,
"Fujifilm",
"FinePix 1400Zoom",
@@ -547,6 +563,12 @@ UNUSUAL_DEV( 0x0a16, 0x8888, 0x0100, 0x0100,
US_SC_SCSI, US_PR_BULK, NULL,
US_FL_FIX_INQUIRY ),
+UNUSUAL_DEV( 0x0a16, 0x8888, 0x0100, 0x0100,
+ "IBM",
+ "IBM USB Memory Key",
+ US_SC_SCSI, US_PR_BULK, NULL,
+ US_FL_FIX_INQUIRY ),
+
#ifdef CONFIG_USB_STORAGE_ISD200
UNUSUAL_DEV( 0x0bf6, 0xa001, 0x0100, 0x0110,
"ATI",