Re: [PATCH] toshiba_acpi: FULL TOS1900 device support

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

 



Hi Azael,

On Fri, Dec 10, 2010 at 05:06:09PM -0700, Azael Avalos wrote:
> 
> - err_remove_notify:
> -	acpi_remove_notify_handler(toshiba_acpi.handle,
> -				   ACPI_DEVICE_NOTIFY, toshiba_acpi_notify);
> - err_free_keymap:
> +err_free_keymap:
>  	sparse_keymap_free(toshiba_acpi.hotkey_dev);
> - err_free_dev:
> +	if (toshiba_acpi.hci_type == 2)
> +		i8042_remove_filter(toshiba_i8042_filter);

You need to remove filter before you free the keymap. Also
cancel_work_sync() is needed.

> +err_free_dev:
>  	input_free_device(toshiba_acpi.hotkey_dev);
>  	toshiba_acpi.hotkey_dev = NULL;
>  	return error;
>  }
> 

...

> +static int toshiba_acpi_remove(struct acpi_device *device, int type)
> +{
> +	if (toshiba_acpi.hci_type == 2)
> +		i8042_remove_filter(toshiba_i8042_filter);

You also need to call cancel_work_sync() here to make sure the work is
not running while you are tearing down the device.

> +
> +	toshiba_acpi_cleanup();
> +
> +	return 0;
> +}
> +

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux