diff options
Diffstat (limited to 'drivers/sbus/char/uctrl.c')
-rw-r--r-- | drivers/sbus/char/uctrl.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c index 383f32c1d34..777637594ac 100644 --- a/drivers/sbus/char/uctrl.c +++ b/drivers/sbus/char/uctrl.c @@ -9,6 +9,7 @@ #include <linux/delay.h> #include <linux/interrupt.h> #include <linux/slab.h> +#include <linux/smp_lock.h> #include <linux/ioport.h> #include <linux/init.h> #include <linux/miscdevice.h> @@ -194,8 +195,8 @@ struct uctrl_driver { static struct uctrl_driver drv; -void uctrl_get_event_status(void); -void uctrl_get_external_status(void); +static void uctrl_get_event_status(void); +static void uctrl_get_external_status(void); static int uctrl_ioctl(struct inode *inode, struct file *file, @@ -211,8 +212,10 @@ uctrl_ioctl(struct inode *inode, struct file *file, static int uctrl_open(struct inode *inode, struct file *file) { + lock_kernel(); uctrl_get_event_status(); uctrl_get_external_status(); + unlock_kernel(); return 0; } @@ -263,12 +266,6 @@ static struct miscdevice uctrl_dev = { driver->regs->uctrl_stat = UCTRL_STAT_RXNE_STA; \ } -void uctrl_set_video(int status) -{ - struct uctrl_driver *driver = &drv; - -} - static void uctrl_do_txn(struct uctrl_txn *txn) { struct uctrl_driver *driver = &drv; @@ -308,7 +305,7 @@ static void uctrl_do_txn(struct uctrl_txn *txn) } } -void uctrl_get_event_status(void) +static void uctrl_get_event_status(void) { struct uctrl_driver *driver = &drv; struct uctrl_txn txn; @@ -328,7 +325,7 @@ void uctrl_get_event_status(void) dprintk(("ev is %x\n", driver->status.event_status)); } -void uctrl_get_external_status(void) +static void uctrl_get_external_status(void) { struct uctrl_driver *driver = &drv; struct uctrl_txn txn; @@ -360,7 +357,7 @@ void uctrl_get_external_status(void) static int __init ts102_uctrl_init(void) { struct uctrl_driver *driver = &drv; - int len, i; + int len; struct linux_prom_irqs tmp_irq[2]; unsigned int vaddr[2] = { 0, 0 }; int tmpnode, uctrlnode = prom_getchild(prom_root_node); |