i8k: Rework error retries
authorGuenter Roeck <linux@roeck-us.net>
Mon, 12 Jan 2015 13:32:00 +0000 (14:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Jan 2015 17:17:58 +0000 (09:17 -0800)
commit564132d9d62b3151dc6573da794378b5bf0cea17
treebfecf5fc4a7f7a9ec0b698e2d8f54976d2fe5245
parent83d514d76278e85cc74c472dd51687c8eb4faff0
i8k: Rework error retries

Instead of returning a previous value if the SMM code returns
an error when trying to read a temperature, retry once.
If that fails again, return -ENODATA. Also return -ENODATA if an
attempt is made to read the GPU temperature but the GPU is
currently turned off.

Drop the I8K_TEMPERATURE_BUG definition and handle the related bug
unconditionally.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/i8k.c