diff options
author | Adrian Bunk <bunk@stusta.de> | 2007-04-27 11:31:01 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-04-27 14:43:20 -0400 |
commit | 3bfb7398e2554fb54acb2900b81de144eb41c3ac (patch) | |
tree | a9323711eb48ccfde844ad509a462c1f06549125 /drivers/media | |
parent | 206ebaf32795cf1582b1e2ff2ec6a560c9e986b8 (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')
-rw-r--r-- | drivers/media/video/bt8xx/bttv-gpio.c | 5 | ||||
-rw-r--r-- | drivers/media/video/bt8xx/bttv-if.c | 48 | ||||
-rw-r--r-- | drivers/media/video/bt8xx/bttv.h | 23 |
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 | }; |
74 | EXPORT_SYMBOL(bttv_sub_bus_type); | ||
75 | 74 | ||
76 | static void release_sub_device(struct device *dev) | 75 | static 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 | } |
155 | EXPORT_SYMBOL(bttv_gpio_inout); | ||
156 | 154 | ||
157 | u32 bttv_gpio_read(struct bttv_core *core) | 155 | u32 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 | } |
165 | EXPORT_SYMBOL(bttv_gpio_read); | ||
166 | 163 | ||
167 | void bttv_gpio_write(struct bttv_core *core, u32 value) | 164 | void 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 | } |
173 | EXPORT_SYMBOL(bttv_gpio_write); | ||
174 | 170 | ||
175 | void bttv_gpio_bits(struct bttv_core *core, u32 mask, u32 bits) | 171 | void 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 | } |
188 | EXPORT_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 | ||
36 | EXPORT_SYMBOL(bttv_get_cardinfo); | ||
37 | EXPORT_SYMBOL(bttv_get_pcidev); | 36 | EXPORT_SYMBOL(bttv_get_pcidev); |
38 | EXPORT_SYMBOL(bttv_get_id); | ||
39 | EXPORT_SYMBOL(bttv_gpio_enable); | 37 | EXPORT_SYMBOL(bttv_gpio_enable); |
40 | EXPORT_SYMBOL(bttv_read_gpio); | 38 | EXPORT_SYMBOL(bttv_read_gpio); |
41 | EXPORT_SYMBOL(bttv_write_gpio); | 39 | EXPORT_SYMBOL(bttv_write_gpio); |
42 | EXPORT_SYMBOL(bttv_get_gpio_queue); | ||
43 | EXPORT_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 | ||
50 | int 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 | |||
62 | struct pci_dev* bttv_get_pcidev(unsigned int card) | 46 | struct 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 | ||
69 | int 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 | ||
80 | int bttv_gpio_enable(unsigned int card, unsigned long mask, unsigned long data) | 54 | int 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 | ||
133 | wait_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 | |||
148 | void 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 | */ | ||
267 | extern int bttv_get_cardinfo(unsigned int card, int *type, | ||
268 | unsigned int *cardid); | ||
269 | extern struct pci_dev* bttv_get_pcidev(unsigned int card); | 263 | extern struct pci_dev* bttv_get_pcidev(unsigned int card); |
270 | 264 | ||
271 | /* obsolete, use bttv_get_cardinfo instead */ | ||
272 | extern 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); | |||
290 | extern int bttv_write_gpio(unsigned int card, | 281 | extern 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 | */ | ||
302 | extern wait_queue_head_t* bttv_get_gpio_queue(unsigned int card); | ||
303 | |||
304 | /* call i2c clients | ||
305 | */ | ||
306 | extern void bttv_i2c_call(unsigned int card, unsigned int cmd, void *arg); | ||
307 | 284 | ||
308 | 285 | ||
309 | 286 | ||