Re: [PATCH 04/14] dell-laptop: Update rfkill state on kill switch

From: Dmitry Torokhov
Date: Sat Feb 27 2010 - 03:07:09 EST


Hi Matthew,

On Fri, Feb 26, 2010 at 10:18:37AM -0500, Matthew Garrett wrote:
> +
> static int __init dell_init(void)
> {
> struct calling_interface_buffer buffer;
> @@ -373,6 +410,13 @@ static int __init dell_init(void)
> goto fail_rfkill;
> }
>
> + ret = i8042_install_filter(dell_laptop_i8042_filter);
> + if (ret) {
> + printk(KERN_WARNING
> + "dell-laptop: Unable to install key filter\n");
> + goto fail_filter;
> + }
> +
> #ifdef CONFIG_ACPI
> /* In the event of an ACPI backlight being available, don't
> * register the platform controller.
> @@ -410,6 +454,8 @@ static int __init dell_init(void)
> return 0;
>
> fail_backlight:
> + i8042_remove_filter(dell_laptop_i8042_filter);

cancel_delayed_work_sync() is missing.

> +fail_filter:
> dell_cleanup_rfkill();
> fail_rfkill:
> platform_device_del(platform_device);
> @@ -424,6 +470,8 @@ fail_platform_driver:
>
> static void __exit dell_exit(void)
> {
> + cancel_delayed_work_sync(&dell_rfkill_work);
> + i8042_remove_filter(dell_laptop_i8042_filter);

Wrong order, you need to unregister filter first.

> backlight_device_unregister(dell_backlight_device);
> dell_cleanup_rfkill();

Thanks.

--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/