diff options
author | Jean Delvare <khali@linux-fr.org> | 2010-01-31 04:00:30 +0000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-02-03 17:39:49 +1100 |
commit | 33a470f6d5e1879c26f16f6b34dc09f82d44f6e9 (patch) | |
tree | fc3111cc16b918e9a5f643118653f8b163184a24 /drivers/ieee802154 | |
parent | 119ea10947cc1402abbf9d6200815b0606536906 (diff) |
macintosh/therm_adt746x: Fix sysfs attributes lifetime
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>
Cc: stable@kernel.org
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/ieee802154')
0 files changed, 0 insertions, 0 deletions