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 383f32c1d347..777637594acd 100644 --- a/drivers/sbus/char/uctrl.c +++ b/drivers/sbus/char/uctrl.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/delay.h> | 9 | #include <linux/delay.h> |
10 | #include <linux/interrupt.h> | 10 | #include <linux/interrupt.h> |
11 | #include <linux/slab.h> | 11 | #include <linux/slab.h> |
12 | #include <linux/smp_lock.h> | ||
12 | #include <linux/ioport.h> | 13 | #include <linux/ioport.h> |
13 | #include <linux/init.h> | 14 | #include <linux/init.h> |
14 | #include <linux/miscdevice.h> | 15 | #include <linux/miscdevice.h> |
@@ -194,8 +195,8 @@ struct uctrl_driver { | |||
194 | 195 | ||
195 | static struct uctrl_driver drv; | 196 | static struct uctrl_driver drv; |
196 | 197 | ||
197 | void uctrl_get_event_status(void); | 198 | static void uctrl_get_event_status(void); |
198 | void uctrl_get_external_status(void); | 199 | static void uctrl_get_external_status(void); |
199 | 200 | ||
200 | static int | 201 | static int |
201 | uctrl_ioctl(struct inode *inode, struct file *file, | 202 | uctrl_ioctl(struct inode *inode, struct file *file, |
@@ -211,8 +212,10 @@ uctrl_ioctl(struct inode *inode, struct file *file, | |||
211 | static int | 212 | static int |
212 | uctrl_open(struct inode *inode, struct file *file) | 213 | uctrl_open(struct inode *inode, struct file *file) |
213 | { | 214 | { |
215 | lock_kernel(); | ||
214 | uctrl_get_event_status(); | 216 | uctrl_get_event_status(); |
215 | uctrl_get_external_status(); | 217 | uctrl_get_external_status(); |
218 | unlock_kernel(); | ||
216 | return 0; | 219 | return 0; |
217 | } | 220 | } |
218 | 221 | ||
@@ -263,12 +266,6 @@ static struct miscdevice uctrl_dev = { | |||
263 | driver->regs->uctrl_stat = UCTRL_STAT_RXNE_STA; \ | 266 | driver->regs->uctrl_stat = UCTRL_STAT_RXNE_STA; \ |
264 | } | 267 | } |
265 | 268 | ||
266 | void uctrl_set_video(int status) | ||
267 | { | ||
268 | struct uctrl_driver *driver = &drv; | ||
269 | |||
270 | } | ||
271 | |||
272 | static void uctrl_do_txn(struct uctrl_txn *txn) | 269 | static void uctrl_do_txn(struct uctrl_txn *txn) |
273 | { | 270 | { |
274 | struct uctrl_driver *driver = &drv; | 271 | struct uctrl_driver *driver = &drv; |
@@ -308,7 +305,7 @@ static void uctrl_do_txn(struct uctrl_txn *txn) | |||
308 | } | 305 | } |
309 | } | 306 | } |
310 | 307 | ||
311 | void uctrl_get_event_status(void) | 308 | static void uctrl_get_event_status(void) |
312 | { | 309 | { |
313 | struct uctrl_driver *driver = &drv; | 310 | struct uctrl_driver *driver = &drv; |
314 | struct uctrl_txn txn; | 311 | struct uctrl_txn txn; |
@@ -328,7 +325,7 @@ void uctrl_get_event_status(void) | |||
328 | dprintk(("ev is %x\n", driver->status.event_status)); | 325 | dprintk(("ev is %x\n", driver->status.event_status)); |
329 | } | 326 | } |
330 | 327 | ||
331 | void uctrl_get_external_status(void) | 328 | static void uctrl_get_external_status(void) |
332 | { | 329 | { |
333 | struct uctrl_driver *driver = &drv; | 330 | struct uctrl_driver *driver = &drv; |
334 | struct uctrl_txn txn; | 331 | struct uctrl_txn txn; |
@@ -360,7 +357,7 @@ void uctrl_get_external_status(void) | |||
360 | static int __init ts102_uctrl_init(void) | 357 | static int __init ts102_uctrl_init(void) |
361 | { | 358 | { |
362 | struct uctrl_driver *driver = &drv; | 359 | struct uctrl_driver *driver = &drv; |
363 | int len, i; | 360 | int len; |
364 | struct linux_prom_irqs tmp_irq[2]; | 361 | struct linux_prom_irqs tmp_irq[2]; |
365 | unsigned int vaddr[2] = { 0, 0 }; | 362 | unsigned int vaddr[2] = { 0, 0 }; |
366 | int tmpnode, uctrlnode = prom_getchild(prom_root_node); | 363 | int tmpnode, uctrlnode = prom_getchild(prom_root_node); |