diff options
Diffstat (limited to 'drivers/gpio/gpiolib-cdev.c')
| -rw-r--r-- | drivers/gpio/gpiolib-cdev.c | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c index f8041d4898d1..92f185575e94 100644 --- a/drivers/gpio/gpiolib-cdev.c +++ b/drivers/gpio/gpiolib-cdev.c @@ -1986,7 +1986,6 @@ static int lineevent_create(struct gpio_device *gdev, void __user *ip)  		ret = -ENODEV;  		goto out_free_le;  	} -	le->irq = irq;  	if (eflags & GPIOEVENT_REQUEST_RISING_EDGE)  		irqflags |= test_bit(FLAG_ACTIVE_LOW, &desc->flags) ? @@ -2000,7 +1999,7 @@ static int lineevent_create(struct gpio_device *gdev, void __user *ip)  	init_waitqueue_head(&le->wait);  	/* Request a thread to read the events */ -	ret = request_threaded_irq(le->irq, +	ret = request_threaded_irq(irq,  				   lineevent_irq_handler,  				   lineevent_irq_thread,  				   irqflags, @@ -2009,6 +2008,8 @@ static int lineevent_create(struct gpio_device *gdev, void __user *ip)  	if (ret)  		goto out_free_le; +	le->irq = irq; +  	fd = get_unused_fd_flags(O_RDONLY | O_CLOEXEC);  	if (fd < 0) {  		ret = fd; |