diff options
author | Adrian Bunk <bunk@kernel.org> | 2008-06-05 11:44:39 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-17 21:38:17 -0700 |
commit | 960681450f8b572f230a8c3661dcc34f39fcc38e (patch) | |
tree | ba38375e57ecdfe2d97bd51b275f2fadaba51a40 /drivers | |
parent | 908f5162ca59ed46a928e8416db159777d432e77 (diff) |
drivers/sbus/: cleanups
This patch contains the following cleanups:
- make the following needlessly global code static:
- char/uctrl.c: uctrl_get_event_status()
- char/uctrl.c: uctrl_get_external_status()
- char/vfc_dev.c: struct vfc_dev_lst
- char/vfc_dev.c: vfc_lock_device()
- char/vfc_dev.c: vfc_unlock_device()
- char/vfc_dev.c: vfc_captstat_reset()
- char/vfc_dev.c: vfc_memptr_reset()
- char/vfc_dev.c: vfc_csr_init()
- char/vfc_dev.c: vfc_saa9051_init()
- char/vfc_dev.c: init_vfc_hw()
- char/vfc_dev.c: init_vfc_devstruct()
- char/vfc_dev.c: init_vfc_device()
- char/vfc_dev.c: vfc_get_dev_ptr()
- char/vfc_dev.c: vfc_capture_start()
- char/vfc_dev.c: vfc_capture_poll()
- char/vfc_dev.c: vfc_port_change_ioctl()
- char/vfc_dev.c: vfc_set_video_ioctl()
- char/vfc_dev.c: vfc_get_video_ioctl()
- char/vfc_i2c.c: vfc_i2c_wait_for_bus()
- char/vfc_i2c.c: vfc_i2c_wait_for_pin()
- char/vfc_i2c.c: vfc_i2c_xmit_addr()
- char/vfc_i2c.c: vfc_i2c_xmit_byte()
- char/vfc_i2c.c: vfc_i2c_recv_byte()
- dvma.c: init_one_dvma()
- remove an unused variable from a function:
- char/uctrl.c: ts102_uctrl_init()
- remove the following unused and empty function:
- char/uctrl.c: uctrl_set_video()
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/sbus/char/uctrl.c | 16 | ||||
-rw-r--r-- | drivers/sbus/char/vfc.h | 4 | ||||
-rw-r--r-- | drivers/sbus/char/vfc_dev.c | 39 | ||||
-rw-r--r-- | drivers/sbus/char/vfc_i2c.c | 12 | ||||
-rw-r--r-- | drivers/sbus/dvma.c | 2 |
5 files changed, 33 insertions, 40 deletions
diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c index 513ba61ae96..777637594ac 100644 --- a/drivers/sbus/char/uctrl.c +++ b/drivers/sbus/char/uctrl.c @@ -195,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, @@ -266,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; @@ -311,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; @@ -331,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; @@ -363,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); diff --git a/drivers/sbus/char/vfc.h b/drivers/sbus/char/vfc.h index f1aa1389ea4..a5240c52aa0 100644 --- a/drivers/sbus/char/vfc.h +++ b/drivers/sbus/char/vfc.h @@ -133,8 +133,6 @@ struct vfc_dev { unsigned char saa9051_state_array[VFC_SAA9051_NR]; }; -extern struct vfc_dev **vfc_dev_lst; - void captstat_reset(struct vfc_dev *); void memptr_reset(struct vfc_dev *); @@ -145,8 +143,6 @@ int vfc_i2c_sendbuf(struct vfc_dev *, unsigned char, char *, int) ; int vfc_i2c_recvbuf(struct vfc_dev *, unsigned char, char *, int) ; int vfc_i2c_reset_bus(struct vfc_dev *); int vfc_init_i2c_bus(struct vfc_dev *); -void vfc_lock_device(struct vfc_dev *); -void vfc_unlock_device(struct vfc_dev *); #define VFC_CONTROL_DIAGMODE 0x10000000 #define VFC_CONTROL_MEMPTR 0x20000000 diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c index 1f6cb8ae278..25181bb7d62 100644 --- a/drivers/sbus/char/vfc_dev.c +++ b/drivers/sbus/char/vfc_dev.c @@ -45,7 +45,7 @@ #include <asm/vfc_ioctls.h> static const struct file_operations vfc_fops; -struct vfc_dev **vfc_dev_lst; +static struct vfc_dev **vfc_dev_lst; static char vfcstr[]="vfc"; static unsigned char saa9051_init_array[VFC_SAA9051_NR] = { 0x00, 0x64, 0x72, 0x52, @@ -54,18 +54,18 @@ static unsigned char saa9051_init_array[VFC_SAA9051_NR] = { 0x3e }; -void vfc_lock_device(struct vfc_dev *dev) +static void vfc_lock_device(struct vfc_dev *dev) { mutex_lock(&dev->device_lock_mtx); } -void vfc_unlock_device(struct vfc_dev *dev) +static void vfc_unlock_device(struct vfc_dev *dev) { mutex_unlock(&dev->device_lock_mtx); } -void vfc_captstat_reset(struct vfc_dev *dev) +static void vfc_captstat_reset(struct vfc_dev *dev) { dev->control_reg |= VFC_CONTROL_CAPTRESET; sbus_writel(dev->control_reg, &dev->regs->control); @@ -75,7 +75,7 @@ void vfc_captstat_reset(struct vfc_dev *dev) sbus_writel(dev->control_reg, &dev->regs->control); } -void vfc_memptr_reset(struct vfc_dev *dev) +static void vfc_memptr_reset(struct vfc_dev *dev) { dev->control_reg |= VFC_CONTROL_MEMPTR; sbus_writel(dev->control_reg, &dev->regs->control); @@ -85,7 +85,7 @@ void vfc_memptr_reset(struct vfc_dev *dev) sbus_writel(dev->control_reg, &dev->regs->control); } -int vfc_csr_init(struct vfc_dev *dev) +static int vfc_csr_init(struct vfc_dev *dev) { dev->control_reg = 0x80000000; sbus_writel(dev->control_reg, &dev->regs->control); @@ -107,7 +107,7 @@ int vfc_csr_init(struct vfc_dev *dev) return 0; } -int vfc_saa9051_init(struct vfc_dev *dev) +static int vfc_saa9051_init(struct vfc_dev *dev) { int i; @@ -119,7 +119,7 @@ int vfc_saa9051_init(struct vfc_dev *dev) return 0; } -int init_vfc_hw(struct vfc_dev *dev) +static int init_vfc_hw(struct vfc_dev *dev) { vfc_lock_device(dev); vfc_csr_init(dev); @@ -132,7 +132,7 @@ int init_vfc_hw(struct vfc_dev *dev) return 0; } -int init_vfc_devstruct(struct vfc_dev *dev, int instance) +static int init_vfc_devstruct(struct vfc_dev *dev, int instance) { dev->instance=instance; mutex_init(&dev->device_lock_mtx); @@ -141,7 +141,8 @@ int init_vfc_devstruct(struct vfc_dev *dev, int instance) return 0; } -int init_vfc_device(struct sbus_dev *sdev,struct vfc_dev *dev, int instance) +static int init_vfc_device(struct sbus_dev *sdev,struct vfc_dev *dev, + int instance) { if(dev == NULL) { printk(KERN_ERR "VFC: Bogus pointer passed\n"); @@ -168,7 +169,7 @@ int init_vfc_device(struct sbus_dev *sdev,struct vfc_dev *dev, int instance) } -struct vfc_dev *vfc_get_dev_ptr(int instance) +static struct vfc_dev *vfc_get_dev_ptr(int instance) { return vfc_dev_lst[instance]; } @@ -292,7 +293,7 @@ static int vfc_debug(struct vfc_dev *dev, int cmd, void __user *argp) return 0; } -int vfc_capture_start(struct vfc_dev *dev) +static int vfc_capture_start(struct vfc_dev *dev) { vfc_captstat_reset(dev); dev->control_reg = sbus_readl(&dev->regs->control); @@ -314,7 +315,7 @@ int vfc_capture_start(struct vfc_dev *dev) return 0; } -int vfc_capture_poll(struct vfc_dev *dev) +static int vfc_capture_poll(struct vfc_dev *dev) { int timeout = 1000; @@ -390,8 +391,8 @@ static int vfc_set_control_ioctl(struct inode *inode, struct file *file, } -int vfc_port_change_ioctl(struct inode *inode, struct file *file, - struct vfc_dev *dev, unsigned long arg) +static int vfc_port_change_ioctl(struct inode *inode, struct file *file, + struct vfc_dev *dev, unsigned long arg) { int ret = 0; int cmd; @@ -460,8 +461,8 @@ int vfc_port_change_ioctl(struct inode *inode, struct file *file, return ret; } -int vfc_set_video_ioctl(struct inode *inode, struct file *file, - struct vfc_dev *dev, unsigned long arg) +static int vfc_set_video_ioctl(struct inode *inode, struct file *file, + struct vfc_dev *dev, unsigned long arg) { int ret = 0; int cmd; @@ -511,8 +512,8 @@ int vfc_set_video_ioctl(struct inode *inode, struct file *file, return ret; } -int vfc_get_video_ioctl(struct inode *inode, struct file *file, - struct vfc_dev *dev, unsigned long arg) +static int vfc_get_video_ioctl(struct inode *inode, struct file *file, + struct vfc_dev *dev, unsigned long arg) { int ret = 0; unsigned int status = NO_LOCK; diff --git a/drivers/sbus/char/vfc_i2c.c b/drivers/sbus/char/vfc_i2c.c index 9efed771f6c..32b986e0ed7 100644 --- a/drivers/sbus/char/vfc_i2c.c +++ b/drivers/sbus/char/vfc_i2c.c @@ -114,7 +114,7 @@ int vfc_i2c_reset_bus(struct vfc_dev *dev) return 0; } -int vfc_i2c_wait_for_bus(struct vfc_dev *dev) +static int vfc_i2c_wait_for_bus(struct vfc_dev *dev) { int timeout = 1000; @@ -126,7 +126,7 @@ int vfc_i2c_wait_for_bus(struct vfc_dev *dev) return 0; } -int vfc_i2c_wait_for_pin(struct vfc_dev *dev, int ack) +static int vfc_i2c_wait_for_pin(struct vfc_dev *dev, int ack) { int timeout = 1000; int s1; @@ -144,7 +144,8 @@ int vfc_i2c_wait_for_pin(struct vfc_dev *dev, int ack) } #define SHIFT(a) ((a) << 24) -int vfc_i2c_xmit_addr(struct vfc_dev *dev, unsigned char addr, char mode) +static int vfc_i2c_xmit_addr(struct vfc_dev *dev, unsigned char addr, + char mode) { int ret, raddr; #if 1 @@ -195,7 +196,7 @@ int vfc_i2c_xmit_addr(struct vfc_dev *dev, unsigned char addr, char mode) return 0; } -int vfc_i2c_xmit_byte(struct vfc_dev *dev,unsigned char *byte) +static int vfc_i2c_xmit_byte(struct vfc_dev *dev,unsigned char *byte) { int ret; u32 val = SHIFT((unsigned int)*byte); @@ -218,7 +219,8 @@ int vfc_i2c_xmit_byte(struct vfc_dev *dev,unsigned char *byte) return ret; } -int vfc_i2c_recv_byte(struct vfc_dev *dev, unsigned char *byte, int last) +static int vfc_i2c_recv_byte(struct vfc_dev *dev, unsigned char *byte, + int last) { int ret; diff --git a/drivers/sbus/dvma.c b/drivers/sbus/dvma.c index 57e1526746a..ab0d2de3324 100644 --- a/drivers/sbus/dvma.c +++ b/drivers/sbus/dvma.c @@ -16,7 +16,7 @@ struct sbus_dma *dma_chain; -void __init init_one_dvma(struct sbus_dma *dma, int num_dma) +static void __init init_one_dvma(struct sbus_dma *dma, int num_dma) { printk("dma%d: ", num_dma); |