Re: [PATCH] drivers/acpi/video: fix brightness allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 13, 2008 at 2:00 AM, Andrew Morton
<akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Thu, 12 Jun 2008 17:47:09 +0100
> "Julia Jomantaite" <julia.jomantaite@xxxxxxxxx> wrote:
>
>> ACPI Video Driver module (drivers/acpi/video.c) produces Oops message
>> after pressing one of two Fn+<key> combinations responsible for switching
>> the brightness level on my laptop.
>>
>> The source of this problem is in the function acpi_video_switch_brightness
>> which can access device->brightness when it is not allocated. Function
>> "acpi_video_device_find_cap" which is responsible for allocating
>> device->brightness can leave it unallocated in some cases.
>>
>> Function acpi_video_switch_brightness isn't called if modules's parameter
>> "brightness_switch_enabled" is equal to zero so i've decided to add
>> zeroing of this parameter to the part of the code where unsuccessfull
>> allocation of device->brightness was handled.
>>
>> Also i've moved initialization of brightness to a separate function
>> "acpi_video_init_brightness" to improve readability of the code and
>> to simplify error handling.
>>
>
> (cc's added)
>
> Thanks.  Which kernel version were you running?

This patch is for the latest version of kernel from git  (linux-2.6),
but the similar allocation problem exists on earlier versions of
kernel ( for example 2.6.22 and 2.6.23).

> The patch was a bit wordwrapped.  Here's the fixed up version:

Thank you.
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux