Re: [PATCH 2/2 update] misc: Add dell-laptop driver

none
2008-12-03T13:01:44Z

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