mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
add userspace tool for gpio_dev
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10267 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user