diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-12-11 13:51:36 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-12-27 07:23:25 -0500 |
commit | 0a0ceadebd4551c26110f5daf0b38d9054674c9e (patch) | |
tree | 243f2873dc75e769cddf56d56f4a6721729c16c7 /drivers/media | |
parent | bee8a44ecb37c1d80afd2af932f60e786f0eabc2 (diff) |
V4L/DVB (4959): Usbvision: possible cleanups
This patch contains the following possible cleanups:
- make needlessly global functions static
- remove the unused EXPORT_SYMBOL's
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/usbvision/usbvision-core.c | 33 | ||||
-rw-r--r-- | drivers/media/video/usbvision/usbvision-i2c.c | 5 | ||||
-rw-r--r-- | drivers/media/video/usbvision/usbvision-video.c | 2 | ||||
-rw-r--r-- | drivers/media/video/usbvision/usbvision.h | 2 |
4 files changed, 21 insertions, 21 deletions
diff --git a/drivers/media/video/usbvision/usbvision-core.c b/drivers/media/video/usbvision/usbvision-core.c index 797b97baf9ed..612687305003 100644 --- a/drivers/media/video/usbvision/usbvision-core.c +++ b/drivers/media/video/usbvision/usbvision-core.c | |||
@@ -118,7 +118,7 @@ static int usbvision_measure_bandwidth (struct usb_usbvision *usbvision); | |||
118 | * This is used when initializing the contents of the area. | 118 | * This is used when initializing the contents of the area. |
119 | */ | 119 | */ |
120 | 120 | ||
121 | void *usbvision_rvmalloc(unsigned long size) | 121 | static void *usbvision_rvmalloc(unsigned long size) |
122 | { | 122 | { |
123 | void *mem; | 123 | void *mem; |
124 | unsigned long adr; | 124 | unsigned long adr; |
@@ -181,7 +181,7 @@ static void usbvision_hexdump(const unsigned char *data, int len) | |||
181 | /******************************** | 181 | /******************************** |
182 | * scratch ring buffer handling | 182 | * scratch ring buffer handling |
183 | ********************************/ | 183 | ********************************/ |
184 | int scratch_len(struct usb_usbvision *usbvision) /*This returns the amount of data actually in the buffer */ | 184 | static int scratch_len(struct usb_usbvision *usbvision) /*This returns the amount of data actually in the buffer */ |
185 | { | 185 | { |
186 | int len = usbvision->scratch_write_ptr - usbvision->scratch_read_ptr; | 186 | int len = usbvision->scratch_write_ptr - usbvision->scratch_read_ptr; |
187 | if (len < 0) { | 187 | if (len < 0) { |
@@ -194,7 +194,7 @@ int scratch_len(struct usb_usbvision *usbvision) /*This returns the amount of | |||
194 | 194 | ||
195 | 195 | ||
196 | /* This returns the free space left in the buffer */ | 196 | /* This returns the free space left in the buffer */ |
197 | int scratch_free(struct usb_usbvision *usbvision) | 197 | static int scratch_free(struct usb_usbvision *usbvision) |
198 | { | 198 | { |
199 | int free = usbvision->scratch_read_ptr - usbvision->scratch_write_ptr; | 199 | int free = usbvision->scratch_read_ptr - usbvision->scratch_write_ptr; |
200 | if (free <= 0) { | 200 | if (free <= 0) { |
@@ -211,7 +211,8 @@ int scratch_free(struct usb_usbvision *usbvision) | |||
211 | 211 | ||
212 | 212 | ||
213 | /* This puts data into the buffer */ | 213 | /* This puts data into the buffer */ |
214 | int scratch_put(struct usb_usbvision *usbvision, unsigned char *data, int len) | 214 | static int scratch_put(struct usb_usbvision *usbvision, unsigned char *data, |
215 | int len) | ||
215 | { | 216 | { |
216 | int len_part; | 217 | int len_part; |
217 | 218 | ||
@@ -237,7 +238,7 @@ int scratch_put(struct usb_usbvision *usbvision, unsigned char *data, int len) | |||
237 | } | 238 | } |
238 | 239 | ||
239 | /* This marks the write_ptr as position of new frame header */ | 240 | /* This marks the write_ptr as position of new frame header */ |
240 | void scratch_mark_header(struct usb_usbvision *usbvision) | 241 | static void scratch_mark_header(struct usb_usbvision *usbvision) |
241 | { | 242 | { |
242 | PDEBUG(DBG_SCRATCH, "header at write_ptr=%d\n", usbvision->scratch_headermarker_write_ptr); | 243 | PDEBUG(DBG_SCRATCH, "header at write_ptr=%d\n", usbvision->scratch_headermarker_write_ptr); |
243 | 244 | ||
@@ -248,7 +249,8 @@ void scratch_mark_header(struct usb_usbvision *usbvision) | |||
248 | } | 249 | } |
249 | 250 | ||
250 | /* This gets data from the buffer at the given "ptr" position */ | 251 | /* This gets data from the buffer at the given "ptr" position */ |
251 | int scratch_get_extra(struct usb_usbvision *usbvision, unsigned char *data, int *ptr, int len) | 252 | static int scratch_get_extra(struct usb_usbvision *usbvision, |
253 | unsigned char *data, int *ptr, int len) | ||
252 | { | 254 | { |
253 | int len_part; | 255 | int len_part; |
254 | if (*ptr + len < scratch_buf_size) { | 256 | if (*ptr + len < scratch_buf_size) { |
@@ -274,7 +276,8 @@ int scratch_get_extra(struct usb_usbvision *usbvision, unsigned char *data, int | |||
274 | 276 | ||
275 | 277 | ||
276 | /* This sets the scratch extra read pointer */ | 278 | /* This sets the scratch extra read pointer */ |
277 | void scratch_set_extra_ptr(struct usb_usbvision *usbvision, int *ptr, int len) | 279 | static void scratch_set_extra_ptr(struct usb_usbvision *usbvision, int *ptr, |
280 | int len) | ||
278 | { | 281 | { |
279 | *ptr = (usbvision->scratch_read_ptr + len)%scratch_buf_size; | 282 | *ptr = (usbvision->scratch_read_ptr + len)%scratch_buf_size; |
280 | 283 | ||
@@ -283,7 +286,7 @@ void scratch_set_extra_ptr(struct usb_usbvision *usbvision, int *ptr, int len) | |||
283 | 286 | ||
284 | 287 | ||
285 | /*This increments the scratch extra read pointer */ | 288 | /*This increments the scratch extra read pointer */ |
286 | void scratch_inc_extra_ptr(int *ptr, int len) | 289 | static void scratch_inc_extra_ptr(int *ptr, int len) |
287 | { | 290 | { |
288 | *ptr = (*ptr + len) % scratch_buf_size; | 291 | *ptr = (*ptr + len) % scratch_buf_size; |
289 | 292 | ||
@@ -292,7 +295,8 @@ void scratch_inc_extra_ptr(int *ptr, int len) | |||
292 | 295 | ||
293 | 296 | ||
294 | /* This gets data from the buffer */ | 297 | /* This gets data from the buffer */ |
295 | int scratch_get(struct usb_usbvision *usbvision, unsigned char *data, int len) | 298 | static int scratch_get(struct usb_usbvision *usbvision, unsigned char *data, |
299 | int len) | ||
296 | { | 300 | { |
297 | int len_part; | 301 | int len_part; |
298 | if (usbvision->scratch_read_ptr + len < scratch_buf_size) { | 302 | if (usbvision->scratch_read_ptr + len < scratch_buf_size) { |
@@ -318,7 +322,8 @@ int scratch_get(struct usb_usbvision *usbvision, unsigned char *data, int len) | |||
318 | 322 | ||
319 | 323 | ||
320 | /* This sets read pointer to next header and returns it */ | 324 | /* This sets read pointer to next header and returns it */ |
321 | int scratch_get_header(struct usb_usbvision *usbvision,struct usbvision_frame_header *header) | 325 | static int scratch_get_header(struct usb_usbvision *usbvision, |
326 | struct usbvision_frame_header *header) | ||
322 | { | 327 | { |
323 | int errCode = 0; | 328 | int errCode = 0; |
324 | 329 | ||
@@ -346,7 +351,7 @@ int scratch_get_header(struct usb_usbvision *usbvision,struct usbvision_frame_he | |||
346 | 351 | ||
347 | 352 | ||
348 | /*This removes len bytes of old data from the buffer */ | 353 | /*This removes len bytes of old data from the buffer */ |
349 | void scratch_rm_old(struct usb_usbvision *usbvision, int len) | 354 | static void scratch_rm_old(struct usb_usbvision *usbvision, int len) |
350 | { | 355 | { |
351 | 356 | ||
352 | usbvision->scratch_read_ptr += len; | 357 | usbvision->scratch_read_ptr += len; |
@@ -356,7 +361,7 @@ void scratch_rm_old(struct usb_usbvision *usbvision, int len) | |||
356 | 361 | ||
357 | 362 | ||
358 | /*This resets the buffer - kills all data in it too */ | 363 | /*This resets the buffer - kills all data in it too */ |
359 | void scratch_reset(struct usb_usbvision *usbvision) | 364 | static void scratch_reset(struct usb_usbvision *usbvision) |
360 | { | 365 | { |
361 | PDEBUG(DBG_SCRATCH, "\n"); | 366 | PDEBUG(DBG_SCRATCH, "\n"); |
362 | 367 | ||
@@ -399,8 +404,8 @@ void usbvision_scratch_free(struct usb_usbvision *usbvision) | |||
399 | * 1: Draw a colored grid | 404 | * 1: Draw a colored grid |
400 | * | 405 | * |
401 | */ | 406 | */ |
402 | void usbvision_testpattern(struct usb_usbvision *usbvision, int fullframe, | 407 | static void usbvision_testpattern(struct usb_usbvision *usbvision, |
403 | int pmode) | 408 | int fullframe, int pmode) |
404 | { | 409 | { |
405 | static const char proc[] = "usbvision_testpattern"; | 410 | static const char proc[] = "usbvision_testpattern"; |
406 | struct usbvision_frame *frame; | 411 | struct usbvision_frame *frame; |
diff --git a/drivers/media/video/usbvision/usbvision-i2c.c b/drivers/media/video/usbvision/usbvision-i2c.c index 0f3fba7ea6fe..9540bd048345 100644 --- a/drivers/media/video/usbvision/usbvision-i2c.c +++ b/drivers/media/video/usbvision/usbvision-i2c.c | |||
@@ -213,7 +213,7 @@ static struct i2c_algorithm i2c_usb_algo = { | |||
213 | /* | 213 | /* |
214 | * registering functions to load algorithms at runtime | 214 | * registering functions to load algorithms at runtime |
215 | */ | 215 | */ |
216 | int usbvision_i2c_usb_add_bus(struct i2c_adapter *adap) | 216 | static int usbvision_i2c_usb_add_bus(struct i2c_adapter *adap) |
217 | { | 217 | { |
218 | PDEBUG(DBG_I2C, "I2C debugging is enabled [i2c]"); | 218 | PDEBUG(DBG_I2C, "I2C debugging is enabled [i2c]"); |
219 | PDEBUG(DBG_ALGO, "ALGO debugging is enabled [i2c]"); | 219 | PDEBUG(DBG_ALGO, "ALGO debugging is enabled [i2c]"); |
@@ -559,9 +559,6 @@ static struct i2c_client i2c_client_template = { | |||
559 | .name = "usbvision internal", | 559 | .name = "usbvision internal", |
560 | }; | 560 | }; |
561 | 561 | ||
562 | EXPORT_SYMBOL(usbvision_i2c_usb_add_bus); | ||
563 | EXPORT_SYMBOL(usbvision_i2c_usb_del_bus); | ||
564 | |||
565 | /* | 562 | /* |
566 | * Overrides for Emacs so that we follow Linus's tabbing style. | 563 | * Overrides for Emacs so that we follow Linus's tabbing style. |
567 | * --------------------------------------------------------------------------- | 564 | * --------------------------------------------------------------------------- |
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c index 864446c012eb..b77e25ea8838 100644 --- a/drivers/media/video/usbvision/usbvision-video.c +++ b/drivers/media/video/usbvision/usbvision-video.c | |||
@@ -1884,7 +1884,7 @@ static struct usb_driver usbvision_driver = { | |||
1884 | * This procedure preprocesses CustomDevice parameter if any | 1884 | * This procedure preprocesses CustomDevice parameter if any |
1885 | * | 1885 | * |
1886 | */ | 1886 | */ |
1887 | void customdevice_process(void) | 1887 | static void customdevice_process(void) |
1888 | { | 1888 | { |
1889 | usbvision_device_data[0]=usbvision_device_data[1]; | 1889 | usbvision_device_data[0]=usbvision_device_data[1]; |
1890 | usbvision_table[0]=usbvision_table[1]; | 1890 | usbvision_table[0]=usbvision_table[1]; |
diff --git a/drivers/media/video/usbvision/usbvision.h b/drivers/media/video/usbvision/usbvision.h index 0e7e3d653cac..5ad07f8a9d9b 100644 --- a/drivers/media/video/usbvision/usbvision.h +++ b/drivers/media/video/usbvision/usbvision.h | |||
@@ -489,7 +489,6 @@ struct usb_usbvision { | |||
489 | /* i2c-algo-usb declaration */ | 489 | /* i2c-algo-usb declaration */ |
490 | /* --------------------------------------------------------------- */ | 490 | /* --------------------------------------------------------------- */ |
491 | 491 | ||
492 | int usbvision_i2c_usb_add_bus(struct i2c_adapter *); | ||
493 | int usbvision_i2c_usb_del_bus(struct i2c_adapter *); | 492 | int usbvision_i2c_usb_del_bus(struct i2c_adapter *); |
494 | 493 | ||
495 | static inline void *i2c_get_algo_usb_data (struct i2c_algo_usb_data *dev) | 494 | static inline void *i2c_get_algo_usb_data (struct i2c_algo_usb_data *dev) |
@@ -510,7 +509,6 @@ int usbvision_init_i2c(struct usb_usbvision *usbvision); | |||
510 | void call_i2c_clients(struct usb_usbvision *usbvision, unsigned int cmd,void *arg); | 509 | void call_i2c_clients(struct usb_usbvision *usbvision, unsigned int cmd,void *arg); |
511 | 510 | ||
512 | /* defined in usbvision-core.c */ | 511 | /* defined in usbvision-core.c */ |
513 | void *usbvision_rvmalloc(unsigned long size); | ||
514 | void usbvision_rvfree(void *mem, unsigned long size); | 512 | void usbvision_rvfree(void *mem, unsigned long size); |
515 | int usbvision_read_reg(struct usb_usbvision *usbvision, unsigned char reg); | 513 | int usbvision_read_reg(struct usb_usbvision *usbvision, unsigned char reg); |
516 | int usbvision_write_reg(struct usb_usbvision *usbvision, unsigned char reg, | 514 | int usbvision_write_reg(struct usb_usbvision *usbvision, unsigned char reg, |