On Wed, 2011-04-06 at 11:21 +0200, Antonio Ospite wrote:

> +     if (regulator_is_enabled(vcc)) {
> +             dev_dbg(&pdev->dev, "Regulator already enabled\n");
> +             rfkill_data->reg_enabled = 1;
> +     }
> +     rfkill_init_sw_state(rf_kill, !rfkill_data->reg_enabled);
> +
> +     ret = rfkill_register(rf_kill);

We recently had a thread about how rfkill_init_sw_state() isn't quite
working the right way. Also, it is indented to be used for devices that
keep their state over resume. I think you should remove it here and rely
on rfkill to sync you after registration.

Cf. the long thread here:
http://thread.gmane.org/gmane.linux.acpi.devel/49577

Other than that, no comments from me from an rfkill POV.

johannes



Reply via email to