Input: ucb1400_ts - allow passing IRQ through platfrom_data
This patch allows UCB1400 to get IRQ GPIO from platform data. In case platform_data are not supplied or the IRQ supplied in the platform_data is negative, fall back to the old IRQ detection algorithm. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:

committed by
Dmitry Torokhov

parent
765af10de6
commit
fb14159755
@@ -355,10 +355,13 @@ static int ucb1400_ts_probe(struct platform_device *dev)
|
||||
goto err;
|
||||
}
|
||||
|
||||
error = ucb1400_ts_detect_irq(ucb);
|
||||
if (error) {
|
||||
printk(KERN_ERR "UCB1400: IRQ probe failed\n");
|
||||
goto err_free_devs;
|
||||
/* Only in case the IRQ line wasn't supplied, try detecting it */
|
||||
if (ucb->irq < 0) {
|
||||
error = ucb1400_ts_detect_irq(ucb);
|
||||
if (error) {
|
||||
printk(KERN_ERR "UCB1400: IRQ probe failed\n");
|
||||
goto err_free_devs;
|
||||
}
|
||||
}
|
||||
|
||||
init_waitqueue_head(&ucb->ts_wait);
|
||||
|
Reference in New Issue
Block a user