diff options
author | blogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-01-26 04:24:05 +0000 |
---|---|---|
committer | blogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2008-01-26 04:24:05 +0000 |
commit | ab09debb66b84bcf763fa475feb80420232df791 (patch) | |
tree | 8995d076d8b2e07f68850ec8aa018b34044b1206 /target/linux/generic-2.6/files/drivers | |
parent | 3610f7a9eec2bfdc902e0928dccf28e93734f704 (diff) |
add userspace tool for gpio_dev
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10267 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic-2.6/files/drivers')
-rw-r--r-- | target/linux/generic-2.6/files/drivers/gpio/gpio_dev.c | 4 |
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 2adbb96d4..690a3fb8c 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: |