Pull style into test branch

Conflicts:

	drivers/acpi/button.c
	drivers/acpi/ec.c
	drivers/acpi/osl.c
	drivers/acpi/sbs.c
This commit is contained in:
Len Brown
2006-12-16 01:04:27 -05:00
28 changed files with 128 additions and 134 deletions
+3 -3
View File
@@ -109,7 +109,7 @@ static struct proc_dir_entry *acpi_ac_dir;
static int acpi_ac_seq_show(struct seq_file *seq, void *offset)
{
struct acpi_ac *ac = (struct acpi_ac *)seq->private;
struct acpi_ac *ac = seq->private;
if (!ac)
@@ -187,7 +187,7 @@ static int acpi_ac_remove_fs(struct acpi_device *device)
static void acpi_ac_notify(acpi_handle handle, u32 event, void *data)
{
struct acpi_ac *ac = (struct acpi_ac *)data;
struct acpi_ac *ac = data;
struct acpi_device *device = NULL;
@@ -269,7 +269,7 @@ static int acpi_ac_remove(struct acpi_device *device, int type)
if (!device || !acpi_driver_data(device))
return -EINVAL;
ac = (struct acpi_ac *)acpi_driver_data(device);
ac = acpi_driver_data(device);
status = acpi_remove_notify_handler(device->handle,
ACPI_ALL_NOTIFY, acpi_ac_notify);
+1 -1
View File
@@ -429,7 +429,7 @@ static int acpi_memory_device_remove(struct acpi_device *device, int type)
if (!device || !acpi_driver_data(device))
return -EINVAL;
mem_device = (struct acpi_memory_device *)acpi_driver_data(device);
mem_device = acpi_driver_data(device);
kfree(mem_device);
return 0;
+3 -4
View File
@@ -1146,7 +1146,7 @@ static int asus_hotk_get_info(void)
if (ACPI_FAILURE(status))
printk(KERN_WARNING " Couldn't get the DSDT table header\n");
else
asus_info = (struct acpi_table_header *)dsdt.pointer;
asus_info = dsdt.pointer;
/* We have to write 0 on init this far for all ASUS models */
if (!write_acpi_int(hotk->handle, "INIT", 0, &buffer)) {
@@ -1168,7 +1168,7 @@ static int asus_hotk_get_info(void)
* asus_model_match() and try something completely different.
*/
if (buffer.pointer) {
model = (union acpi_object *)buffer.pointer;
model = buffer.pointer;
switch (model->type) {
case ACPI_TYPE_STRING:
string = model->string.pointer;
@@ -1264,8 +1264,7 @@ static int asus_hotk_add(struct acpi_device *device)
printk(KERN_NOTICE "Asus Laptop ACPI Extras version %s\n",
ASUS_ACPI_VERSION);
hotk =
(struct asus_hotk *)kmalloc(sizeof(struct asus_hotk), GFP_KERNEL);
hotk = kmalloc(sizeof(struct asus_hotk), GFP_KERNEL);
if (!hotk)
return -ENOMEM;
memset(hotk, 0, sizeof(struct asus_hotk));
+11 -11
View File
@@ -149,7 +149,7 @@ acpi_battery_get_info(struct acpi_battery *battery,
return -ENODEV;
}
package = (union acpi_object *)buffer.pointer;
package = buffer.pointer;
/* Extract Package Data */
@@ -179,7 +179,7 @@ acpi_battery_get_info(struct acpi_battery *battery,
kfree(buffer.pointer);
if (!result)
(*bif) = (struct acpi_battery_info *)data.pointer;
(*bif) = data.pointer;
return result;
}
@@ -209,7 +209,7 @@ acpi_battery_get_status(struct acpi_battery *battery,
return -ENODEV;
}
package = (union acpi_object *)buffer.pointer;
package = buffer.pointer;
/* Extract Package Data */
@@ -239,7 +239,7 @@ acpi_battery_get_status(struct acpi_battery *battery,
kfree(buffer.pointer);
if (!result)
(*bst) = (struct acpi_battery_status *)data.pointer;
(*bst) = data.pointer;
return result;
}
@@ -334,7 +334,7 @@ static struct proc_dir_entry *acpi_battery_dir;
static int acpi_battery_read_info(struct seq_file *seq, void *offset)
{
int result = 0;
struct acpi_battery *battery = (struct acpi_battery *)seq->private;
struct acpi_battery *battery = seq->private;
struct acpi_battery_info *bif = NULL;
char *units = "?";
@@ -418,7 +418,7 @@ static int acpi_battery_info_open_fs(struct inode *inode, struct file *file)
static int acpi_battery_read_state(struct seq_file *seq, void *offset)
{
int result = 0;
struct acpi_battery *battery = (struct acpi_battery *)seq->private;
struct acpi_battery *battery = seq->private;
struct acpi_battery_status *bst = NULL;
char *units = "?";
@@ -494,7 +494,7 @@ static int acpi_battery_state_open_fs(struct inode *inode, struct file *file)
static int acpi_battery_read_alarm(struct seq_file *seq, void *offset)
{
struct acpi_battery *battery = (struct acpi_battery *)seq->private;
struct acpi_battery *battery = seq->private;
char *units = "?";
@@ -531,8 +531,8 @@ acpi_battery_write_alarm(struct file *file,
{
int result = 0;
char alarm_string[12] = { '\0' };
struct seq_file *m = (struct seq_file *)file->private_data;
struct acpi_battery *battery = (struct acpi_battery *)m->private;
struct seq_file *m = file->private_data;
struct acpi_battery *battery = m->private;
if (!battery || (count > sizeof(alarm_string) - 1))
@@ -658,7 +658,7 @@ static int acpi_battery_remove_fs(struct acpi_device *device)
static void acpi_battery_notify(acpi_handle handle, u32 event, void *data)
{
struct acpi_battery *battery = (struct acpi_battery *)data;
struct acpi_battery *battery = data;
struct acpi_device *device = NULL;
@@ -742,7 +742,7 @@ static int acpi_battery_remove(struct acpi_device *device, int type)
if (!device || !acpi_driver_data(device))
return -EINVAL;
battery = (struct acpi_battery *)acpi_driver_data(device);
battery = acpi_driver_data(device);
status = acpi_remove_notify_handler(device->handle,
ACPI_ALL_NOTIFY,
+1 -1
View File
@@ -117,7 +117,7 @@ static int acpi_container_remove(struct acpi_device *device, int type)
acpi_status status = AE_OK;
struct acpi_container *pc = NULL;
pc = (struct acpi_container *)acpi_driver_data(device);
pc = acpi_driver_data(device);
kfree(pc);
return status;
}
+3 -3
View File
@@ -565,7 +565,7 @@ static int handle_eject_request(struct dock_station *ds, u32 event)
*/
static void dock_notify(acpi_handle handle, u32 event, void *data)
{
struct dock_station *ds = (struct dock_station *)data;
struct dock_station *ds = data;
switch (event) {
case ACPI_NOTIFY_BUS_CHECK:
@@ -616,7 +616,7 @@ find_dock_devices(acpi_handle handle, u32 lvl, void *context, void **rv)
{
acpi_status status;
acpi_handle tmp;
struct dock_station *ds = (struct dock_station *)context;
struct dock_station *ds = context;
struct dock_dependent_device *dd;
status = acpi_bus_get_ejd(handle, &tmp);
@@ -792,7 +792,7 @@ static int dock_remove(void)
static acpi_status
find_dock(acpi_handle handle, u32 lvl, void *context, void **rv)
{
int *count = (int *)context;
int *count = context;
acpi_status status = AE_OK;
if (is_dock(handle)) {
+3 -3
View File
@@ -99,8 +99,8 @@ acpi_fan_write_state(struct file *file, const char __user * buffer,
size_t count, loff_t * ppos)
{
int result = 0;
struct seq_file *m = (struct seq_file *)file->private_data;
struct acpi_fan *fan = (struct acpi_fan *)m->private;
struct seq_file *m = file->private_data;
struct acpi_fan *fan = m->private;
char state_string[12] = { '\0' };
@@ -229,7 +229,7 @@ static int acpi_fan_remove(struct acpi_device *device, int type)
if (!device || !acpi_driver_data(device))
return -EINVAL;
fan = (struct acpi_fan *)acpi_driver_data(device);
fan = acpi_driver_data(device);
acpi_fan_remove_fs(device);
+2 -2
View File
@@ -96,7 +96,7 @@ struct acpi_find_pci_root {
static acpi_status
do_root_bridge_busnr_callback(struct acpi_resource *resource, void *data)
{
unsigned long *busnr = (unsigned long *)data;
unsigned long *busnr = data;
struct acpi_resource_address64 address;
if (resource->type != ACPI_RESOURCE_TYPE_ADDRESS16 &&
@@ -221,7 +221,7 @@ do_acpi_find_child(acpi_handle handle, u32 lvl, void *context, void **rv)
acpi_status status;
struct acpi_device_info *info;
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
struct acpi_find_child *find = (struct acpi_find_child *)context;
struct acpi_find_child *find = context;
status = acpi_get_object_info(handle, &buffer);
if (ACPI_SUCCESS(status)) {
+2 -3
View File
@@ -265,8 +265,7 @@ static char *format_result(union acpi_object *object)
static int hotkey_polling_seq_show(struct seq_file *seq, void *offset)
{
struct acpi_polling_hotkey *poll_hotkey =
(struct acpi_polling_hotkey *)seq->private;
struct acpi_polling_hotkey *poll_hotkey = seq->private;
char *buf;
@@ -577,7 +576,7 @@ init_poll_hotkey_device(union acpi_hotkey *key, char **config_entry,
if (ACPI_FAILURE(status))
goto do_fail_zero;
key->poll_hotkey.poll_result =
(union acpi_object *)kmalloc(sizeof(union acpi_object), GFP_KERNEL);
kmalloc(sizeof(union acpi_object), GFP_KERNEL);
if (!key->poll_hotkey.poll_result)
goto do_fail_zero;
return AE_OK;
+1 -1
View File
@@ -393,7 +393,7 @@ static void __exit acpi_ec_hc_exit(void)
struct acpi_ec_hc *acpi_get_ec_hc(struct acpi_device *device)
{
return ((struct acpi_ec_hc *)acpi_driver_data(device->parent));
return acpi_driver_data(device->parent);
}
EXPORT_SYMBOL(acpi_get_ec_hc);
+3 -3
View File
@@ -2417,7 +2417,7 @@ static struct ibm_struct ibms[] = {
static int dispatch_read(char *page, char **start, off_t off, int count,
int *eof, void *data)
{
struct ibm_struct *ibm = (struct ibm_struct *)data;
struct ibm_struct *ibm = data;
int len;
if (!ibm || !ibm->read)
@@ -2442,7 +2442,7 @@ static int dispatch_read(char *page, char **start, off_t off, int count,
static int dispatch_write(struct file *file, const char __user * userbuf,
unsigned long count, void *data)
{
struct ibm_struct *ibm = (struct ibm_struct *)data;
struct ibm_struct *ibm = data;
char *kernbuf;
int ret;
@@ -2471,7 +2471,7 @@ static int dispatch_write(struct file *file, const char __user * userbuf,
static void dispatch_notify(acpi_handle handle, u32 event, void *data)
{
struct ibm_struct *ibm = (struct ibm_struct *)data;
struct ibm_struct *ibm = data;
if (!ibm || !ibm->notify)
return;
+1 -1
View File
@@ -248,7 +248,7 @@ int acpi_get_pxm(acpi_handle h)
handle = phandle;
status = acpi_evaluate_integer(handle, "_PXM", NULL, &pxm);
if (ACPI_SUCCESS(status))
return (int)pxm;
return pxm;
status = acpi_get_parent(handle, &phandle);
} while (ACPI_SUCCESS(status));
return -1;
+2 -1
View File
@@ -568,6 +568,7 @@ void acpi_os_derive_pci_id(acpi_handle rhandle, /* upper bound */
static void acpi_os_execute_deferred(struct work_struct *work)
{
struct acpi_os_dpc *dpc = container_of(work, struct acpi_os_dpc, work);
if (!dpc) {
printk(KERN_ERR PREFIX "Invalid (NULL) context\n");
return;
@@ -1051,7 +1052,7 @@ acpi_os_create_cache(char *name, u16 size, u16 depth, acpi_cache_t ** cache)
acpi_status acpi_os_purge_cache(acpi_cache_t * cache)
{
(void)kmem_cache_shrink(cache);
kmem_cache_shrink(cache);
return (AE_OK);
}
+2 -2
View File
@@ -281,7 +281,7 @@ int acpi_pci_unbind(struct acpi_device *device)
if (!device || !device->parent)
return -EINVAL;
pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
pathname = kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
if (!pathname)
return -ENOMEM;
memset(pathname, 0, ACPI_PATHNAME_MAX);
@@ -332,7 +332,7 @@ acpi_pci_bind_root(struct acpi_device *device,
struct acpi_buffer buffer = { 0, NULL };
pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
pathname = kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
if (!pathname)
return -ENOMEM;
memset(pathname, 0, ACPI_PATHNAME_MAX);
+1 -1
View File
@@ -161,7 +161,7 @@ int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus)
static int first_time = 1;
pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
pathname = kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
if (!pathname)
return -ENOMEM;
memset(pathname, 0, ACPI_PATHNAME_MAX);
+4 -4
View File
@@ -103,7 +103,7 @@ DEFINE_MUTEX(acpi_link_lock);
static acpi_status
acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)
{
struct acpi_pci_link *link = (struct acpi_pci_link *)context;
struct acpi_pci_link *link = context;
u32 i = 0;
@@ -613,7 +613,7 @@ acpi_pci_link_allocate_irq(acpi_handle handle,
return -1;
}
link = (struct acpi_pci_link *)acpi_driver_data(device);
link = acpi_driver_data(device);
if (!link) {
printk(KERN_ERR PREFIX "Invalid link context\n");
return -1;
@@ -668,7 +668,7 @@ int acpi_pci_link_free_irq(acpi_handle handle)
return -1;
}
link = (struct acpi_pci_link *)acpi_driver_data(device);
link = acpi_driver_data(device);
if (!link) {
printk(KERN_ERR PREFIX "Invalid link context\n");
return -1;
@@ -808,7 +808,7 @@ static int acpi_pci_link_remove(struct acpi_device *device, int type)
if (!device || !acpi_driver_data(device))
return -EINVAL;
link = (struct acpi_pci_link *)acpi_driver_data(device);
link = acpi_driver_data(device);
mutex_lock(&acpi_link_lock);
list_del(&link->node);
+2 -2
View File
@@ -119,7 +119,7 @@ EXPORT_SYMBOL(acpi_pci_unregister_driver);
static acpi_status
get_root_bridge_busnr_callback(struct acpi_resource *resource, void *data)
{
int *busnr = (int *)data;
int *busnr = data;
struct acpi_resource_address64 address;
if (resource->type != ACPI_RESOURCE_TYPE_ADDRESS16 &&
@@ -331,7 +331,7 @@ static int acpi_pci_root_remove(struct acpi_device *device, int type)
if (!device || !acpi_driver_data(device))
return -EINVAL;
root = (struct acpi_pci_root *)acpi_driver_data(device);
root = acpi_driver_data(device);
kfree(root);
+3 -3
View File
@@ -108,7 +108,7 @@ acpi_power_get_context(acpi_handle handle,
return result;
}
*resource = (struct acpi_power_resource *)acpi_driver_data(device);
*resource = acpi_driver_data(device);
if (!resource)
return -ENODEV;
@@ -442,7 +442,7 @@ static int acpi_power_seq_show(struct seq_file *seq, void *offset)
struct acpi_power_resource *resource = NULL;
resource = (struct acpi_power_resource *)seq->private;
resource = seq->private;
if (!resource)
goto end;
@@ -590,7 +590,7 @@ static int acpi_power_remove(struct acpi_device *device, int type)
if (!device || !acpi_driver_data(device))
return -EINVAL;
resource = (struct acpi_power_resource *)acpi_driver_data(device);
resource = acpi_driver_data(device);
acpi_power_remove_fs(device);
+5 -5
View File
@@ -277,7 +277,7 @@ static struct proc_dir_entry *acpi_processor_dir = NULL;
static int acpi_processor_info_seq_show(struct seq_file *seq, void *offset)
{
struct acpi_processor *pr = (struct acpi_processor *)seq->private;
struct acpi_processor *pr = seq->private;
if (!pr)
@@ -542,12 +542,12 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device)
* Don't trust it blindly
*/
if (processor_device_array[pr->id] != NULL &&
processor_device_array[pr->id] != (void *)device) {
processor_device_array[pr->id] != device) {
printk(KERN_WARNING "BIOS reported wrong ACPI id"
"for the processor\n");
return -ENODEV;
}
processor_device_array[pr->id] = (void *)device;
processor_device_array[pr->id] = device;
processors[pr->id] = pr;
@@ -578,7 +578,7 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device)
static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
{
struct acpi_processor *pr = (struct acpi_processor *)data;
struct acpi_processor *pr = data;
struct acpi_device *device = NULL;
@@ -637,7 +637,7 @@ static int acpi_processor_remove(struct acpi_device *device, int type)
if (!device || !acpi_driver_data(device))
return -EINVAL;
pr = (struct acpi_processor *)acpi_driver_data(device);
pr = acpi_driver_data(device);
if (pr->id >= NR_CPUS) {
kfree(pr);
+7 -7
View File
@@ -673,7 +673,7 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
return -ENODEV;
}
cst = (union acpi_object *)buffer.pointer;
cst = buffer.pointer;
/* There must be at least 2 elements */
if (!cst || (cst->type != ACPI_TYPE_PACKAGE) || cst->package.count < 2) {
@@ -702,14 +702,14 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
memset(&cx, 0, sizeof(cx));
element = (union acpi_object *)&(cst->package.elements[i]);
element = &(cst->package.elements[i]);
if (element->type != ACPI_TYPE_PACKAGE)
continue;
if (element->package.count != 4)
continue;
obj = (union acpi_object *)&(element->package.elements[0]);
obj = &(element->package.elements[0]);
if (obj->type != ACPI_TYPE_BUFFER)
continue;
@@ -721,7 +721,7 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
continue;
/* There should be an easy way to extract an integer... */
obj = (union acpi_object *)&(element->package.elements[1]);
obj = &(element->package.elements[1]);
if (obj->type != ACPI_TYPE_INTEGER)
continue;
@@ -754,13 +754,13 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
}
}
obj = (union acpi_object *)&(element->package.elements[2]);
obj = &(element->package.elements[2]);
if (obj->type != ACPI_TYPE_INTEGER)
continue;
cx.latency = obj->integer.value;
obj = (union acpi_object *)&(element->package.elements[3]);
obj = &(element->package.elements[3]);
if (obj->type != ACPI_TYPE_INTEGER)
continue;
@@ -1029,7 +1029,7 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr)
static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)
{
struct acpi_processor *pr = (struct acpi_processor *)seq->private;
struct acpi_processor *pr = seq->private;
unsigned int i;

Some files were not shown because too many files have changed in this diff Show More