diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/Kconfig | 1 | ||||
-rw-r--r-- | drivers/acpi/asus_acpi.c | 14 | ||||
-rw-r--r-- | drivers/acpi/bay.c | 101 | ||||
-rw-r--r-- | drivers/acpi/ec.c | 4 | ||||
-rw-r--r-- | drivers/acpi/events/evgpe.c | 11 | ||||
-rw-r--r-- | drivers/acpi/glue.c | 62 | ||||
-rw-r--r-- | drivers/acpi/ibm_acpi.c | 13 | ||||
-rw-r--r-- | drivers/acpi/osl.c | 22 | ||||
-rw-r--r-- | drivers/acpi/processor_core.c | 4 | ||||
-rw-r--r-- | drivers/acpi/processor_idle.c | 8 | ||||
-rw-r--r-- | drivers/acpi/tables/tbxface.c | 9 | ||||
-rw-r--r-- | drivers/acpi/thermal.c | 2 | ||||
-rw-r--r-- | drivers/acpi/toshiba_acpi.c | 2 | ||||
-rw-r--r-- | drivers/pnp/pnpacpi/Kconfig | 16 | ||||
-rw-r--r-- | drivers/usb/misc/appledisplay.c | 4 |
15 files changed, 114 insertions, 159 deletions
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 20eacc2c9e0e..2d21fed402b5 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig | |||
@@ -13,6 +13,7 @@ config ACPI | |||
13 | depends on IA64 || X86 | 13 | depends on IA64 || X86 |
14 | depends on PCI | 14 | depends on PCI |
15 | depends on PM | 15 | depends on PM |
16 | select PNP | ||
16 | default y | 17 | default y |
17 | ---help--- | 18 | ---help--- |
18 | Advanced Configuration and Power Interface (ACPI) support for | 19 | Advanced Configuration and Power Interface (ACPI) support for |
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c index 31ad70a6e22e..fa19a6c95501 100644 --- a/drivers/acpi/asus_acpi.c +++ b/drivers/acpi/asus_acpi.c | |||
@@ -141,6 +141,7 @@ struct asus_hotk { | |||
141 | W5A, //W5A | 141 | W5A, //W5A |
142 | W3V, //W3030V | 142 | W3V, //W3030V |
143 | xxN, //M2400N, M3700N, M5200N, M6800N, S1300N, S5200N | 143 | xxN, //M2400N, M3700N, M5200N, M6800N, S1300N, S5200N |
144 | A4S, //Z81sp | ||
144 | //(Centrino) | 145 | //(Centrino) |
145 | END_MODEL | 146 | END_MODEL |
146 | } model; //Models currently supported | 147 | } model; //Models currently supported |
@@ -397,7 +398,16 @@ static struct model_data model_conf[END_MODEL] = { | |||
397 | .brightness_set = "SPLV", | 398 | .brightness_set = "SPLV", |
398 | .brightness_get = "GPLV", | 399 | .brightness_get = "GPLV", |
399 | .display_set = "SDSP", | 400 | .display_set = "SDSP", |
400 | .display_get = "\\ADVG"} | 401 | .display_get = "\\ADVG"}, |
402 | |||
403 | { | ||
404 | .name = "A4S", | ||
405 | .brightness_set = "SPLV", | ||
406 | .brightness_get = "GPLV", | ||
407 | .mt_bt_switch = "BLED", | ||
408 | .mt_wled = "WLED" | ||
409 | } | ||
410 | |||
401 | }; | 411 | }; |
402 | 412 | ||
403 | /* procdir we use */ | 413 | /* procdir we use */ |
@@ -1117,6 +1127,8 @@ static int asus_model_match(char *model) | |||
1117 | return W3V; | 1127 | return W3V; |
1118 | else if (strncmp(model, "W5A", 3) == 0) | 1128 | else if (strncmp(model, "W5A", 3) == 0) |
1119 | return W5A; | 1129 | return W5A; |
1130 | else if (strncmp(model, "A4S", 3) == 0) | ||
1131 | return A4S; | ||
1120 | else | 1132 | else |
1121 | return END_MODEL; | 1133 | return END_MODEL; |
1122 | } | 1134 | } |
diff --git a/drivers/acpi/bay.c b/drivers/acpi/bay.c index 91082ce6f5d1..9c28081ba6a6 100644 --- a/drivers/acpi/bay.c +++ b/drivers/acpi/bay.c | |||
@@ -47,18 +47,6 @@ MODULE_LICENSE("GPL"); | |||
47 | acpi_get_name(h, ACPI_FULL_PATHNAME, &buffer);\ | 47 | acpi_get_name(h, ACPI_FULL_PATHNAME, &buffer);\ |
48 | printk(KERN_DEBUG PREFIX "%s: %s\n", prefix, s); } | 48 | printk(KERN_DEBUG PREFIX "%s: %s\n", prefix, s); } |
49 | static void bay_notify(acpi_handle handle, u32 event, void *data); | 49 | static void bay_notify(acpi_handle handle, u32 event, void *data); |
50 | static int acpi_bay_add(struct acpi_device *device); | ||
51 | static int acpi_bay_remove(struct acpi_device *device, int type); | ||
52 | |||
53 | static struct acpi_driver acpi_bay_driver = { | ||
54 | .name = ACPI_BAY_DRIVER_NAME, | ||
55 | .class = ACPI_BAY_CLASS, | ||
56 | .ids = ACPI_BAY_HID, | ||
57 | .ops = { | ||
58 | .add = acpi_bay_add, | ||
59 | .remove = acpi_bay_remove, | ||
60 | }, | ||
61 | }; | ||
62 | 50 | ||
63 | struct bay { | 51 | struct bay { |
64 | acpi_handle handle; | 52 | acpi_handle handle; |
@@ -234,14 +222,6 @@ int eject_removable_drive(struct device *dev) | |||
234 | } | 222 | } |
235 | EXPORT_SYMBOL_GPL(eject_removable_drive); | 223 | EXPORT_SYMBOL_GPL(eject_removable_drive); |
236 | 224 | ||
237 | static int acpi_bay_add(struct acpi_device *device) | ||
238 | { | ||
239 | bay_dprintk(device->handle, "adding bay device"); | ||
240 | strcpy(acpi_device_name(device), "Dockable Bay"); | ||
241 | strcpy(acpi_device_class(device), "bay"); | ||
242 | return 0; | ||
243 | } | ||
244 | |||
245 | static int acpi_bay_add_fs(struct bay *bay) | 225 | static int acpi_bay_add_fs(struct bay *bay) |
246 | { | 226 | { |
247 | int ret; | 227 | int ret; |
@@ -303,7 +283,7 @@ static int bay_add(acpi_handle handle, int id) | |||
303 | 283 | ||
304 | /* initialize platform device stuff */ | 284 | /* initialize platform device stuff */ |
305 | pdev = platform_device_register_simple(ACPI_BAY_CLASS, id, NULL, 0); | 285 | pdev = platform_device_register_simple(ACPI_BAY_CLASS, id, NULL, 0); |
306 | if (pdev == NULL) { | 286 | if (IS_ERR(pdev)) { |
307 | printk(KERN_ERR PREFIX "Error registering bay device\n"); | 287 | printk(KERN_ERR PREFIX "Error registering bay device\n"); |
308 | goto bay_add_err; | 288 | goto bay_add_err; |
309 | } | 289 | } |
@@ -339,52 +319,6 @@ bay_add_err: | |||
339 | return -ENODEV; | 319 | return -ENODEV; |
340 | } | 320 | } |
341 | 321 | ||
342 | static int acpi_bay_remove(struct acpi_device *device, int type) | ||
343 | { | ||
344 | /*** FIXME: do something here */ | ||
345 | return 0; | ||
346 | } | ||
347 | |||
348 | /** | ||
349 | * bay_create_acpi_device - add new devices to acpi | ||
350 | * @handle - handle of the device to add | ||
351 | * | ||
352 | * This function will create a new acpi_device for the given | ||
353 | * handle if one does not exist already. This should cause | ||
354 | * acpi to scan for drivers for the given devices, and call | ||
355 | * matching driver's add routine. | ||
356 | * | ||
357 | * Returns a pointer to the acpi_device corresponding to the handle. | ||
358 | */ | ||
359 | static struct acpi_device * bay_create_acpi_device(acpi_handle handle) | ||
360 | { | ||
361 | struct acpi_device *device = NULL; | ||
362 | struct acpi_device *parent_device; | ||
363 | acpi_handle parent; | ||
364 | int ret; | ||
365 | |||
366 | bay_dprintk(handle, "Trying to get device"); | ||
367 | if (acpi_bus_get_device(handle, &device)) { | ||
368 | /* | ||
369 | * no device created for this object, | ||
370 | * so we should create one. | ||
371 | */ | ||
372 | bay_dprintk(handle, "No device for handle"); | ||
373 | acpi_get_parent(handle, &parent); | ||
374 | if (acpi_bus_get_device(parent, &parent_device)) | ||
375 | parent_device = NULL; | ||
376 | |||
377 | ret = acpi_bus_add(&device, parent_device, handle, | ||
378 | ACPI_BUS_TYPE_DEVICE); | ||
379 | if (ret) { | ||
380 | pr_debug("error adding bus, %x\n", | ||
381 | -ret); | ||
382 | return NULL; | ||
383 | } | ||
384 | } | ||
385 | return device; | ||
386 | } | ||
387 | |||
388 | /** | 322 | /** |
389 | * bay_notify - act upon an acpi bay notification | 323 | * bay_notify - act upon an acpi bay notification |
390 | * @handle: the bay handle | 324 | * @handle: the bay handle |
@@ -394,38 +328,19 @@ static struct acpi_device * bay_create_acpi_device(acpi_handle handle) | |||
394 | */ | 328 | */ |
395 | static void bay_notify(acpi_handle handle, u32 event, void *data) | 329 | static void bay_notify(acpi_handle handle, u32 event, void *data) |
396 | { | 330 | { |
397 | struct acpi_device *dev; | 331 | struct bay *bay_dev = (struct bay *)data; |
332 | struct device *dev = &bay_dev->pdev->dev; | ||
398 | 333 | ||
399 | bay_dprintk(handle, "Bay event"); | 334 | bay_dprintk(handle, "Bay event"); |
400 | 335 | ||
401 | switch(event) { | 336 | switch(event) { |
402 | case ACPI_NOTIFY_BUS_CHECK: | 337 | case ACPI_NOTIFY_BUS_CHECK: |
403 | printk("Bus Check\n"); | ||
404 | case ACPI_NOTIFY_DEVICE_CHECK: | 338 | case ACPI_NOTIFY_DEVICE_CHECK: |
405 | printk("Device Check\n"); | ||
406 | dev = bay_create_acpi_device(handle); | ||
407 | if (dev) | ||
408 | acpi_bus_generate_event(dev, event, 0); | ||
409 | else | ||
410 | printk("No device for generating event\n"); | ||
411 | /* wouldn't it be a good idea to just rescan SATA | ||
412 | * right here? | ||
413 | */ | ||
414 | break; | ||
415 | case ACPI_NOTIFY_EJECT_REQUEST: | 339 | case ACPI_NOTIFY_EJECT_REQUEST: |
416 | printk("Eject request\n"); | 340 | kobject_uevent(&dev->kobj, KOBJ_CHANGE); |
417 | dev = bay_create_acpi_device(handle); | ||
418 | if (dev) | ||
419 | acpi_bus_generate_event(dev, event, 0); | ||
420 | else | ||
421 | printk("No device for generating eventn"); | ||
422 | |||
423 | /* wouldn't it be a good idea to just call the | ||
424 | * eject_device here if we were a SATA device? | ||
425 | */ | ||
426 | break; | 341 | break; |
427 | default: | 342 | default: |
428 | printk("unknown event %d\n", event); | 343 | printk(KERN_ERR PREFIX "Bay: unknown event %d\n", event); |
429 | } | 344 | } |
430 | } | 345 | } |
431 | 346 | ||
@@ -457,10 +372,6 @@ static int __init bay_init(void) | |||
457 | acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, | 372 | acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, |
458 | ACPI_UINT32_MAX, find_bay, &bays, NULL); | 373 | ACPI_UINT32_MAX, find_bay, &bays, NULL); |
459 | 374 | ||
460 | if (bays) | ||
461 | if ((acpi_bus_register_driver(&acpi_bay_driver) < 0)) | ||
462 | printk(KERN_ERR "Unable to register bay driver\n"); | ||
463 | |||
464 | if (!bays) | 375 | if (!bays) |
465 | return -ENODEV; | 376 | return -ENODEV; |
466 | 377 | ||
@@ -481,8 +392,6 @@ static void __exit bay_exit(void) | |||
481 | kfree(bay->name); | 392 | kfree(bay->name); |
482 | kfree(bay); | 393 | kfree(bay); |
483 | } | 394 | } |
484 | |||
485 | acpi_bus_unregister_driver(&acpi_bay_driver); | ||
486 | } | 395 | } |
487 | 396 | ||
488 | postcore_initcall(bay_init); | 397 | postcore_initcall(bay_init); |
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 743ce27fa0bb..8f5aaf753fda 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -280,8 +280,10 @@ static int acpi_ec_transaction(struct acpi_ec *ec, u8 command, | |||
280 | mutex_lock(&ec->lock); | 280 | mutex_lock(&ec->lock); |
281 | if (ec->global_lock) { | 281 | if (ec->global_lock) { |
282 | status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); | 282 | status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); |
283 | if (ACPI_FAILURE(status)) | 283 | if (ACPI_FAILURE(status)) { |
284 | mutex_unlock(&ec->lock); | ||
284 | return -ENODEV; | 285 | return -ENODEV; |
286 | } | ||
285 | } | 287 | } |
286 | 288 | ||
287 | /* Make sure GPE is enabled before doing transaction */ | 289 | /* Make sure GPE is enabled before doing transaction */ |
diff --git a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c index dfac3ecc596e..635ba449ebc2 100644 --- a/drivers/acpi/events/evgpe.c +++ b/drivers/acpi/events/evgpe.c | |||
@@ -636,17 +636,6 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) | |||
636 | } | 636 | } |
637 | } | 637 | } |
638 | 638 | ||
639 | if (!acpi_gbl_system_awake_and_running) { | ||
640 | /* | ||
641 | * We just woke up because of a wake GPE. Disable any further GPEs | ||
642 | * until we are fully up and running (Only wake GPEs should be enabled | ||
643 | * at this time, but we just brute-force disable them all.) | ||
644 | * 1) We must disable this particular wake GPE so it won't fire again | ||
645 | * 2) We want to disable all wake GPEs, since we are now awake | ||
646 | */ | ||
647 | (void)acpi_hw_disable_all_gpes(); | ||
648 | } | ||
649 | |||
650 | /* | 639 | /* |
651 | * Dispatch the GPE to either an installed handler, or the control method | 640 | * Dispatch the GPE to either an installed handler, or the control method |
652 | * associated with this GPE (_Lxx or _Exx). If a handler exists, we invoke | 641 | * associated with this GPE (_Lxx or _Exx). If a handler exists, we invoke |
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index 7b6c9ff9bebe..4334c208841a 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c | |||
@@ -241,3 +241,65 @@ static int __init init_acpi_device_notify(void) | |||
241 | } | 241 | } |
242 | 242 | ||
243 | arch_initcall(init_acpi_device_notify); | 243 | arch_initcall(init_acpi_device_notify); |
244 | |||
245 | |||
246 | #if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) | ||
247 | |||
248 | /* Every ACPI platform has a mc146818 compatible "cmos rtc". Here we find | ||
249 | * its device node and pass extra config data. This helps its driver use | ||
250 | * capabilities that the now-obsolete mc146818 didn't have, and informs it | ||
251 | * that this board's RTC is wakeup-capable (per ACPI spec). | ||
252 | */ | ||
253 | #include <linux/mc146818rtc.h> | ||
254 | |||
255 | static struct cmos_rtc_board_info rtc_info; | ||
256 | |||
257 | |||
258 | /* PNP devices are registered in a subsys_initcall(); | ||
259 | * ACPI specifies the PNP IDs to use. | ||
260 | */ | ||
261 | #include <linux/pnp.h> | ||
262 | |||
263 | static int __init pnp_match(struct device *dev, void *data) | ||
264 | { | ||
265 | static const char *ids[] = { "PNP0b00", "PNP0b01", "PNP0b02", }; | ||
266 | struct pnp_dev *pnp = to_pnp_dev(dev); | ||
267 | int i; | ||
268 | |||
269 | for (i = 0; i < ARRAY_SIZE(ids); i++) { | ||
270 | if (compare_pnp_id(pnp->id, ids[i]) != 0) | ||
271 | return 1; | ||
272 | } | ||
273 | return 0; | ||
274 | } | ||
275 | |||
276 | static struct device *__init get_rtc_dev(void) | ||
277 | { | ||
278 | return bus_find_device(&pnp_bus_type, NULL, NULL, pnp_match); | ||
279 | } | ||
280 | |||
281 | static int __init acpi_rtc_init(void) | ||
282 | { | ||
283 | struct device *dev = get_rtc_dev(); | ||
284 | |||
285 | if (dev) { | ||
286 | rtc_info.rtc_day_alarm = acpi_gbl_FADT.day_alarm; | ||
287 | rtc_info.rtc_mon_alarm = acpi_gbl_FADT.month_alarm; | ||
288 | rtc_info.rtc_century = acpi_gbl_FADT.century; | ||
289 | |||
290 | /* NOTE: acpi_gbl_FADT->rtcs4 is NOT currently useful */ | ||
291 | |||
292 | dev->platform_data = &rtc_info; | ||
293 | |||
294 | /* RTC always wakes from S1/S2/S3, and often S4/STD */ | ||
295 | device_init_wakeup(dev, 1); | ||
296 | |||
297 | put_device(dev); | ||
298 | } else | ||
299 | pr_debug("ACPI: RTC unavailable?\n"); | ||
300 | return 0; | ||
301 | } | ||
302 | /* do this between RTC subsys_initcall() and rtc_cmos driver_initcall() */ | ||
303 | fs_initcall(acpi_rtc_init); | ||
304 | |||
305 | #endif | ||
diff --git a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c index c6144ca66638..2429e1180fa9 100644 --- a/drivers/acpi/ibm_acpi.c +++ b/drivers/acpi/ibm_acpi.c | |||
@@ -496,6 +496,10 @@ static int ibm_acpi_driver_init(void) | |||
496 | printk(IBM_INFO "%s v%s\n", IBM_DESC, IBM_VERSION); | 496 | printk(IBM_INFO "%s v%s\n", IBM_DESC, IBM_VERSION); |
497 | printk(IBM_INFO "%s\n", IBM_URL); | 497 | printk(IBM_INFO "%s\n", IBM_URL); |
498 | 498 | ||
499 | if (ibm_thinkpad_ec_found) | ||
500 | printk(IBM_INFO "ThinkPad EC firmware %s\n", | ||
501 | ibm_thinkpad_ec_found); | ||
502 | |||
499 | return 0; | 503 | return 0; |
500 | } | 504 | } |
501 | 505 | ||
@@ -2617,7 +2621,7 @@ static void __init ibm_handle_init(char *name, | |||
2617 | ibm_handle_init(#object, &object##_handle, *object##_parent, \ | 2621 | ibm_handle_init(#object, &object##_handle, *object##_parent, \ |
2618 | object##_paths, ARRAY_SIZE(object##_paths), &object##_path) | 2622 | object##_paths, ARRAY_SIZE(object##_paths), &object##_path) |
2619 | 2623 | ||
2620 | static int set_ibm_param(const char *val, struct kernel_param *kp) | 2624 | static int __init set_ibm_param(const char *val, struct kernel_param *kp) |
2621 | { | 2625 | { |
2622 | unsigned int i; | 2626 | unsigned int i; |
2623 | 2627 | ||
@@ -2659,7 +2663,8 @@ static void acpi_ibm_exit(void) | |||
2659 | for (i = ARRAY_SIZE(ibms) - 1; i >= 0; i--) | 2663 | for (i = ARRAY_SIZE(ibms) - 1; i >= 0; i--) |
2660 | ibm_exit(&ibms[i]); | 2664 | ibm_exit(&ibms[i]); |
2661 | 2665 | ||
2662 | remove_proc_entry(IBM_DIR, acpi_root_dir); | 2666 | if (proc_dir) |
2667 | remove_proc_entry(IBM_DIR, acpi_root_dir); | ||
2663 | 2668 | ||
2664 | if (ibm_thinkpad_ec_found) | 2669 | if (ibm_thinkpad_ec_found) |
2665 | kfree(ibm_thinkpad_ec_found); | 2670 | kfree(ibm_thinkpad_ec_found); |
@@ -2710,9 +2715,6 @@ static int __init acpi_ibm_init(void) | |||
2710 | 2715 | ||
2711 | /* Models with newer firmware report the EC in DMI */ | 2716 | /* Models with newer firmware report the EC in DMI */ |
2712 | ibm_thinkpad_ec_found = check_dmi_for_ec(); | 2717 | ibm_thinkpad_ec_found = check_dmi_for_ec(); |
2713 | if (ibm_thinkpad_ec_found) | ||
2714 | printk(IBM_INFO "ThinkPad EC firmware %s\n", | ||
2715 | ibm_thinkpad_ec_found); | ||
2716 | 2718 | ||
2717 | /* these handles are not required */ | 2719 | /* these handles are not required */ |
2718 | IBM_HANDLE_INIT(vid); | 2720 | IBM_HANDLE_INIT(vid); |
@@ -2742,6 +2744,7 @@ static int __init acpi_ibm_init(void) | |||
2742 | proc_dir = proc_mkdir(IBM_DIR, acpi_root_dir); | 2744 | proc_dir = proc_mkdir(IBM_DIR, acpi_root_dir); |
2743 | if (!proc_dir) { | 2745 | if (!proc_dir) { |
2744 | printk(IBM_ERR "unable to create proc dir %s", IBM_DIR); | 2746 | printk(IBM_ERR "unable to create proc dir %s", IBM_DIR); |
2747 | acpi_ibm_exit(); | ||
2745 | return -ENODEV; | 2748 | return -ENODEV; |
2746 | } | 2749 | } |
2747 | proc_dir->owner = THIS_MODULE; | 2750 | proc_dir->owner = THIS_MODULE; |
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 0f6f3bcbc8eb..99d6c5128280 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -205,7 +205,7 @@ void __iomem *acpi_os_map_memory(acpi_physical_address phys, acpi_size size) | |||
205 | { | 205 | { |
206 | if (phys > ULONG_MAX) { | 206 | if (phys > ULONG_MAX) { |
207 | printk(KERN_ERR PREFIX "Cannot map memory that high\n"); | 207 | printk(KERN_ERR PREFIX "Cannot map memory that high\n"); |
208 | return 0; | 208 | return NULL; |
209 | } | 209 | } |
210 | if (acpi_gbl_permanent_mmap) | 210 | if (acpi_gbl_permanent_mmap) |
211 | /* | 211 | /* |
@@ -890,26 +890,6 @@ u32 acpi_os_get_line(char *buffer) | |||
890 | } | 890 | } |
891 | #endif /* ACPI_FUTURE_USAGE */ | 891 | #endif /* ACPI_FUTURE_USAGE */ |
892 | 892 | ||
893 | /* Assumes no unreadable holes inbetween */ | ||
894 | u8 acpi_os_readable(void *ptr, acpi_size len) | ||
895 | { | ||
896 | #if defined(__i386__) || defined(__x86_64__) | ||
897 | char tmp; | ||
898 | return !__get_user(tmp, (char __user *)ptr) | ||
899 | && !__get_user(tmp, (char __user *)ptr + len - 1); | ||
900 | #endif | ||
901 | return 1; | ||
902 | } | ||
903 | |||
904 | #ifdef ACPI_FUTURE_USAGE | ||
905 | u8 acpi_os_writable(void *ptr, acpi_size len) | ||
906 | { | ||
907 | /* could do dummy write (racy) or a kernel page table lookup. | ||
908 | The later may be difficult at early boot when kmap doesn't work yet. */ | ||
909 | return 1; | ||
910 | } | ||
911 | #endif | ||
912 | |||
913 | acpi_status acpi_os_signal(u32 function, void *info) | 893 | acpi_status acpi_os_signal(u32 function, void *info) |
914 | { | 894 | { |
915 | switch (function) { | 895 | switch (function) { |
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 0079bc51082c..4b3d15fa507a 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -404,7 +404,7 @@ static int map_lsapic_id(struct acpi_subtable_header *entry, | |||
404 | if (lsapic->lapic_flags & ACPI_MADT_ENABLED) { | 404 | if (lsapic->lapic_flags & ACPI_MADT_ENABLED) { |
405 | /* First check against id */ | 405 | /* First check against id */ |
406 | if (lsapic->processor_id == acpi_id) { | 406 | if (lsapic->processor_id == acpi_id) { |
407 | *apic_id = lsapic->id; | 407 | *apic_id = (lsapic->id << 8) | lsapic->eid; |
408 | return 1; | 408 | return 1; |
409 | /* Check against optional uid */ | 409 | /* Check against optional uid */ |
410 | } else if (entry->length >= 16 && | 410 | } else if (entry->length >= 16 && |
@@ -1005,7 +1005,7 @@ static int __init acpi_processor_init(void) | |||
1005 | #ifdef CONFIG_SMP | 1005 | #ifdef CONFIG_SMP |
1006 | if (ACPI_FAILURE(acpi_get_table(ACPI_SIG_MADT, 0, | 1006 | if (ACPI_FAILURE(acpi_get_table(ACPI_SIG_MADT, 0, |
1007 | (struct acpi_table_header **)&madt))) | 1007 | (struct acpi_table_header **)&madt))) |
1008 | madt = 0; | 1008 | madt = NULL; |
1009 | #endif | 1009 | #endif |
1010 | 1010 | ||
1011 | acpi_processor_dir = proc_mkdir(ACPI_PROCESSOR_CLASS, acpi_root_dir); | 1011 | acpi_processor_dir = proc_mkdir(ACPI_PROCESSOR_CLASS, acpi_root_dir); |
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 8206fc1ecc58..835595ae06b3 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -51,6 +51,14 @@ | |||
51 | #include <asm/apic.h> | 51 | #include <asm/apic.h> |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | /* | ||
55 | * Include the apic definitions for x86 to have the APIC timer related defines | ||
56 | * available also for UP (on SMP it gets magically included via linux/smp.h). | ||
57 | */ | ||
58 | #ifdef CONFIG_X86 | ||
59 | #include <asm/apic.h> | ||
60 | #endif | ||
61 | |||
54 | #include <asm/io.h> | 62 | #include <asm/io.h> |
55 | #include <asm/uaccess.h> | 63 | #include <asm/uaccess.h> |
56 | 64 | ||
diff --git a/drivers/acpi/tables/tbxface.c b/drivers/acpi/tables/tbxface.c index 807978d5381a..417ef5fa7666 100644 --- a/drivers/acpi/tables/tbxface.c +++ b/drivers/acpi/tables/tbxface.c | |||
@@ -338,9 +338,9 @@ acpi_status acpi_unload_table_id(acpi_owner_id id) | |||
338 | int i; | 338 | int i; |
339 | acpi_status status = AE_NOT_EXIST; | 339 | acpi_status status = AE_NOT_EXIST; |
340 | 340 | ||
341 | ACPI_FUNCTION_TRACE(acpi_unload_table); | 341 | ACPI_FUNCTION_TRACE(acpi_unload_table_id); |
342 | 342 | ||
343 | /* Find table from the requested type list */ | 343 | /* Find table in the global table list */ |
344 | for (i = 0; i < acpi_gbl_root_table_list.count; ++i) { | 344 | for (i = 0; i < acpi_gbl_root_table_list.count; ++i) { |
345 | if (id != acpi_gbl_root_table_list.tables[i].owner_id) { | 345 | if (id != acpi_gbl_root_table_list.tables[i].owner_id) { |
346 | continue; | 346 | continue; |
@@ -352,8 +352,9 @@ acpi_status acpi_unload_table_id(acpi_owner_id id) | |||
352 | * simply a position within the hierarchy | 352 | * simply a position within the hierarchy |
353 | */ | 353 | */ |
354 | acpi_tb_delete_namespace_by_owner(i); | 354 | acpi_tb_delete_namespace_by_owner(i); |
355 | acpi_tb_release_owner_id(i); | 355 | status = acpi_tb_release_owner_id(i); |
356 | acpi_tb_set_table_loaded_flag(i, FALSE); | 356 | acpi_tb_set_table_loaded_flag(i, FALSE); |
357 | break; | ||
357 | } | 358 | } |
358 | return_ACPI_STATUS(status); | 359 | return_ACPI_STATUS(status); |
359 | } | 360 | } |
@@ -408,7 +409,7 @@ acpi_get_table(char *signature, | |||
408 | } | 409 | } |
409 | 410 | ||
410 | if (!acpi_gbl_permanent_mmap) { | 411 | if (!acpi_gbl_permanent_mmap) { |
411 | acpi_gbl_root_table_list.tables[i].pointer = 0; | 412 | acpi_gbl_root_table_list.tables[i].pointer = NULL; |
412 | } | 413 | } |
413 | 414 | ||
414 | return (status); | 415 | return (status); |
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 986afd470a14..442bfd50dc3d 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -270,7 +270,7 @@ static int acpi_thermal_set_polling(struct acpi_thermal *tz, int seconds) | |||
270 | 270 | ||
271 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 271 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
272 | "Polling frequency set to %lu seconds\n", | 272 | "Polling frequency set to %lu seconds\n", |
273 | tz->polling_frequency)); | 273 | tz->polling_frequency/10)); |
274 | 274 | ||
275 | return 0; | 275 | return 0; |
276 | } | 276 | } |
diff --git a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c index d9b651ffcdc0..0208d3a3f598 100644 --- a/drivers/acpi/toshiba_acpi.c +++ b/drivers/acpi/toshiba_acpi.c | |||
@@ -125,7 +125,7 @@ static int write_acpi_int(const char *methodName, int val) | |||
125 | union acpi_object in_objs[1]; | 125 | union acpi_object in_objs[1]; |
126 | acpi_status status; | 126 | acpi_status status; |
127 | 127 | ||
128 | params.count = sizeof(in_objs) / sizeof(in_objs[0]); | 128 | params.count = ARRAY_SIZE(in_objs); |
129 | params.pointer = in_objs; | 129 | params.pointer = in_objs; |
130 | in_objs[0].type = ACPI_TYPE_INTEGER; | 130 | in_objs[0].type = ACPI_TYPE_INTEGER; |
131 | in_objs[0].integer.value = val; | 131 | in_objs[0].integer.value = val; |
diff --git a/drivers/pnp/pnpacpi/Kconfig b/drivers/pnp/pnpacpi/Kconfig index ad27e5e0101f..b04767ce273e 100644 --- a/drivers/pnp/pnpacpi/Kconfig +++ b/drivers/pnp/pnpacpi/Kconfig | |||
@@ -2,17 +2,5 @@ | |||
2 | # Plug and Play ACPI configuration | 2 | # Plug and Play ACPI configuration |
3 | # | 3 | # |
4 | config PNPACPI | 4 | config PNPACPI |
5 | bool "Plug and Play ACPI support" | 5 | bool |
6 | depends on PNP && ACPI | 6 | default (PNP && ACPI) |
7 | default y | ||
8 | ---help--- | ||
9 | Linux uses the PNPACPI to autodetect built-in | ||
10 | mainboard resources (e.g. parallel port resources). | ||
11 | |||
12 | Some features (e.g. real hotplug) are not currently | ||
13 | implemented. | ||
14 | |||
15 | If you would like the kernel to detect and allocate resources to | ||
16 | your mainboard devices (on some systems they are disabled by the | ||
17 | BIOS) say Y here. Also the PNPACPI can help prevent resource | ||
18 | conflicts between mainboard devices and other bus devices. | ||
diff --git a/drivers/usb/misc/appledisplay.c b/drivers/usb/misc/appledisplay.c index 32f0e3a5b022..e573c8ba9785 100644 --- a/drivers/usb/misc/appledisplay.c +++ b/drivers/usb/misc/appledisplay.c | |||
@@ -281,8 +281,8 @@ static int appledisplay_probe(struct usb_interface *iface, | |||
281 | /* Register backlight device */ | 281 | /* Register backlight device */ |
282 | snprintf(bl_name, sizeof(bl_name), "appledisplay%d", | 282 | snprintf(bl_name, sizeof(bl_name), "appledisplay%d", |
283 | atomic_inc_return(&count_displays) - 1); | 283 | atomic_inc_return(&count_displays) - 1); |
284 | pdata->bd = backlight_device_register(bl_name, NULL, | 284 | pdata->bd = backlight_device_register(bl_name, NULL, pdata, |
285 | pdata, &appledisplay_bl_data); | 285 | &appledisplay_bl_data); |
286 | if (IS_ERR(pdata->bd)) { | 286 | if (IS_ERR(pdata->bd)) { |
287 | err("appledisplay: Backlight registration failed"); | 287 | err("appledisplay: Backlight registration failed"); |
288 | goto error; | 288 | goto error; |