Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63953
b: refs/heads/master
c: 7aa763c
h: refs/heads/master
i:
  63951: 8bd1c06
v: v3
  • Loading branch information
Stephan Berberig authored and Len Brown committed Aug 12, 2007
1 parent 3d6bc42 commit 1c76965
Show file tree
Hide file tree
Showing 13 changed files with 59 additions and 233 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d8dd3cbcf1b30c315a28f65cb719bb2d7105a317
refs/heads/master: 7aa763cb56b6efdfa5c1b83c336abf1be914afcd
22 changes: 0 additions & 22 deletions trunk/Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ and is between 256 and 4096 characters. It is defined in the file
acpi_irq_isa= [HW,ACPI] If irq_balance, mark listed IRQs used by ISA
Format: <irq>,<irq>...

acpi_no_auto_ssdt [HW,ACPI] Disable automatic loading of SSDT

acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS
Format: To spoof as Windows 98: ="Microsoft Windows"

Expand Down Expand Up @@ -1822,26 +1820,6 @@ and is between 256 and 4096 characters. It is defined in the file
thash_entries= [KNL,NET]
Set number of hash buckets for TCP connection

thermal.act= [HW,ACPI]
-1: disable all active trip points in all thermal zones
<degrees C>: override all lowest active trip points

thermal.nocrt= [HW,ACPI]
Set to disable actions on ACPI thermal zone
critical and hot trip points.

thermal.off= [HW,ACPI]
1: disable ACPI thermal control

thermal.psv= [HW,ACPI]
-1: disable all passive trip points
<degrees C>: override all passive trip points to this value

thermal.tzp= [HW,ACPI]
Specify global default ACPI thermal zone polling rate
<deci-seconds>: poll all this frequency
0: no polling (default)

time Show timing data prefixed to each printk message line
[deprecated, see 'printk.time']

Expand Down
4 changes: 2 additions & 2 deletions trunk/Documentation/thinkpad-acpi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ The version of thinkpad-acpi's sysfs interface is exported by the driver
as a driver attribute (see below).

Sysfs driver attributes are on the driver's sysfs attribute space,
for 2.6.20 this is /sys/bus/platform/drivers/thinkpad_acpi/.
for 2.6.20 this is /sys/bus/platform/drivers/thinkpad-acpi/.

Sysfs device attributes are on the driver's sysfs attribute space,
for 2.6.20 this is /sys/devices/platform/thinkpad_acpi/.
for 2.6.20 this is /sys/devices/platform/thinkpad-acpi/.

Driver version
--------------
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/acpi/asus_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,6 @@ static int asus_hotk_get_info(void)
break;
default:
kfree(model);
model = NULL;
break;
}
}
Expand Down
47 changes: 30 additions & 17 deletions trunk/drivers/acpi/battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ struct acpi_battery_info {
acpi_string oem_info;
};

