diff options
author | Adrian Bunk <bunk@kernel.org> | 2008-06-05 14:44:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-18 00:38:17 -0400 |
commit | 960681450f8b572f230a8c3661dcc34f39fcc38e (patch) | |
tree | ba38375e57ecdfe2d97bd51b275f2fadaba51a40 /drivers/sbus/char/vfc_dev.c | |
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/sbus/char/vfc_dev.c')
-rw-r--r-- | drivers/sbus/char/vfc_dev.c | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c index 1f6cb8ae2784..25181bb7d627 100644 --- a/drivers/sbus/char/vfc_dev.c +++ b/drivers/sbus/char/vfc_dev.c | |||
@@ -45,7 +45,7 @@ | |||
45 | #include <asm/vfc_ioctls.h> | 45 | #include <asm/vfc_ioctls.h> |
46 | 46 | ||
47 | static const struct file_operations vfc_fops; | 47 | static const struct file_operations vfc_fops; |
48 | struct vfc_dev **vfc_dev_lst; | 48 | static struct vfc_dev **vfc_dev_lst; |
49 | static char vfcstr[]="vfc"; | 49 | static char vfcstr[]="vfc"; |
50 | static unsigned char saa9051_init_array[VFC_SAA9051_NR] = { | 50 | static unsigned char saa9051_init_array[VFC_SAA9051_NR] = { |
51 | 0x00, 0x64, 0x72, 0x52, | 51 | 0x00, 0x64, 0x72, 0x52, |
@@ -54,18 +54,18 @@ static unsigned char saa9051_init_array[VFC_SAA9051_NR] = { | |||
54 | 0x3e | 54 | 0x3e |
55 | }; | 55 | }; |
56 | 56 | ||
57 | void vfc_lock_device(struct vfc_dev *dev) | 57 | static void vfc_lock_device(struct vfc_dev *dev) |
58 | { | 58 | { |
59 | mutex_lock(&dev->device_lock_mtx); | 59 | mutex_lock(&dev->device_lock_mtx); |
60 | } | 60 | } |
61 | 61 | ||
62 | void vfc_unlock_device(struct vfc_dev *dev) | 62 | static void vfc_unlock_device(struct vfc_dev *dev) |
63 | { | 63 | { |
64 | mutex_unlock(&dev->device_lock_mtx); | 64 | mutex_unlock(&dev->device_lock_mtx); |
65 | } | 65 | } |
66 | 66 | ||
67 | 67 | ||
68 | void vfc_captstat_reset(struct vfc_dev *dev) | 68 | static void vfc_captstat_reset(struct vfc_dev *dev) |
69 | { | 69 | { |
70 | dev->control_reg |= VFC_CONTROL_CAPTRESET; | 70 | dev->control_reg |= VFC_CONTROL_CAPTRESET; |
71 | sbus_writel(dev->control_reg, &dev->regs->control); | 71 | sbus_writel(dev->control_reg, &dev->regs->control); |
@@ -75,7 +75,7 @@ void vfc_captstat_reset(struct vfc_dev *dev) | |||
75 | sbus_writel(dev->control_reg, &dev->regs->control); | 75 | sbus_writel(dev->control_reg, &dev->regs->control); |
76 | } | 76 | } |
77 | 77 | ||
78 | void vfc_memptr_reset(struct vfc_dev *dev) | 78 | static void vfc_memptr_reset(struct vfc_dev *dev) |
79 | { | 79 | { |
80 | dev->control_reg |= VFC_CONTROL_MEMPTR; | 80 | dev->control_reg |= VFC_CONTROL_MEMPTR; |
81 | sbus_writel(dev->control_reg, &dev->regs->control); | 81 | sbus_writel(dev->control_reg, &dev->regs->control); |
@@ -85,7 +85,7 @@ void vfc_memptr_reset(struct vfc_dev *dev) | |||
85 | sbus_writel(dev->control_reg, &dev->regs->control); | 85 | sbus_writel(dev->control_reg, &dev->regs->control); |
86 | } | 86 | } |
87 | 87 | ||
88 | int vfc_csr_init(struct vfc_dev *dev) | 88 | static int vfc_csr_init(struct vfc_dev *dev) |
89 | { | 89 | { |
90 | dev->control_reg = 0x80000000; | 90 | dev->control_reg = 0x80000000; |
91 | sbus_writel(dev->control_reg, &dev->regs->control); | 91 | sbus_writel(dev->control_reg, &dev->regs->control); |
@@ -107,7 +107,7 @@ int vfc_csr_init(struct vfc_dev *dev) | |||
107 | return 0; | 107 | return 0; |
108 | } | 108 | } |
109 | 109 | ||
110 | int vfc_saa9051_init(struct vfc_dev *dev) | 110 | static int vfc_saa9051_init(struct vfc_dev *dev) |
111 | { | 111 | { |
112 | int i; | 112 | int i; |
113 | 113 | ||
@@ -119,7 +119,7 @@ int vfc_saa9051_init(struct vfc_dev *dev) | |||
119 | return 0; | 119 | return 0; |
120 | } | 120 | } |
121 | 121 | ||
122 | int init_vfc_hw(struct vfc_dev *dev) | 122 | static int init_vfc_hw(struct vfc_dev *dev) |
123 | { | 123 | { |
124 | vfc_lock_device(dev); | 124 | vfc_lock_device(dev); |
125 | vfc_csr_init(dev); | 125 | vfc_csr_init(dev); |
@@ -132,7 +132,7 @@ int init_vfc_hw(struct vfc_dev *dev) | |||
132 | return 0; | 132 | return 0; |
133 | } | 133 | } |
134 | 134 | ||
135 | int init_vfc_devstruct(struct vfc_dev *dev, int instance) | 135 | static int init_vfc_devstruct(struct vfc_dev *dev, int instance) |
136 | { | 136 | { |
137 | dev->instance=instance; | 137 | dev->instance=instance; |
138 | mutex_init(&dev->device_lock_mtx); | 138 | mutex_init(&dev->device_lock_mtx); |
@@ -141,7 +141,8 @@ int init_vfc_devstruct(struct vfc_dev *dev, int instance) | |||
141 | return 0; | 141 | return 0; |
142 | } | 142 | } |
143 | 143 | ||
144 | int init_vfc_device(struct sbus_dev *sdev,struct vfc_dev *dev, int instance) | 144 | static int init_vfc_device(struct sbus_dev *sdev,struct vfc_dev *dev, |
145 | int instance) | ||
145 | { | 146 | { |
146 | if(dev == NULL) { | 147 | if(dev == NULL) { |
147 | printk(KERN_ERR "VFC: Bogus pointer passed\n"); | 148 | 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) | |||
168 | } | 169 | } |
169 | 170 | ||
170 | 171 | ||
171 | struct vfc_dev *vfc_get_dev_ptr(int instance) | 172 | static struct vfc_dev *vfc_get_dev_ptr(int instance) |
172 | { | 173 | { |
173 | return vfc_dev_lst[instance]; | 174 | return vfc_dev_lst[instance]; |
174 | } | 175 | } |
@@ -292,7 +293,7 @@ static int vfc_debug(struct vfc_dev *dev, int cmd, void __user *argp) | |||
292 | return 0; | 293 | return 0; |
293 | } | 294 | } |
294 | 295 | ||
295 | int vfc_capture_start(struct vfc_dev *dev) | 296 | static int vfc_capture_start(struct vfc_dev *dev) |
296 | { | 297 | { |
297 | vfc_captstat_reset(dev); | 298 | vfc_captstat_reset(dev); |
298 | dev->control_reg = sbus_readl(&dev->regs->control); | 299 | dev->control_reg = sbus_readl(&dev->regs->control); |
@@ -314,7 +315,7 @@ int vfc_capture_start(struct vfc_dev *dev) | |||
314 | return 0; | 315 | return 0; |
315 | } | 316 | } |
316 | 317 | ||
317 | int vfc_capture_poll(struct vfc_dev *dev) | 318 | static int vfc_capture_poll(struct vfc_dev *dev) |
318 | { | 319 | { |
319 | int timeout = 1000; | 320 | int timeout = 1000; |
320 | 321 | ||
@@ -390,8 +391,8 @@ static int vfc_set_control_ioctl(struct inode *inode, struct file *file, | |||
390 | } | 391 | } |
391 | 392 | ||
392 | 393 | ||
393 | int vfc_port_change_ioctl(struct inode *inode, struct file *file, | 394 | static int vfc_port_change_ioctl(struct inode *inode, struct file *file, |
394 | struct vfc_dev *dev, unsigned long arg) | 395 | struct vfc_dev *dev, unsigned long arg) |
395 | { | 396 | { |
396 | int ret = 0; | 397 | int ret = 0; |
397 | int cmd; | 398 | int cmd; |
@@ -460,8 +461,8 @@ int vfc_port_change_ioctl(struct inode *inode, struct file *file, | |||
460 | return ret; | 461 | return ret; |
461 | } | 462 | } |
462 | 463 | ||
463 | int vfc_set_video_ioctl(struct inode *inode, struct file *file, | 464 | static int vfc_set_video_ioctl(struct inode *inode, struct file *file, |
464 | struct vfc_dev *dev, unsigned long arg) | 465 | struct vfc_dev *dev, unsigned long arg) |
465 | { | 466 | { |
466 | int ret = 0; | 467 | int ret = 0; |
467 | int cmd; | 468 | int cmd; |
@@ -511,8 +512,8 @@ int vfc_set_video_ioctl(struct inode *inode, struct file *file, | |||
511 | return ret; | 512 | return ret; |
512 | } | 513 | } |
513 | 514 | ||
514 | int vfc_get_video_ioctl(struct inode *inode, struct file *file, | 515 | static int vfc_get_video_ioctl(struct inode *inode, struct file *file, |
515 | struct vfc_dev *dev, unsigned long arg) | 516 | struct vfc_dev *dev, unsigned long arg) |
516 | { | 517 | { |
517 | int ret = 0; | 518 | int ret = 0; |
518 | unsigned int status = NO_LOCK; | 519 | unsigned int status = NO_LOCK; |