diff options
Diffstat (limited to 'drivers/sbus')
-rw-r--r-- | drivers/sbus/char/aurora.c | 12 | ||||
-rw-r--r-- | drivers/sbus/char/display7seg.c | 2 | ||||
-rw-r--r-- | drivers/sbus/char/jsflash.c | 19 | ||||
-rw-r--r-- | drivers/sbus/char/rtc.c | 22 | ||||
-rw-r--r-- | drivers/sbus/char/uctrl.c | 10 | ||||
-rw-r--r-- | drivers/sbus/char/vfc.h | 2 | ||||
-rw-r--r-- | drivers/sbus/char/vfc_dev.c | 6 |
7 files changed, 26 insertions, 47 deletions
diff --git a/drivers/sbus/char/aurora.c b/drivers/sbus/char/aurora.c index 672f9f2b2163..92e6c5639dd3 100644 --- a/drivers/sbus/char/aurora.c +++ b/drivers/sbus/char/aurora.c @@ -124,25 +124,25 @@ static inline int aurora_paranoia_check(struct Aurora_port const * port, */ /* Get board number from pointer */ -extern inline int board_No (struct Aurora_board const * bp) +static inline int board_No (struct Aurora_board const * bp) { return bp - aurora_board; } /* Get port number from pointer */ -extern inline int port_No (struct Aurora_port const * port) +static inline int port_No (struct Aurora_port const * port) { return AURORA_PORT(port - aurora_port); } /* Get pointer to board from pointer to port */ -extern inline struct Aurora_board * port_Board(struct Aurora_port const * port) +static inline struct Aurora_board * port_Board(struct Aurora_port const * port) { return &aurora_board[AURORA_BOARD(port - aurora_port)]; } /* Wait for Channel Command Register ready */ -extern inline void aurora_wait_CCR(struct aurora_reg128 * r) +static inline void aurora_wait_CCR(struct aurora_reg128 * r) { unsigned long delay; @@ -161,7 +161,7 @@ printk("aurora_wait_CCR\n"); */ /* Must be called with enabled interrupts */ -extern inline void aurora_long_delay(unsigned long delay) +static inline void aurora_long_delay(unsigned long delay) { unsigned long i; @@ -420,7 +420,7 @@ static void aurora_release_io_range(struct Aurora_board *bp) sbus_iounmap((unsigned long)bp->r3, 4); } -extern inline void aurora_mark_event(struct Aurora_port * port, int event) +static inline void aurora_mark_event(struct Aurora_port * port, int event) { #ifdef AURORA_DEBUG printk("aurora_mark_event: start\n"); diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c index 2c86a4b809cd..c3a51d1fae5d 100644 --- a/drivers/sbus/char/display7seg.c +++ b/drivers/sbus/char/display7seg.c @@ -119,7 +119,7 @@ static long d7s_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { __u8 regs = readb(d7s_regs); __u8 ireg = 0; - int error = 0 + int error = 0; if (D7S_MINOR != iminor(file->f_dentry->d_inode)) return -ENODEV; diff --git a/drivers/sbus/char/jsflash.c b/drivers/sbus/char/jsflash.c index c12c5046e2fa..14631ac11bc7 100644 --- a/drivers/sbus/char/jsflash.c +++ b/drivers/sbus/char/jsflash.c @@ -249,11 +249,11 @@ static loff_t jsf_lseek(struct file * file, loff_t offset, int orig) /* * OS SIMM Cannot be read in other size but a 32bits word. */ -static ssize_t jsf_read(struct file * file, char * buf, +static ssize_t jsf_read(struct file * file, char __user * buf, size_t togo, loff_t *ppos) { unsigned long p = *ppos; - char *tmp = buf; + char __user *tmp = buf; union byte4 { char s[4]; @@ -305,7 +305,7 @@ static ssize_t jsf_read(struct file * file, char * buf, return tmp-buf; } -static ssize_t jsf_write(struct file * file, const char * buf, +static ssize_t jsf_write(struct file * file, const char __user * buf, size_t count, loff_t *ppos) { return -ENOSPC; @@ -356,10 +356,10 @@ static int jsf_ioctl_erase(unsigned long arg) * Program a block of flash. * Very simple because we can do it byte by byte anyway. */ -static int jsf_ioctl_program(unsigned long arg) +static int jsf_ioctl_program(void __user *arg) { struct jsflash_program_arg abuf; - char *uptr; + char __user *uptr; unsigned long p; unsigned int togo; union { @@ -367,13 +367,13 @@ static int jsf_ioctl_program(unsigned long arg) char s[4]; } b; - if (copy_from_user(&abuf, (char *)arg, JSFPRGSZ)) + if (copy_from_user(&abuf, arg, JSFPRGSZ)) return -EFAULT; p = abuf.off; togo = abuf.size; if ((togo & 3) || (p & 3)) return -EINVAL; - uptr = (char *) (unsigned long) abuf.data; + uptr = (char __user *) (unsigned long) abuf.data; while (togo != 0) { togo -= 4; if (copy_from_user(&b.s[0], uptr, 4)) @@ -390,19 +390,20 @@ static int jsf_ioctl(struct inode *inode, struct file *f, unsigned int cmd, unsigned long arg) { int error = -ENOTTY; + void __user *argp = (void __user *)arg; if (!capable(CAP_SYS_ADMIN)) return -EPERM; switch (cmd) { case JSFLASH_IDENT: - if (copy_to_user((void *)arg, &jsf0.id, JSFIDSZ)) + if (copy_to_user(argp, &jsf0.id, JSFIDSZ)) return -EFAULT; break; case JSFLASH_ERASE: error = jsf_ioctl_erase(arg); break; case JSFLASH_PROGRAM: - error = jsf_ioctl_program(arg); + error = jsf_ioctl_program(argp); break; } diff --git a/drivers/sbus/char/rtc.c b/drivers/sbus/char/rtc.c index 5774bdd0e26f..9b988baf0b51 100644 --- a/drivers/sbus/char/rtc.c +++ b/drivers/sbus/char/rtc.c @@ -210,27 +210,6 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, } } -static long rtc_compat_ioctl(struct file *file, unsigned int cmd, - unsigned long arg) -{ - int rval = -ENOIOCTLCMD; - - switch (cmd) { - /* - * These two are specific to this driver, the generic rtc ioctls - * are hanlded elsewhere. - */ - case RTCGET: - case RTCSET: - lock_kernel(); - rval = rtc_ioctl(file->f_dentry->d_inode, file, cmd, arg); - unlock_kernel(); - break; - } - - return rval; -} - static int rtc_open(struct inode *inode, struct file *file) { int ret; @@ -258,7 +237,6 @@ static struct file_operations rtc_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .ioctl = rtc_ioctl, - .compat_ioctl = rtc_compat_ioctl, .open = rtc_open, .release = rtc_release, }; diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c index 858cc683f85c..e2d9a7c85427 100644 --- a/drivers/sbus/char/uctrl.c +++ b/drivers/sbus/char/uctrl.c @@ -309,7 +309,7 @@ static void uctrl_do_txn(struct uctrl_txn *txn) } } -void uctrl_get_event_status() +void uctrl_get_event_status(void) { struct uctrl_driver *driver = &drv; struct uctrl_txn txn; @@ -318,7 +318,7 @@ void uctrl_get_event_status() txn.opcode = READ_EVENT_STATUS; txn.inbits = 0; txn.outbits = 2; - txn.inbuf = 0; + txn.inbuf = NULL; txn.outbuf = outbits; uctrl_do_txn(&txn); @@ -329,7 +329,7 @@ void uctrl_get_event_status() dprintk(("ev is %x\n", driver->status.event_status)); } -void uctrl_get_external_status() +void uctrl_get_external_status(void) { struct uctrl_driver *driver = &drv; struct uctrl_txn txn; @@ -339,7 +339,7 @@ void uctrl_get_external_status() txn.opcode = READ_EXTERNAL_STATUS; txn.inbits = 0; txn.outbits = 2; - txn.inbuf = 0; + txn.inbuf = NULL; txn.outbuf = outbits; uctrl_do_txn(&txn); @@ -414,7 +414,7 @@ static void __exit ts102_uctrl_cleanup(void) if (driver->irq) free_irq(driver->irq, driver); if (driver->regs) - driver->regs = 0; + driver->regs = NULL; } module_init(ts102_uctrl_init); diff --git a/drivers/sbus/char/vfc.h b/drivers/sbus/char/vfc.h index a7782e7da42e..8045cd5e7cb3 100644 --- a/drivers/sbus/char/vfc.h +++ b/drivers/sbus/char/vfc.h @@ -125,7 +125,7 @@ struct vfc_regs { struct vfc_dev { - volatile struct vfc_regs *regs; + volatile struct vfc_regs __iomem *regs; struct vfc_regs *phys_regs; unsigned int control_reg; struct semaphore device_lock_sem; diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c index 7a103698fa3c..dfdd6be551f3 100644 --- a/drivers/sbus/char/vfc_dev.c +++ b/drivers/sbus/char/vfc_dev.c @@ -149,7 +149,7 @@ int init_vfc_device(struct sbus_dev *sdev,struct vfc_dev *dev, int instance) } printk("Initializing vfc%d\n",instance); dev->regs = NULL; - dev->regs = (volatile struct vfc_regs *) + dev->regs = (volatile struct vfc_regs __iomem *) sbus_ioremap(&sdev->resource[0], 0, sizeof(struct vfc_regs), vfcstr); dev->which_io = sdev->reg_addrs[0].which_io; @@ -319,7 +319,7 @@ int vfc_capture_poll(struct vfc_dev *dev) int timeout = 1000; while (!timeout--) { - if (dev->regs->control & VFC_STATUS_CAPTURE) + if (sbus_readl(&dev->regs->control) & VFC_STATUS_CAPTURE) break; vfc_i2c_delay_no_busy(dev, 100); } @@ -718,7 +718,7 @@ static void deinit_vfc_device(struct vfc_dev *dev) if(dev == NULL) return; devfs_remove("vfc/%d", dev->instance); - sbus_iounmap((unsigned long)dev->regs, sizeof(struct vfc_regs)); + sbus_iounmap(dev->regs, sizeof(struct vfc_regs)); kfree(dev); } |