Files
linux/drivers/macintosh
Jean Delvare 23e87a47dc macintosh/therm_adt746x: Fix sysfs attributes lifetime
commit 33a470f6d5 upstream.

Looking at drivers/macintosh/therm_adt746x.c, the sysfs files are
created in thermostat_init() and removed in thermostat_exit(), which
are the driver's init and exit functions. These files are backed-up by
a per-device structure, so it looks like the wrong thing to do: the
sysfs files have a lifetime longer than the data structure that is
backing it up.

I think that sysfs files creation should be moved to the end of
probe_thermostat() and sysfs files removal should be moved to the
beginning of remove_thermostat().

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Christian Kujau <lists@nerdbynature.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Colin Leroy <colin@colino.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-15 08:49:46 -07:00
..
2008-06-20 14:05:54 -06:00
2008-12-28 20:00:03 +01:00
2008-12-28 20:00:03 +01:00
2009-08-26 23:14:49 +02:00
2008-12-28 20:00:03 +01:00
2009-09-07 14:37:27 +01:00