--- linux-2.6.23.1.orig/drivers/acpi/video.c 2007-10-12 18:43:44.000000000 +0200 +++ linux-2.6.23.1/drivers/acpi/video.c 2007-11-22 23:03:03.000000000 +0100 @@ -412,11 +412,23 @@ int status; union acpi_object arg0 = { ACPI_TYPE_INTEGER }; struct acpi_object_list args = { 1, &arg0 }; + int i, best_level = 100, best_match = 100; + for (i = 0; i < device->brightness->count; i++) { + int diff = abs(device->brightness->levels[i] - level); + if (diff == 0) { + best_level = level; + break; + } else if(diff < best_match) { + best_level = device->brightness->levels[i]; + best_match = diff; + } + } - arg0.integer.value = level; + arg0.integer.value = best_level; status = acpi_evaluate_object(device->dev->handle, "_BCM", &args, NULL); + return status; }