diff options
author | Thomas Renninger <trenn@suse.de> | 2006-06-26 23:58:43 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-06-26 23:58:43 -0400 |
commit | a6fc67202e0224e6c9d1d285cc0b444bce887ed5 (patch) | |
tree | cb2d422f65c0ab0a95f452f6bac80e2bfdd547de /drivers/acpi/video.c | |
parent | eb99adde31b7d85c67a5e1c2fa5e098e1056dd79 (diff) |
ACPI: Enable ACPI error messages w/o CONFIG_ACPI_DEBUG
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r-- | drivers/acpi/video.c | 50 |
1 files changed, 16 insertions, 34 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index e7e9a693953a..7854a4a9572b 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -324,7 +324,7 @@ acpi_video_device_lcd_query_levels(struct acpi_video_device *device, | |||
324 | return_VALUE(status); | 324 | return_VALUE(status); |
325 | obj = (union acpi_object *)buffer.pointer; | 325 | obj = (union acpi_object *)buffer.pointer; |
326 | if (!obj || (obj->type != ACPI_TYPE_PACKAGE)) { | 326 | if (!obj || (obj->type != ACPI_TYPE_PACKAGE)) { |
327 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _BCL data\n")); | 327 | ACPI_ERROR((AE_INFO, "Invalid _BCL data")); |
328 | status = -EFAULT; | 328 | status = -EFAULT; |
329 | goto err; | 329 | goto err; |
330 | } | 330 | } |
@@ -399,7 +399,7 @@ acpi_video_device_EDID(struct acpi_video_device *device, | |||
399 | if (obj && obj->type == ACPI_TYPE_BUFFER) | 399 | if (obj && obj->type == ACPI_TYPE_BUFFER) |
400 | *edid = obj; | 400 | *edid = obj; |
401 | else { | 401 | else { |
402 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _DDC data\n")); | 402 | ACPI_ERROR((AE_INFO, "Invalid _DDC data")); |
403 | status = -EFAULT; | 403 | status = -EFAULT; |
404 | kfree(obj); | 404 | kfree(obj); |
405 | } | 405 | } |
@@ -560,8 +560,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) | |||
560 | o = (union acpi_object *)&obj->package. | 560 | o = (union acpi_object *)&obj->package. |
561 | elements[i]; | 561 | elements[i]; |
562 | if (o->type != ACPI_TYPE_INTEGER) { | 562 | if (o->type != ACPI_TYPE_INTEGER) { |
563 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 563 | ACPI_ERROR((AE_INFO, "Invalid data")); |
564 | "Invalid data\n")); | ||
565 | continue; | 564 | continue; |
566 | } | 565 | } |
567 | br->levels[count] = (u32) o->integer.value; | 566 | br->levels[count] = (u32) o->integer.value; |
@@ -904,8 +903,7 @@ static int acpi_video_device_add_fs(struct acpi_device *device) | |||
904 | /* 'info' [R] */ | 903 | /* 'info' [R] */ |
905 | entry = create_proc_entry("info", S_IRUGO, acpi_device_dir(device)); | 904 | entry = create_proc_entry("info", S_IRUGO, acpi_device_dir(device)); |
906 | if (!entry) | 905 | if (!entry) |
907 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 906 | return_VALUE(-ENODEV); |
908 | "Unable to create 'info' fs entry\n")); | ||
909 | else { | 907 | else { |
910 | entry->proc_fops = &acpi_video_device_info_fops; | 908 | entry->proc_fops = &acpi_video_device_info_fops; |
911 | entry->data = acpi_driver_data(device); | 909 | entry->data = acpi_driver_data(device); |
@@ -917,8 +915,7 @@ static int acpi_video_device_add_fs(struct acpi_device *device) | |||
917 | create_proc_entry("state", S_IFREG | S_IRUGO | S_IWUSR, | 915 | create_proc_entry("state", S_IFREG | S_IRUGO | S_IWUSR, |
918 | acpi_device_dir(device)); | 916 | acpi_device_dir(device)); |
919 | if (!entry) | 917 | if (!entry) |
920 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 918 | return_VALUE(-ENODEV); |
921 | "Unable to create 'state' fs entry\n")); | ||
922 | else { | 919 | else { |
923 | acpi_video_device_state_fops.write = acpi_video_device_write_state; | 920 | acpi_video_device_state_fops.write = acpi_video_device_write_state; |
924 | entry->proc_fops = &acpi_video_device_state_fops; | 921 | entry->proc_fops = &acpi_video_device_state_fops; |
@@ -931,8 +928,7 @@ static int acpi_video_device_add_fs(struct acpi_device *device) | |||
931 | create_proc_entry("brightness", S_IFREG | S_IRUGO | S_IWUSR, | 928 | create_proc_entry("brightness", S_IFREG | S_IRUGO | S_IWUSR, |
932 | acpi_device_dir(device)); | 929 | acpi_device_dir(device)); |
933 | if (!entry) | 930 | if (!entry) |
934 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 931 | return_VALUE(-ENODEV); |
935 | "Unable to create 'brightness' fs entry\n")); | ||
936 | else { | 932 | else { |
937 | acpi_video_device_brightness_fops.write = acpi_video_device_write_brightness; | 933 | acpi_video_device_brightness_fops.write = acpi_video_device_write_brightness; |
938 | entry->proc_fops = &acpi_video_device_brightness_fops; | 934 | entry->proc_fops = &acpi_video_device_brightness_fops; |
@@ -943,8 +939,7 @@ static int acpi_video_device_add_fs(struct acpi_device *device) | |||
943 | /* 'EDID' [R] */ | 939 | /* 'EDID' [R] */ |
944 | entry = create_proc_entry("EDID", S_IRUGO, acpi_device_dir(device)); | 940 | entry = create_proc_entry("EDID", S_IRUGO, acpi_device_dir(device)); |
945 | if (!entry) | 941 | if (!entry) |
946 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 942 | return_VALUE(-ENODEV); |
947 | "Unable to create 'brightness' fs entry\n")); | ||
948 | else { | 943 | else { |
949 | entry->proc_fops = &acpi_video_device_EDID_fops; | 944 | entry->proc_fops = &acpi_video_device_EDID_fops; |
950 | entry->data = acpi_driver_data(device); | 945 | entry->data = acpi_driver_data(device); |
@@ -1200,8 +1195,7 @@ static int acpi_video_bus_add_fs(struct acpi_device *device) | |||
1200 | /* 'info' [R] */ | 1195 | /* 'info' [R] */ |
1201 | entry = create_proc_entry("info", S_IRUGO, acpi_device_dir(device)); | 1196 | entry = create_proc_entry("info", S_IRUGO, acpi_device_dir(device)); |
1202 | if (!entry) | 1197 | if (!entry) |
1203 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1198 | return_VALUE(-ENODEV); |
1204 | "Unable to create 'info' fs entry\n")); | ||
1205 | else { | 1199 | else { |
1206 | entry->proc_fops = &acpi_video_bus_info_fops; | 1200 | entry->proc_fops = &acpi_video_bus_info_fops; |
1207 | entry->data = acpi_driver_data(device); | 1201 | entry->data = acpi_driver_data(device); |
@@ -1211,8 +1205,7 @@ static int acpi_video_bus_add_fs(struct acpi_device *device) | |||
1211 | /* 'ROM' [R] */ | 1205 | /* 'ROM' [R] */ |
1212 | entry = create_proc_entry("ROM", S_IRUGO, acpi_device_dir(device)); | 1206 | entry = create_proc_entry("ROM", S_IRUGO, acpi_device_dir(device)); |
1213 | if (!entry) | 1207 | if (!entry) |
1214 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1208 | return_VALUE(-ENODEV); |
1215 | "Unable to create 'ROM' fs entry\n")); | ||
1216 | else { | 1209 | else { |
1217 | entry->proc_fops = &acpi_video_bus_ROM_fops; | 1210 | entry->proc_fops = &acpi_video_bus_ROM_fops; |
1218 | entry->data = acpi_driver_data(device); | 1211 | entry->data = acpi_driver_data(device); |
@@ -1223,8 +1216,7 @@ static int acpi_video_bus_add_fs(struct acpi_device *device) | |||
1223 | entry = | 1216 | entry = |
1224 | create_proc_entry("POST_info", S_IRUGO, acpi_device_dir(device)); | 1217 | create_proc_entry("POST_info", S_IRUGO, acpi_device_dir(device)); |
1225 | if (!entry) | 1218 | if (!entry) |
1226 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1219 | return_VALUE(-ENODEV); |
1227 | "Unable to create 'POST_info' fs entry\n")); | ||
1228 | else { | 1220 | else { |
1229 | entry->proc_fops = &acpi_video_bus_POST_info_fops; | 1221 | entry->proc_fops = &acpi_video_bus_POST_info_fops; |
1230 | entry->data = acpi_driver_data(device); | 1222 | entry->data = acpi_driver_data(device); |
@@ -1236,8 +1228,7 @@ static int acpi_video_bus_add_fs(struct acpi_device *device) | |||
1236 | create_proc_entry("POST", S_IFREG | S_IRUGO | S_IRUSR, | 1228 | create_proc_entry("POST", S_IFREG | S_IRUGO | S_IRUSR, |
1237 | acpi_device_dir(device)); | 1229 | acpi_device_dir(device)); |
1238 | if (!entry) | 1230 | if (!entry) |
1239 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1231 | return_VALUE(-ENODEV); |
1240 | "Unable to create 'POST' fs entry\n")); | ||
1241 | else { | 1232 | else { |
1242 | acpi_video_bus_POST_fops.write = acpi_video_bus_write_POST; | 1233 | acpi_video_bus_POST_fops.write = acpi_video_bus_write_POST; |
1243 | entry->proc_fops = &acpi_video_bus_POST_fops; | 1234 | entry->proc_fops = &acpi_video_bus_POST_fops; |
@@ -1250,8 +1241,7 @@ static int acpi_video_bus_add_fs(struct acpi_device *device) | |||
1250 | create_proc_entry("DOS", S_IFREG | S_IRUGO | S_IRUSR, | 1241 | create_proc_entry("DOS", S_IFREG | S_IRUGO | S_IRUSR, |
1251 | acpi_device_dir(device)); | 1242 | acpi_device_dir(device)); |
1252 | if (!entry) | 1243 | if (!entry) |
1253 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1244 | return_VALUE(-ENODEV); |
1254 | "Unable to create 'DOS' fs entry\n")); | ||
1255 | else { | 1245 | else { |
1256 | acpi_video_bus_DOS_fops.write = acpi_video_bus_write_DOS; | 1246 | acpi_video_bus_DOS_fops.write = acpi_video_bus_write_DOS; |
1257 | entry->proc_fops = &acpi_video_bus_DOS_fops; | 1247 | entry->proc_fops = &acpi_video_bus_DOS_fops; |
@@ -1446,13 +1436,13 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video) | |||
1446 | 1436 | ||
1447 | status = acpi_evaluate_object(video->handle, "_DOD", NULL, &buffer); | 1437 | status = acpi_evaluate_object(video->handle, "_DOD", NULL, &buffer); |
1448 | if (!ACPI_SUCCESS(status)) { | 1438 | if (!ACPI_SUCCESS(status)) { |
1449 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _DOD\n")); | 1439 | ACPI_EXCEPTION((AE_INFO, status, "Evaluating _DOD")); |
1450 | return_VALUE(status); | 1440 | return_VALUE(status); |
1451 | } | 1441 | } |
1452 | 1442 | ||
1453 | dod = (union acpi_object *)buffer.pointer; | 1443 | dod = (union acpi_object *)buffer.pointer; |
1454 | if (!dod || (dod->type != ACPI_TYPE_PACKAGE)) { | 1444 | if (!dod || (dod->type != ACPI_TYPE_PACKAGE)) { |
1455 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _DOD data\n")); | 1445 | ACPI_EXCEPTION((AE_INFO, status, "Invalid _DOD data")); |
1456 | status = -EFAULT; | 1446 | status = -EFAULT; |
1457 | goto out; | 1447 | goto out; |
1458 | } | 1448 | } |
@@ -1476,8 +1466,7 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video) | |||
1476 | obj = (union acpi_object *)&dod->package.elements[i]; | 1466 | obj = (union acpi_object *)&dod->package.elements[i]; |
1477 | 1467 | ||
1478 | if (obj->type != ACPI_TYPE_INTEGER) { | 1468 | if (obj->type != ACPI_TYPE_INTEGER) { |
1479 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1469 | ACPI_ERROR((AE_INFO, "Invalid _DOD data")); |
1480 | "Invalid _DOD data\n")); | ||
1481 | active_device_list[i].value.int_val = | 1470 | active_device_list[i].value.int_val = |
1482 | ACPI_VIDEO_HEAD_INVALID; | 1471 | ACPI_VIDEO_HEAD_INVALID; |
1483 | } | 1472 | } |
@@ -1591,8 +1580,7 @@ acpi_video_bus_get_devices(struct acpi_video_bus *video, | |||
1591 | 1580 | ||
1592 | status = acpi_video_bus_get_one_device(dev, video); | 1581 | status = acpi_video_bus_get_one_device(dev, video); |
1593 | if (ACPI_FAILURE(status)) { | 1582 | if (ACPI_FAILURE(status)) { |
1594 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1583 | ACPI_EXCEPTION((AE_INFO, status, "Cant attach device")); |
1595 | "Cant attach device\n")); | ||
1596 | continue; | 1584 | continue; |
1597 | } | 1585 | } |
1598 | 1586 | ||
@@ -1620,9 +1608,6 @@ static int acpi_video_bus_put_one_device(struct acpi_video_device *device) | |||
1620 | status = acpi_remove_notify_handler(device->handle, | 1608 | status = acpi_remove_notify_handler(device->handle, |
1621 | ACPI_DEVICE_NOTIFY, | 1609 | ACPI_DEVICE_NOTIFY, |
1622 | acpi_video_device_notify); | 1610 | acpi_video_device_notify); |
1623 | if (ACPI_FAILURE(status)) | ||
1624 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | ||
1625 | "Error removing notify handler\n")); | ||
1626 | 1611 | ||
1627 | return_VALUE(0); | 1612 | return_VALUE(0); |
1628 | } | 1613 | } |
@@ -1826,9 +1811,6 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type) | |||
1826 | status = acpi_remove_notify_handler(video->handle, | 1811 | status = acpi_remove_notify_handler(video->handle, |
1827 | ACPI_DEVICE_NOTIFY, | 1812 | ACPI_DEVICE_NOTIFY, |
1828 | acpi_video_bus_notify); | 1813 | acpi_video_bus_notify); |
1829 | if (ACPI_FAILURE(status)) | ||
1830 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | ||
1831 | "Error removing notify handler\n")); | ||
1832 | 1814 | ||
1833 | acpi_video_bus_put_devices(video); | 1815 | acpi_video_bus_put_devices(video); |
1834 | acpi_video_bus_remove_fs(device); | 1816 | acpi_video_bus_remove_fs(device); |