From: Vivien Didelot Date: Tue, 15 Jan 2013 18:33:06 +0000 (-0500) Subject: hwmon: (sht15) check GPIO directions X-Git-Tag: v3.9-rc1~152^2~26 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=412e29c135c11be6e2e4b22c0691e861b3d946c4;p=pandora-kernel.git hwmon: (sht15) check GPIO directions Without this patch, the SHT15 driver may fail silently with a non-bidirectional data line and/or an input-only clock line. This patch checks the return value of gpio_direction_* function calls and returns the error code (if any) to the caller. If an error occurs in the read work function (work_funct_t), we wake the queue up directly without updating the data->state flag, to notice the waiter of the I/O error. The patch also makes minor cleanups: s/error_ret/unlock for some labels and uses devm_gpio_request_one() for the clock line. Signed-off-by: Vivien Didelot Signed-off-by: Guenter Roeck --- Reading git-diff-tree failed