Re: [PATCH v4] topstar-laptop: add new driver for hotkeys support on Topstar N01

Bjorn Helgaas
2009-09-14T15:30:13Z

On Friday 11 September 2009 10:55:45 pm Herton Ronaldo Krzesinski wrote:
> +static int acpi_topstar_remove(struct acpi_device *device, int type)
> +{
> + struct topstar_hkey *tps_hkey = acpi_driver_data(device);
> +
> + acpi_topstar_fncx_switch(device, false);
> +
> + input_unregister_device(tps_hkey->inputdev);
> + kfree(tps_hkey);
> + device->driver_data = NULL;

I think you should remove this "driver_data = NULL" assignment.
Clearing it in the driver helps cover up bugs like the one Alan
just fixed:
http://marc.info/?l=linux-acpi&m=125276975701005&w=2

Bjorn