git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[ACPI] hotplug Processor consideration in acpi_bus_add()
[safe/jmp/linux-2.6]
/
drivers
/
acpi
/
ec.c
diff --git
a/drivers/acpi/ec.c
b/drivers/acpi/ec.c
index
69b04d4
..
a4b70df
100644
(file)
--- a/
drivers/acpi/ec.c
+++ b/
drivers/acpi/ec.c
@@
-600,7
+600,7
@@
acpi_ec_space_handler (
{
int result = 0;
struct acpi_ec *ec = NULL;
{
int result = 0;
struct acpi_ec *ec = NULL;
- u
32 temp = 0
;
+ u
64 temp = *value
;
acpi_integer f_v = 0;
int i = 0;
acpi_integer f_v = 0;
int i = 0;
@@
-609,10
+609,9
@@
acpi_ec_space_handler (
if ((address > 0xFF) || !value || !handler_context)
return_VALUE(AE_BAD_PARAMETER);
if ((address > 0xFF) || !value || !handler_context)
return_VALUE(AE_BAD_PARAMETER);
- if
(bit_width != 8
) {
+ if
(bit_width != 8 && acpi_strict
) {
printk(KERN_WARNING PREFIX "acpi_ec_space_handler: bit_width should be 8\n");
printk(KERN_WARNING PREFIX "acpi_ec_space_handler: bit_width should be 8\n");
- if (acpi_strict)
- return_VALUE(AE_BAD_PARAMETER);
+ return_VALUE(AE_BAD_PARAMETER);
}
ec = (struct acpi_ec *) handler_context;
}
ec = (struct acpi_ec *) handler_context;
@@
-620,11
+619,11
@@
acpi_ec_space_handler (
next_byte:
switch (function) {
case ACPI_READ:
next_byte:
switch (function) {
case ACPI_READ:
-
result = acpi_ec_read(ec, (u8) address, &temp)
;
-
*value = (acpi_integer) temp
;
+
temp = 0
;
+
result = acpi_ec_read(ec, (u8) address, (u32 *)&temp)
;
break;
case ACPI_WRITE:
break;
case ACPI_WRITE:
- result = acpi_ec_write(ec, (u8) address, (u8)
*value
);
+ result = acpi_ec_write(ec, (u8) address, (u8)
temp
);
break;
default:
result = -EINVAL;
break;
default:
result = -EINVAL;
@@
-633,19
+632,18
@@
next_byte:
}
bit_width -= 8;
}
bit_width -= 8;
- if(bit_width){
-
- if(function == ACPI_READ)
- f_v |= (acpi_integer) (*value) << 8*i;
- if(function == ACPI_WRITE)
- (*value) >>=8;
+ if (bit_width) {
+ if (function == ACPI_READ)
+ f_v |= temp << 8 * i;
+ if (function == ACPI_WRITE)
+ temp >>= 8;
i++;
i++;
+ address++;
goto next_byte;
}
goto next_byte;
}
-
- if(function == ACPI_READ){
- f_v |= (acpi_integer) (*value) << 8*i;
+ if (function == ACPI_READ) {
+ f_v |= temp << 8 * i;
*value = f_v;
}
*value = f_v;
}
@@
-664,8
+662,6
@@
out:
default:
return_VALUE(AE_OK);
}
default:
return_VALUE(AE_OK);
}
-
-
}
}