drivers/w1/masters/w1-gpio.c: fix read_bit()

W1 master implementations are expected to return 0 or 1 from their
read_bit() function. However, not all platforms do return these values
from gpio_get_value() - namely PXAs won't. Hence the w1 gpio-master needs
to break the result down to 0 or 1 itself.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Ville Syrjala <syrjala@sci.fi>
Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Daniel Mack and committed by Linus Torvalds 8d0df7a3 00699e84

+1 -1
+1 -1
drivers/w1/masters/w1-gpio.c
··· 39 { 40 struct w1_gpio_platform_data *pdata = data; 41 42 - return gpio_get_value(pdata->pin); 43 } 44 45 static int __init w1_gpio_probe(struct platform_device *pdev)
··· 39 { 40 struct w1_gpio_platform_data *pdata = data; 41 42 + return gpio_get_value(pdata->pin) ? 1 : 0; 43 } 44 45 static int __init w1_gpio_probe(struct platform_device *pdev)