aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar7/files/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ar7/files/drivers/char')
-rw-r--r--target/linux/ar7/files/drivers/char/ar7_gpio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/ar7/files/drivers/char/ar7_gpio.c b/target/linux/ar7/files/drivers/char/ar7_gpio.c
index a7d0a55345..71310fa751 100644
--- a/target/linux/ar7/files/drivers/char/ar7_gpio.c
+++ b/target/linux/ar7/files/drivers/char/ar7_gpio.c
@@ -41,7 +41,7 @@ static int ar7_gpio_major;
static ssize_t ar7_gpio_write(struct file *file, const char __user *buf,
size_t len, loff_t *ppos)
{
- int pin = iminor(file->f_dentry->d_inode);
+ int pin = iminor(file->f_path.dentry->d_inode);
size_t i;
for (i = 0; i < len; ++i) {
@@ -84,7 +84,7 @@ static ssize_t ar7_gpio_write(struct file *file, const char __user *buf,
static ssize_t ar7_gpio_read(struct file *file, char __user *buf,
size_t len, loff_t *ppos)
{
- int pin = iminor(file->f_dentry->d_inode);
+ int pin = iminor(file->f_path.dentry->d_inode);
int value;
value = gpio_get_value(pin);