diff options
Diffstat (limited to 'drivers/sbus/char/uctrl.c')
-rw-r--r-- | drivers/sbus/char/uctrl.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c index b30372f17f1..44d2ef906ac 100644 --- a/drivers/sbus/char/uctrl.c +++ b/drivers/sbus/char/uctrl.c @@ -5,7 +5,6 @@ */ #include <linux/module.h> -#include <linux/sched.h> #include <linux/errno.h> #include <linux/delay.h> #include <linux/interrupt.h> @@ -224,7 +223,7 @@ static irqreturn_t uctrl_interrupt(int irq, void *dev_id) return IRQ_HANDLED; } -static struct file_operations uctrl_fops = { +static const struct file_operations uctrl_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .ioctl = uctrl_ioctl, @@ -365,6 +364,7 @@ static int __init ts102_uctrl_init(void) struct linux_prom_irqs tmp_irq[2]; unsigned int vaddr[2] = { 0, 0 }; int tmpnode, uctrlnode = prom_getchild(prom_root_node); + int err; tmpnode = prom_searchsiblings(uctrlnode, "obio"); @@ -390,7 +390,12 @@ static int __init ts102_uctrl_init(void) if(!driver->irq) driver->irq = tmp_irq[0].pri; - request_irq(driver->irq, uctrl_interrupt, 0, "uctrl", driver); + err = request_irq(driver->irq, uctrl_interrupt, 0, "uctrl", driver); + if (err) { + printk("%s: unable to register irq %d\n", + __FUNCTION__, driver->irq); + return err; + } if (misc_register(&uctrl_dev)) { printk("%s: unable to get misc minor %d\n", |