hwmon: (tmp102) Don't always stop chip at exit
authorJean Delvare <khali@linux-fr.org>
Thu, 27 May 2010 17:58:59 +0000 (19:58 +0200)
committerJean Delvare <khali@linux-fr.org>
Thu, 27 May 2010 17:58:59 +0000 (19:58 +0200)
commit38806bda6b7c8473c47a967a514260c1a1c32c2e
treee52a767e565e0f6361c34a77418b6cd68e292b70
parent8d4dee98b10050db9c32a449e460a2f69bb558ec
hwmon: (tmp102) Don't always stop chip at exit

Only stop the chip at driver exit if it was stopped when driver was
loaded. Leave it running otherwise.

Also restore the device configuration if probe failed, to not leave
the system in a dangling state.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Steven King <sfking@fdwdc.com>
drivers/hwmon/tmp102.c