Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/gpio When returning the old value, use the value rea...
details: https://anonhg.NetBSD.org/src/rev/8bf1e5dd4329
branches: trunk
changeset: 786909:8bf1e5dd4329
user: mbalmer <mbalmer%NetBSD.org@localhost>
date: Mon May 20 15:46:41 2013 +0000
description:
When returning the old value, use the value read from the device.
diffstat:
sys/dev/gpio/gpio.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r c063e8e906c4 -r 8bf1e5dd4329 sys/dev/gpio/gpio.c
--- a/sys/dev/gpio/gpio.c Mon May 20 15:13:36 2013 +0000
+++ b/sys/dev/gpio/gpio.c Mon May 20 15:46:41 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gpio.c,v 1.51 2012/10/17 21:35:39 dyoung Exp $ */
+/* $NetBSD: gpio.c,v 1.52 2013/05/20 15:46:41 mbalmer Exp $ */
/* $OpenBSD: gpio.c,v 1.6 2006/01/14 12:33:49 grange Exp $ */
/*
@@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.51 2012/10/17 21:35:39 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.52 2013/05/20 15:46:41 mbalmer Exp $");
/*
* General Purpose Input/Output framework.
@@ -562,9 +562,9 @@
if (value != GPIO_PIN_LOW && value != GPIO_PIN_HIGH)
return EINVAL;
+ /* return old value */
+ req->gp_value = gpiobus_pin_read(gc, pin);
gpiobus_pin_write(gc, pin, value);
- /* return old value */
- req->gp_value = sc->sc_pins[pin].pin_state;
/* update current value */
sc->sc_pins[pin].pin_state = value;
break;
Home |
Main Index |
Thread Index |
Old Index