lkml.org 
[lkml]   [2008]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/2 update] misc: Add dell-laptop driver
From
Matthew Garrett wrote:
> misc: Add dell-laptop driver
>
> Add a driver for controling Dell-specific backlight and rfkill interfaces.
> This driver makes use of the dcdbas interface to the Dell firmware to allow
> the backlight and rfkill interfaces on Dell systems to be driven through the
> standardised sysfs interfaces.
>
> Signed-off-by: Matthew Garrett <mjg@redhat.com>
>
> ---
>
> Contains Andrew's suggested updates, plus a fix for a leak on the init
> error path.
>

Sorry, I should have mentioned this in my first message:

> + if ((status & (1<<2|1<<8)) == (1<<2|1<<8)) {
> + wifi_rfkill = rfkill_allocate(NULL, RFKILL_TYPE_WLAN);
> + if (!wifi_rfkill)
> + goto err_wifi;
> + wifi_rfkill->name = "dell-wifi";
> + wifi_rfkill->toggle_radio = dell_wifi_set;
> + wifi_rfkill->get_state = dell_wifi_get;
>

The rfkill doc (and code) say that you also need to initialize
wifi_rfkill->state to the current state of the hardware.

> + ret = rfkill_register(wifi_rfkill);
> + if (ret)
> + goto err_wifi;
> + }
> +

Regards
Alan


\
 
 \ /
  Last update: 2008-12-03 14:03    [W:0.136 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site