Re: [PATCH 3/3] ACPI video: Fix applying indexed initial brightness value.

2013-03-15 Thread Aaron Lu
On 03/15/2013 04:55 PM, Danny Baumann wrote: > Hi, > > >> +static unsigned long long >>> +acpi_video_index_to_level(struct acpi_video_device *device, >>> + unsigned long long index) >>> +{ >>> + if (device->brightness->flags._BCL_reversed) >>> + index = device->bri

Re: [PATCH 3/3] ACPI video: Fix applying indexed initial brightness value.

2013-03-15 Thread Danny Baumann
Hi, >> +static unsigned long long +acpi_video_index_to_level(struct acpi_video_device *device, + unsigned long long index) +{ + if (device->brightness->flags._BCL_reversed) + index = device->brightness->count - 3 - index; + + return device->brigh

Re: [PATCH 3/3] ACPI video: Fix applying indexed initial brightness value.

2013-03-15 Thread Aaron Lu
On 03/14/2013 06:34 PM, Danny Baumann wrote: > The value initially read via _BQC also needs to be offset by 2 to > compensate for the first 2 special items in _BCL. Introduce a helper > function to do the conversion in order to not needlessly duplicate code. > --- > drivers/acpi/video.c | 23 +

[PATCH 3/3] ACPI video: Fix applying indexed initial brightness value.

2013-03-14 Thread Danny Baumann
The value initially read via _BQC also needs to be offset by 2 to compensate for the first 2 special items in _BCL. Introduce a helper function to do the conversion in order to not needlessly duplicate code. --- drivers/acpi/video.c | 23 ++- 1 file changed, 14 insertions(+), 9