aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/bt8xx
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2007-04-27 11:31:01 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 14:43:20 -0400
commit3bfb7398e2554fb54acb2900b81de144eb41c3ac (patch)
treea9323711eb48ccfde844ad509a462c1f06549125 /drivers/media/video/bt8xx
parent206ebaf32795cf1582b1e2ff2ec6a560c9e986b8 (diff)
V4L/DVB (5278): Bt8xx/: possible cleanups
This patch contains the following possible cleanups: - remove the following unused global functions: - bttv-if.c: bttv_get_cardinfo() - bttv-if.c: bttv_get_id() - bttv-if.c: bttv_get_gpio_queue() - bttv-if.c: bttv_i2c_call() - remove the following unused EXPORT_SYMBOL's: - bttv-gpio.c: bttv_sub_bus_type - bttv-gpio.c: bttv_gpio_inout - bttv-gpio.c: bttv_gpio_read - bttv-gpio.c: bttv_gpio_write - bttv-gpio.c: bttv_gpio_bits Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/bt8xx')
-rw-r--r--drivers/media/video/bt8xx/bttv-gpio.c5
-rw-r--r--drivers/media/video/bt8xx/bttv-if.c48
-rw-r--r--drivers/media/video/bt8xx/bttv.h23
3 files changed, 0 insertions, 76 deletions
diff --git a/drivers/media/video/bt8xx/bttv-gpio.c b/drivers/media/video/bt8xx/bttv-gpio.c
index ba081f6f8c82..84154c26f9c5 100644
--- a/drivers/media/video/bt8xx/bttv-gpio.c
+++ b/drivers/media/video/bt8xx/bttv-gpio.c
@@ -71,7 +71,6 @@ struct bus_type bttv_sub_bus_type = {
71 .probe = bttv_sub_probe, 71 .probe = bttv_sub_probe,
72 .remove = bttv_sub_remove, 72 .remove = bttv_sub_remove,
73}; 73};
74EXPORT_SYMBOL(bttv_sub_bus_type);
75 74
76static void release_sub_device(struct device *dev) 75static void release_sub_device(struct device *dev)
77{ 76{
@@ -152,7 +151,6 @@ void bttv_gpio_inout(struct bttv_core *core, u32 mask, u32 outbits)
152 btwrite(data,BT848_GPIO_OUT_EN); 151 btwrite(data,BT848_GPIO_OUT_EN);
153 spin_unlock_irqrestore(&btv->gpio_lock,flags); 152 spin_unlock_irqrestore(&btv->gpio_lock,flags);
154} 153}
155EXPORT_SYMBOL(bttv_gpio_inout);
156 154
157u32 bttv_gpio_read(struct bttv_core *core) 155u32 bttv_gpio_read(struct bttv_core *core)
158{ 156{
@@ -162,7 +160,6 @@ u32 bttv_gpio_read(struct bttv_core *core)
162 value = btread(BT848_GPIO_DATA); 160 value = btread(BT848_GPIO_DATA);
163 return value; 161 return value;
164} 162}
165EXPORT_SYMBOL(bttv_gpio_read);
166 163
167void bttv_gpio_write(struct bttv_core *core, u32 value) 164void bttv_gpio_write(struct bttv_core *core, u32 value)
168{ 165{
@@ -170,7 +167,6 @@ void bttv_gpio_write(struct bttv_core *core, u32 value)
170 167
171 btwrite(value,BT848_GPIO_DATA); 168 btwrite(value,BT848_GPIO_DATA);
172} 169}
173EXPORT_SYMBOL(bttv_gpio_write);
174 170
175void bttv_gpio_bits(struct bttv_core *core, u32 mask, u32 bits) 171void bttv_gpio_bits(struct bttv_core *core, u32 mask, u32 bits)
176{ 172{
@@ -185,7 +181,6 @@ void bttv_gpio_bits(struct bttv_core *core, u32 mask, u32 bits)
185 btwrite(data,BT848_GPIO_DATA); 181 btwrite(data,BT848_GPIO_DATA);
186 spin_unlock_irqrestore(&btv->gpio_lock,flags); 182 spin_unlock_irqrestore(&btv->gpio_lock,flags);
187} 183}
188EXPORT_SYMBOL(bttv_gpio_bits);
189 184
190/* 185/*
191 * Local variables: 186 * Local variables:
diff --git a/drivers/media/video/bt8xx/bttv-if.c b/drivers/media/video/bt8xx/bttv-if.c
index 19b564ab0e92..ecf07988cd33 100644
--- a/drivers/media/video/bt8xx/bttv-if.c
+++ b/drivers/media/video/bt8xx/bttv-if.c
@@ -33,32 +33,16 @@
33 33
34#include "bttvp.h" 34#include "bttvp.h"
35 35
36EXPORT_SYMBOL(bttv_get_cardinfo);
37EXPORT_SYMBOL(bttv_get_pcidev); 36EXPORT_SYMBOL(bttv_get_pcidev);
38EXPORT_SYMBOL(bttv_get_id);
39EXPORT_SYMBOL(bttv_gpio_enable); 37EXPORT_SYMBOL(bttv_gpio_enable);
40EXPORT_SYMBOL(bttv_read_gpio); 38EXPORT_SYMBOL(bttv_read_gpio);
41EXPORT_SYMBOL(bttv_write_gpio); 39EXPORT_SYMBOL(bttv_write_gpio);
42EXPORT_SYMBOL(bttv_get_gpio_queue);
43EXPORT_SYMBOL(bttv_i2c_call);
44 40
45/* ----------------------------------------------------------------------- */ 41/* ----------------------------------------------------------------------- */
46/* Exported functions - for other modules which want to access the */ 42/* Exported functions - for other modules which want to access the */
47/* gpio ports (IR for example) */ 43/* gpio ports (IR for example) */
48/* see bttv.h for comments */ 44/* see bttv.h for comments */
49 45
50int bttv_get_cardinfo(unsigned int card, int *type, unsigned *cardid)
51{
52 printk("The bttv_* interface is obsolete and will go away,\n"
53 "please use the new, sysfs based interface instead.\n");
54 if (card >= bttv_num) {
55 return -1;
56 }
57 *type = bttvs[card].c.type;
58 *cardid = bttvs[card].cardid;
59 return 0;
60}
61
62struct pci_dev* bttv_get_pcidev(unsigned int card) 46struct pci_dev* bttv_get_pcidev(unsigned int card)
63{ 47{
64 if (card >= bttv_num) 48 if (card >= bttv_num)
@@ -66,16 +50,6 @@ struct pci_dev* bttv_get_pcidev(unsigned int card)
66 return bttvs[card].c.pci; 50 return bttvs[card].c.pci;
67} 51}
68 52
69int bttv_get_id(unsigned int card)
70{
71 printk("The bttv_* interface is obsolete and will go away,\n"
72 "please use the new, sysfs based interface instead.\n");
73 if (card >= bttv_num) {
74 return -1;
75 }
76 return bttvs[card].c.type;
77}
78
79 53
80int bttv_gpio_enable(unsigned int card, unsigned long mask, unsigned long data) 54int bttv_gpio_enable(unsigned int card, unsigned long mask, unsigned long data)
81{ 55{
@@ -130,28 +104,6 @@ int bttv_write_gpio(unsigned int card, unsigned long mask, unsigned long data)
130 return 0; 104 return 0;
131} 105}
132 106
133wait_queue_head_t* bttv_get_gpio_queue(unsigned int card)
134{
135 struct bttv *btv;
136
137 if (card >= bttv_num) {
138 return NULL;
139 }
140
141 btv = &bttvs[card];
142 if (bttvs[card].shutdown) {
143 return NULL;
144 }
145 return &btv->gpioq;
146}
147
148void bttv_i2c_call(unsigned int card, unsigned int cmd, void *arg)
149{
150 if (card >= bttv_num)
151 return;
152 bttv_call_i2c_clients(&bttvs[card], cmd, arg);
153}
154
155/* 107/*
156 * Local variables: 108 * Local variables:
157 * c-basic-offset: 8 109 * c-basic-offset: 8
diff --git a/drivers/media/video/bt8xx/bttv.h b/drivers/media/video/bt8xx/bttv.h
index 5491acbdaf63..78f0eb039183 100644
--- a/drivers/media/video/bt8xx/bttv.h
+++ b/drivers/media/video/bt8xx/bttv.h
@@ -260,17 +260,8 @@ extern int bttv_handle_chipset(struct bttv *btv);
260/* this obsolete -- please use the sysfs-based 260/* this obsolete -- please use the sysfs-based
261 interface below for new code */ 261 interface below for new code */
262 262
263/* returns card type + card ID (for bt878-based ones)
264 for possible values see lines below beginning with #define BTTV_BOARD_UNKNOWN
265 returns negative value if error occurred
266*/
267extern int bttv_get_cardinfo(unsigned int card, int *type,
268 unsigned int *cardid);
269extern struct pci_dev* bttv_get_pcidev(unsigned int card); 263extern struct pci_dev* bttv_get_pcidev(unsigned int card);
270 264
271/* obsolete, use bttv_get_cardinfo instead */
272extern int bttv_get_id(unsigned int card);
273
274/* sets GPOE register (BT848_GPIO_OUT_EN) to new value: 265/* sets GPOE register (BT848_GPIO_OUT_EN) to new value:
275 data | (current_GPOE_value & ~mask) 266 data | (current_GPOE_value & ~mask)
276 returns negative value if error occurred 267 returns negative value if error occurred
@@ -290,20 +281,6 @@ extern int bttv_read_gpio(unsigned int card, unsigned long *data);
290extern int bttv_write_gpio(unsigned int card, 281extern int bttv_write_gpio(unsigned int card,
291 unsigned long mask, unsigned long data); 282 unsigned long mask, unsigned long data);
292 283
293/* returns pointer to task queue which can be used as parameter to
294 interruptible_sleep_on
295 in interrupt handler if BT848_INT_GPINT bit is set - this queue is activated
296 (wake_up_interruptible) and following call to the function bttv_read_gpio
297 should return new value of GPDATA,
298 returns NULL value if error occurred or queue is not available
299 WARNING: because there is no buffer for GPIO data, one MUST
300 process data ASAP
301*/
302extern wait_queue_head_t* bttv_get_gpio_queue(unsigned int card);
303
304/* call i2c clients
305*/
306extern void bttv_i2c_call(unsigned int card, unsigned int cmd, void *arg);
307 284
308 285
309 286