diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-25 10:54:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-25 10:54:38 -0400 |
commit | 0b887d037bf4b76eec1c960e5feecd6a5a806971 (patch) | |
tree | 8d4bd6b0f8d33684758f573db0de986616b5daa2 /drivers/misc/thinkpad_acpi.c | |
parent | d1caeb02b17c6bc215a9a40a98a1beb92dcbd310 (diff) | |
parent | 136c4bbfe69336cd1d0b076cfc0ef6b92d576a19 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (30 commits)
ACPI: work around duplicate name "VID" problem on T61
acpiphp_ibm: add missing '\n' to error message
ACPI: add dump_stack() to trace acpi_format_exception programming errors
make drivers/acpi/scan.c:create_modalias() static
ACPI: Fix a warning of discarding qualifiers from pointer target type
ACPI: "ACPI handle has no context!" should be KERN_DEBUG
ACPI video hotkey: export missing ACPI video hotkey events via input layer
ACPI: Validate XSDT, use RSDT if XSDT fails
ACPI: /proc/acpi/thermal_zone trip points are now read-only, mark them as such
ACPI: fix ia64 allnoconfig build
PNP: remove null pointer checks
PNP: remove MODULE infrastructure
ISAPNP: removed unused isapnp_detected and ISAPNP_DEBUG
PNPACPI: remove unnecessary casts of "void *"
PNPACPI: simplify irq_flags()
PNP: fix up after Lindent
ACPI: enable GPEs before calling _WAK on resume
asus-laptop: Fix rmmod of asus_laptop
sony-laptop: call sonypi_compat_init earlier
sony-laptop: enable Vaio FZ events
...
Diffstat (limited to 'drivers/misc/thinkpad_acpi.c')
-rw-r--r-- | drivers/misc/thinkpad_acpi.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index f6cd34a3dbac..bb8956d0c104 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c | |||
@@ -1190,10 +1190,10 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event) | |||
1190 | } | 1190 | } |
1191 | 1191 | ||
1192 | if (sendacpi) | 1192 | if (sendacpi) |
1193 | acpi_bus_generate_event(ibm->acpi->device, event, hkey); | 1193 | acpi_bus_generate_proc_event(ibm->acpi->device, event, hkey); |
1194 | } else { | 1194 | } else { |
1195 | printk(IBM_ERR "unknown hotkey notification event %d\n", event); | 1195 | printk(IBM_ERR "unknown hotkey notification event %d\n", event); |
1196 | acpi_bus_generate_event(ibm->acpi->device, event, 0); | 1196 | acpi_bus_generate_proc_event(ibm->acpi->device, event, 0); |
1197 | } | 1197 | } |
1198 | } | 1198 | } |
1199 | 1199 | ||
@@ -2162,22 +2162,27 @@ static void dock_notify(struct ibm_struct *ibm, u32 event) | |||
2162 | int docked = dock_docked(); | 2162 | int docked = dock_docked(); |
2163 | int pci = ibm->acpi->hid && ibm->acpi->device && | 2163 | int pci = ibm->acpi->hid && ibm->acpi->device && |
2164 | acpi_match_device_ids(ibm->acpi->device, ibm_pci_device_ids); | 2164 | acpi_match_device_ids(ibm->acpi->device, ibm_pci_device_ids); |
2165 | int data; | ||
2165 | 2166 | ||
2166 | if (event == 1 && !pci) /* 570 */ | 2167 | if (event == 1 && !pci) /* 570 */ |
2167 | acpi_bus_generate_event(ibm->acpi->device, event, 1); /* button */ | 2168 | data = 1; /* button */ |
2168 | else if (event == 1 && pci) /* 570 */ | 2169 | else if (event == 1 && pci) /* 570 */ |
2169 | acpi_bus_generate_event(ibm->acpi->device, event, 3); /* dock */ | 2170 | data = 3; /* dock */ |
2170 | else if (event == 3 && docked) | 2171 | else if (event == 3 && docked) |
2171 | acpi_bus_generate_event(ibm->acpi->device, event, 1); /* button */ | 2172 | data = 1; /* button */ |
2172 | else if (event == 3 && !docked) | 2173 | else if (event == 3 && !docked) |
2173 | acpi_bus_generate_event(ibm->acpi->device, event, 2); /* undock */ | 2174 | data = 2; /* undock */ |
2174 | else if (event == 0 && docked) | 2175 | else if (event == 0 && docked) |
2175 | acpi_bus_generate_event(ibm->acpi->device, event, 3); /* dock */ | 2176 | data = 3; /* dock */ |
2176 | else { | 2177 | else { |
2177 | printk(IBM_ERR "unknown dock event %d, status %d\n", | 2178 | printk(IBM_ERR "unknown dock event %d, status %d\n", |
2178 | event, _sta(dock_handle)); | 2179 | event, _sta(dock_handle)); |
2179 | acpi_bus_generate_event(ibm->acpi->device, event, 0); /* unknown */ | 2180 | data = 0; /* unknown */ |
2180 | } | 2181 | } |
2182 | acpi_bus_generate_proc_event(ibm->acpi->device, event, data); | ||
2183 | acpi_bus_generate_netlink_event(ibm->acpi->device->pnp.device_class, | ||
2184 | ibm->acpi->device->dev.bus_id, | ||
2185 | event, data); | ||
2181 | } | 2186 | } |
2182 | 2187 | ||
2183 | static int dock_read(char *p) | 2188 | static int dock_read(char *p) |
@@ -2275,7 +2280,10 @@ static int __init bay_init(struct ibm_init_struct *iibm) | |||
2275 | 2280 | ||
2276 | static void bay_notify(struct ibm_struct *ibm, u32 event) | 2281 | static void bay_notify(struct ibm_struct *ibm, u32 event) |
2277 | { | 2282 | { |
2278 | acpi_bus_generate_event(ibm->acpi->device, event, 0); | 2283 | acpi_bus_generate_proc_event(ibm->acpi->device, event, 0); |
2284 | acpi_bus_generate_netlink_event(ibm->acpi->device->pnp.device_class, | ||
2285 | ibm->acpi->device->dev.bus_id, | ||
2286 | event, 0); | ||
2279 | } | 2287 | } |
2280 | 2288 | ||
2281 | #define bay_occupied(b) (_sta(b##_handle) & 1) | 2289 | #define bay_occupied(b) (_sta(b##_handle) & 1) |