enum acpi_battery_files {
enum acpi_battery_files{
ACPI_BATTERY_INFO = 0,
ACPI_BATTERY_STATE,
ACPI_BATTERY_ALARM,
Expand All @@ -129,14 +129,13 @@ struct acpi_battery_flags {
};

struct acpi_battery {
struct mutex mutex;
struct acpi_device *device;
struct acpi_battery_flags flags;
struct acpi_buffer bif_data;
struct acpi_buffer bst_data;
struct mutex lock;
unsigned long alarm;
unsigned long update_time[ACPI_BATTERY_NUMFILES];

};

inline int acpi_battery_present(struct acpi_battery *battery)
Expand Down Expand Up @@ -236,10 +235,10 @@ static int acpi_battery_get_info(struct acpi_battery *battery)
return 0;

/* Evaluate _BIF */
mutex_lock(&battery->lock);
status = acpi_evaluate_object(acpi_battery_handle(battery), "_BIF",
NULL, &buffer);
mutex_unlock(&battery->lock);

status =
acpi_evaluate_object(acpi_battery_handle(battery), "_BIF", NULL,
&buffer);
if (ACPI_FAILURE(status)) {
ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BIF"));
return -ENODEV;
Expand Down Expand Up @@ -286,10 +285,10 @@ static int acpi_battery_get_state(struct acpi_battery *battery)
return 0;

/* Evaluate _BST */
mutex_lock(&battery->lock);
status = acpi_evaluate_object(acpi_battery_handle(battery), "_BST",
NULL, &buffer);
mutex_unlock(&battery->lock);

status =
acpi_evaluate_object(acpi_battery_handle(battery), "_BST", NULL,
&buffer);
if (ACPI_FAILURE(status)) {
ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BST"));
return -ENODEV;
Expand Down Expand Up @@ -337,10 +336,9 @@ static int acpi_battery_set_alarm(struct acpi_battery *battery,

arg0.integer.value = alarm;

mutex_lock(&battery->lock);
status = acpi_evaluate_object(acpi_battery_handle(battery), "_BTP",
status =
acpi_evaluate_object(acpi_battery_handle(battery), "_BTP",
&arg_list, NULL);
mutex_unlock(&battery->lock);
if (ACPI_FAILURE(status))
return -ENODEV;

Expand Down Expand Up @@ -660,6 +658,8 @@ acpi_battery_write_alarm(struct file *file,
if (!battery || (count > sizeof(alarm_string) - 1))
return -EINVAL;

mutex_lock(&battery->mutex);

result = acpi_battery_update(battery, 1, &update_result);
if (result) {
result = -ENODEV;
Expand Down Expand Up @@ -688,7 +688,9 @@ acpi_battery_write_alarm(struct file *file,
acpi_battery_check_result(battery, result);

if (!result)
return count;
result = count;

mutex_unlock(&battery->mutex);

return result;
}
Expand All @@ -712,6 +714,8 @@ static int acpi_battery_read(int fid, struct seq_file *seq)
int update_result = ACPI_BATTERY_NONE_UPDATE;
int update = 0;

mutex_lock(&battery->mutex);

update = (get_seconds() - battery->update_time[fid] >= update_time);
update = (update | battery->flags.update[fid]);

Expand All @@ -729,6 +733,7 @@ static int acpi_battery_read(int fid, struct seq_file *seq)
result = acpi_read_funcs[fid].print(seq, result);
acpi_battery_check_result(battery, result);
battery->flags.update[fid] = result;
mutex_unlock(&battery->mutex);
return result;
}

Expand Down Expand Up @@ -892,7 +897,10 @@ static int acpi_battery_add(struct acpi_device *device)
if (!battery)
return -ENOMEM;

mutex_init(&battery->lock);
mutex_init(&battery->mutex);

mutex_lock(&battery->mutex);

battery->device = device;
strcpy(acpi_device_name(device), ACPI_BATTERY_DEVICE_NAME);
strcpy(acpi_device_class(device), ACPI_BATTERY_CLASS);
Expand Down Expand Up @@ -928,6 +936,7 @@ static int acpi_battery_add(struct acpi_device *device)
kfree(battery);
}

mutex_unlock(&battery->mutex);

return result;
}
Expand All @@ -942,6 +951,8 @@ static int acpi_battery_remove(struct acpi_device *device, int type)

battery = acpi_driver_data(device);

mutex_lock(&battery->mutex);

status = acpi_remove_notify_handler(device->handle,
ACPI_ALL_NOTIFY,
acpi_battery_notify);
Expand All @@ -952,7 +963,9 @@ static int acpi_battery_remove(struct acpi_device *device, int type)

kfree(battery->bst_data.pointer);

mutex_destroy(&battery->lock);
mutex_unlock(&battery->mutex);

mutex_destroy(&battery->mutex);

kfree(battery);

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/bay.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ static void bay_notify(acpi_handle handle, u32 event, void *data)
char *envp[] = { event_string, NULL };

bay_dprintk(handle, "Bay event");
sprintf(event_string, "BAY_EVENT=%d\n", event);
sprintf(event_string, "BAY_EVENT=%d", event);
kobject_uevent_env(&dev->kobj, KOBJ_CHANGE, envp);
}

Expand Down
23 changes: 0 additions & 23 deletions trunk/drivers/acpi/tables/tbxface.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ ACPI_MODULE_NAME("tbxface")
/* Local prototypes */
static acpi_status acpi_tb_load_namespace(void);

static int no_auto_ssdt;

/*******************************************************************************
*
* FUNCTION: acpi_allocate_root_table
Expand Down Expand Up @@ -538,10 +536,6 @@ static acpi_status acpi_tb_load_namespace(void)

ACPI_INFO((AE_INFO, "Table DSDT replaced by host OS"));
acpi_tb_print_table_header(0, table);

if (no_auto_ssdt == 0) {
printk(KERN_WARNING "ACPI: DSDT override uses original SSDTs unless \"acpi_no_auto_ssdt\"");
}
}

status =
Expand Down Expand Up @@ -583,11 +577,6 @@ static acpi_status acpi_tb_load_namespace(void)
continue;
}

if (no_auto_ssdt) {
printk(KERN_WARNING "ACPI: SSDT ignored due to \"acpi_no_auto_ssdt\"\n");
continue;
}

/* Ignore errors while loading tables, get as many as possible */

(void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
Expand Down Expand Up @@ -633,15 +622,3 @@ acpi_status acpi_load_tables(void)
}

ACPI_EXPORT_SYMBOL(acpi_load_tables)


static int __init acpi_no_auto_ssdt_setup(char *s) {

printk(KERN_NOTICE "ACPI: SSDT auto-load disabled\n");

no_auto_ssdt = 1;

return 1;
}

__setup("acpi_no_auto_ssdt", acpi_no_auto_ssdt_setup);
Loading

0 comments on commit 1c76965

Please sign in to comment.