mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@infradead.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: V4L-DVB Maintainers <v4l-dvb-maintainer@linuxtv.org>,
	Adrian Bunk <bunk@stusta.de>,
	Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: [PATCH 04/28] V4L/DVB (4959): Usbvision: possible cleanups
Date: Wed, 27 Dec 2006 14:57:27 -0200	[thread overview]
Message-ID: <20061227165727.PS58432900004@infradead.org> (raw)
In-Reply-To: <20061227165016.PS89442900000@infradead.org>


From: Adrian Bunk <bunk@stusta.de>

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>
---

 drivers/media/video/usbvision/usbvision-core.c  |   33 +++++++++++++----------
 drivers/media/video/usbvision/usbvision-i2c.c   |    5 +--
 drivers/media/video/usbvision/usbvision-video.c |    2 +
 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 797b97b..6126873 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 (
  * This is used when initializing the contents of the area.
  */
 
-void *usbvision_rvmalloc(unsigned long size)
+static void *usbvision_rvmalloc(unsigned long size)
 {
 	void *mem;
 	unsigned long adr;
@@ -181,7 +181,7 @@ #endif
 /********************************
  * scratch ring buffer handling
  ********************************/
-int scratch_len(struct usb_usbvision *usbvision)    /*This returns the amount of data actually in the buffer */
+static int scratch_len(struct usb_usbvision *usbvision)    /*This returns the amount of data actually in the buffer */
 {
 	int len = usbvision->scratch_write_ptr - usbvision->scratch_read_ptr;
 	if (len < 0) {
@@ -194,7 +194,7 @@ int scratch_len(struct usb_usbvision *us
 
 
 /* This returns the free space left in the buffer */
-int scratch_free(struct usb_usbvision *usbvision)
+static int scratch_free(struct usb_usbvision *usbvision)
 {
 	int free = usbvision->scratch_read_ptr - usbvision->scratch_write_ptr;
 	if (free <= 0) {
@@ -211,7 +211,8 @@ int scratch_free(struct usb_usbvision *u
 
 
 /* This puts data into the buffer */
-int scratch_put(struct usb_usbvision *usbvision, unsigned char *data, int len)
+static int scratch_put(struct usb_usbvision *usbvision, unsigned char *data,
+		       int len)
 {
 	int len_part;
 
@@ -237,7 +238,7 @@ int scratch_put(struct usb_usbvision *us
 }
 
 /* This marks the write_ptr as position of new frame header */
-void scratch_mark_header(struct usb_usbvision *usbvision)
+static void scratch_mark_header(struct usb_usbvision *usbvision)
 {
 	PDEBUG(DBG_SCRATCH, "header at write_ptr=%d\n", usbvision->scratch_headermarker_write_ptr);
 
@@ -248,7 +249,8 @@ void scratch_mark_header(struct usb_usbv
 }
 
 /* This gets data from the buffer at the given "ptr" position */
-int scratch_get_extra(struct usb_usbvision *usbvision, unsigned char *data, int *ptr, int len)
+static int scratch_get_extra(struct usb_usbvision *usbvision,
+			     unsigned char *data, int *ptr, int len)
 {
 	int len_part;
 	if (*ptr + len < scratch_buf_size) {
@@ -274,7 +276,8 @@ int scratch_get_extra(struct usb_usbvisi
 
 
 /* This sets the scratch extra read pointer */
-void scratch_set_extra_ptr(struct usb_usbvision *usbvision, int *ptr, int len)
+static void scratch_set_extra_ptr(struct usb_usbvision *usbvision, int *ptr,
+				  int len)
 {
 	*ptr = (usbvision->scratch_read_ptr + len)%scratch_buf_size;
 
@@ -283,7 +286,7 @@ void scratch_set_extra_ptr(struct usb_us
 
 
 /*This increments the scratch extra read pointer */
-void scratch_inc_extra_ptr(int *ptr, int len)
+static void scratch_inc_extra_ptr(int *ptr, int len)
 {
 	*ptr = (*ptr + len) % scratch_buf_size;
 
@@ -292,7 +295,8 @@ void scratch_inc_extra_ptr(int *ptr, int
 
 
 /* This gets data from the buffer */
-int scratch_get(struct usb_usbvision *usbvision, unsigned char *data, int len)
+static int scratch_get(struct usb_usbvision *usbvision, unsigned char *data,
+		       int len)
 {
 	int len_part;
 	if (usbvision->scratch_read_ptr + len < scratch_buf_size) {
@@ -318,7 +322,8 @@ int scratch_get(struct usb_usbvision *us
 
 
 /* This sets read pointer to next header and returns it */
-int scratch_get_header(struct usb_usbvision *usbvision,struct usbvision_frame_header *header)
+static int scratch_get_header(struct usb_usbvision *usbvision,
+			      struct usbvision_frame_header *header)
 {
 	int errCode = 0;
 
@@ -346,7 +351,7 @@ int scratch_get_header(struct usb_usbvis
 
 
 /*This removes len bytes of old data from the buffer */
-void scratch_rm_old(struct usb_usbvision *usbvision, int len)
+static void scratch_rm_old(struct usb_usbvision *usbvision, int len)
 {
 
 	usbvision->scratch_read_ptr += len;
@@ -356,7 +361,7 @@ void scratch_rm_old(struct usb_usbvision
 
 
 /*This resets the buffer - kills all data in it too */
-void scratch_reset(struct usb_usbvision *usbvision)
+static void scratch_reset(struct usb_usbvision *usbvision)
 {
 	PDEBUG(DBG_SCRATCH, "\n");
 
@@ -399,8 +404,8 @@ void usbvision_scratch_free(struct usb_u
  *		1: Draw a colored grid
  *
  */
-void usbvision_testpattern(struct usb_usbvision *usbvision, int fullframe,
-			int pmode)
+static void usbvision_testpattern(struct usb_usbvision *usbvision,
+				  int fullframe, int pmode)
 {
 	static const char proc[] = "usbvision_testpattern";
 	struct usbvision_frame *frame;
diff --git a/drivers/media/video/usbvision/usbvision-i2c.c b/drivers/media/video/usbvision/usbvision-i2c.c
index 0f3fba7..9540bd0 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
 /*
  * registering functions to load algorithms at runtime
  */
-int usbvision_i2c_usb_add_bus(struct i2c_adapter *adap)
+static int usbvision_i2c_usb_add_bus(struct i2c_adapter *adap)
 {
 	PDEBUG(DBG_I2C, "I2C   debugging is enabled [i2c]");
 	PDEBUG(DBG_ALGO, "ALGO   debugging is enabled [i2c]");
@@ -559,9 +559,6 @@ static struct i2c_client i2c_client_temp
 	.name		= "usbvision internal",
 };
 
-EXPORT_SYMBOL(usbvision_i2c_usb_add_bus);
-EXPORT_SYMBOL(usbvision_i2c_usb_del_bus);
-
 /*
  * Overrides for Emacs so that we follow Linus's tabbing style.
  * ---------------------------------------------------------------------------
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c
index 864446c..b77e25e 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_drive
  * This procedure preprocesses CustomDevice parameter if any
  *
  */
-void customdevice_process(void)
+static void customdevice_process(void)
 {
 	usbvision_device_data[0]=usbvision_device_data[1];
 	usbvision_table[0]=usbvision_table[1];
diff --git a/drivers/media/video/usbvision/usbvision.h b/drivers/media/video/usbvision/usbvision.h
index 0e7e3d6..5ad07f8 100644
--- a/drivers/media/video/usbvision/usbvision.h
+++ b/drivers/media/video/usbvision/usbvision.h
@@ -489,7 +489,6 @@ struct usb_usbvision {
 /* i2c-algo-usb declaration                                        */
 /* --------------------------------------------------------------- */
 
-int usbvision_i2c_usb_add_bus(struct i2c_adapter *);
 int usbvision_i2c_usb_del_bus(struct i2c_adapter *);
 
 static inline void *i2c_get_algo_usb_data (struct i2c_algo_usb_data *dev)
@@ -510,7 +509,6 @@ int usbvision_init_i2c(struct usb_usbvis
 void call_i2c_clients(struct usb_usbvision *usbvision, unsigned int cmd,void *arg);
 
 /* defined in usbvision-core.c                                      */
-void *usbvision_rvmalloc(unsigned long size);
 void usbvision_rvfree(void *mem, unsigned long size);
 int usbvision_read_reg(struct usb_usbvision *usbvision, unsigned char reg);
 int usbvision_write_reg(struct usb_usbvision *usbvision, unsigned char reg,


  parent reply	other threads:[~2006-12-27 17:12 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-27 16:50 [PATCH 00/28] V4L/DVB fixes Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 03/28] V4L/DVB (4958): Fix namespace conflict between w9968cf.c on MIPS Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 01/28] V4L/DVB (4955): Fix autosearch index Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 05/28] V4L/DVB (4960): Removal of unused code from usbvision-i2c.c Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 02/28] V4L/DVB (4956): [NOVA-T-USB2] Put remote-debugging in the right place Mauro Carvalho Chehab
2006-12-27 16:57 ` Mauro Carvalho Chehab [this message]
2006-12-27 16:57 ` [PATCH 06/28] V4L/DVB (4964): VIDEO_PALETTE_YUYV and VIDEO_PALETTE_YUV422 are the same palette Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 08/28] V4L/DVB (4968): Add PAL-60 support for cx2584x Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 07/28] V4L/DVB (4967): Add missing tuner module option pal=60 for PAL-60 support Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 09/28] V4L/DVB (4970): Usbvision memory fixes Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 11/28] V4L/DVB (4973): Dvb-core: fix printk type warning Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 13/28] V4L/DVB (4980): Fixes bug 7267: PAL/60 is not working Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 12/28] V4L/DVB (4979): Fixes compilation when CONFIG_V4L1_COMPAT is not selected Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 10/28] V4L/DVB (4972): Dvb-core: fix bug in CRC-32 checking on 64-bit systems Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 15/28] V4L/DVB (4983): Force temporal filter to 0 when scaling to prevent ghosting Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 17/28] V4L/DVB (4988): Cx2341x audio_properties is an u16, not u8 Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 16/28] V4L/DVB (4984): LOG_STATUS should show the real temporal filter value Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 18/28] V4L/DVB (4990): Cpia2/cpia2_usb.c: fix error-path leak Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 14/28] V4L/DVB (4982): Fix broken audio mode handling for line-in in msp3400 Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 20/28] V4L/DVB (4992): Fix typo in saa7134-dvb.c Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 19/28] V4L/DVB (4991): Cafe_ccic.c: fix NULL dereference Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 21/28] V4L/DVB (4994): Vivi: fix use after free in list_for_each() Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 22/28] V4L/DVB (4995): Vivi: fix kthread_run() error check Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 23/28] V4L/DVB (4996): Msp3400: fix kthread_run " Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 26/28] V4L/DVB (5001): Add two required headers on kernel 2.6.20-rc1 Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 25/28] V4L/DVB (5014): Allyesconfig build fixes on some non x86 arch Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 28/28] V4L/DVB (5010): Cx88: Fix leadtek_eeprom tagging Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 24/28] V4L/DVB (4997): Bttv: delete duplicated ioremap() Mauro Carvalho Chehab
2006-12-27 16:57 ` [PATCH 27/28] V4L/DVB (5012): Usbvision fix: It was using "&&" instead "&" Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061227165727.PS58432900004@infradead.org \
    --to=mchehab@infradead.org \
    --cc=bunk@stusta.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=v4l-dvb-maintainer@linuxtv.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®