summaryrefslogtreecommitdiff
path: root/target/linux
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2008-01-26 04:24:05 +0000
committerJohn Crispin <john@openwrt.org>2008-01-26 04:24:05 +0000
commit8f39c35159a208f1d36b9912c5d307c543203b2c (patch)
tree8dbcb9d395715c1aa5bef2a4c6b6d75defb43dbb /target/linux
parentd7b86662f7fccf36e3091cdd5f7116d0a0a28279 (diff)
downloadmtk-20170518-8f39c35159a208f1d36b9912c5d307c543203b2c.zip
mtk-20170518-8f39c35159a208f1d36b9912c5d307c543203b2c.tar.gz
mtk-20170518-8f39c35159a208f1d36b9912c5d307c543203b2c.tar.bz2
add userspace tool for gpio_dev
SVN-Revision: 10267
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/generic-2.6/files/drivers/gpio/gpio_dev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/generic-2.6/files/drivers/gpio/gpio_dev.c b/target/linux/generic-2.6/files/drivers/gpio/gpio_dev.c
index 2adbb96..690a3fb 100644
--- a/target/linux/generic-2.6/files/drivers/gpio/gpio_dev.c
+++ b/target/linux/generic-2.6/files/drivers/gpio/gpio_dev.c
@@ -44,7 +44,7 @@ gpio_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigned
{
int retval = 0;
- if ((arg & gpio_access_mask) != arg)
+ if (((1 << arg) & gpio_access_mask) != (1 << arg))
{
retval = -EINVAL;
goto out;
@@ -57,7 +57,7 @@ gpio_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigned
break;
case GPIO_SET:
- gpio_set_value(arg, 0);
+ gpio_set_value(arg, 1);
break;
case GPIO_CLEAR: