* [PATCH 1/2] V4L/DVB: cx231xx: declare static functions as such
[not found] <cover.1286497447.git.mchehab@redhat.com>
@ 2010-10-08 0:25 ` Mauro Carvalho Chehab
2010-10-08 0:25 ` [PATCH 2/2] V4L/DVB: cx231xx: remove some unused functions Mauro Carvalho Chehab
1 sibling, 0 replies; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2010-10-08 0:25 UTC (permalink / raw)
Cc: Linux Media Mailing List
drivers/media/video/cx23885/built-in.o: In function `mc417_memory_write':
/home/v4l/v4l/patchwork/drivers/media/video/cx23885/cx23885-417.c:482: multiple definition of `mc417_memory_write'
drivers/media/video/cx231xx/built-in.o:/home/v4l/v4l/patchwork/drivers/media/video/cx231xx/cx231xx-417.c:477: first defined here
drivers/media/video/cx23885/built-in.o: In function `mc417_gpio_set':
/home/v4l/v4l/patchwork/drivers/media/video/cx23885/cx23885-417.c:636: multiple definition of `mc417_gpio_set'
drivers/media/video/cx231xx/built-in.o:/home/v4l/v4l/patchwork/drivers/media/video/cx231xx/cx231xx-417.c:615: first defined here
drivers/media/video/cx23885/built-in.o: In function `mc417_gpio_enable':
/home/v4l/v4l/patchwork/drivers/media/video/cx23885/cx23885-417.c:656: multiple definition of `mc417_gpio_enable'
drivers/media/video/cx231xx/built-in.o:/home/v4l/v4l/patchwork/drivers/media/video/cx231xx/cx231xx-417.c:635: first defined here
drivers/media/video/cx23885/built-in.o: In function `mc417_memory_read':
/home/v4l/v4l/patchwork/drivers/media/video/cx23885/cx23885-417.c:546: multiple definition of `mc417_memory_read'
drivers/media/video/cx231xx/built-in.o:/home/v4l/v4l/patchwork/drivers/media/video/cx231xx/cx231xx-417.c:541: first defined here
drivers/media/video/cx23885/built-in.o: In function `mc417_gpio_clear':
/home/v4l/v4l/patchwork/drivers/media/video/cx23885/cx23885-417.c:646: multiple definition of `mc417_gpio_clear'
drivers/media/video/cx231xx/built-in.o:/home/v4l/v4l/patchwork/drivers/media/video/cx231xx/cx231xx-417.c:625: first defined here
drivers/media/video/cx23885/built-in.o: In function `mc417_register_read':
/home/v4l/v4l/patchwork/drivers/media/video/cx23885/cx23885-417.c:388: multiple definition of `mc417_register_read'
drivers/media/video/cx231xx/built-in.o:/home/v4l/v4l/patchwork/drivers/media/video/cx231xx/cx231xx-417.c:401: first defined here
drivers/media/video/cx23885/built-in.o: In function `mc417_register_write':
/home/v4l/v4l/patchwork/drivers/media/video/cx23885/cx23885-417.c:324: multiple definition of `mc417_register_write'
drivers/media/video/cx231xx/built-in.o:/home/v4l/v4l/patchwork/drivers/media/video/cx231xx/cx231xx-417.c:343: first defined here
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/drivers/media/video/cx231xx/cx231xx-417.c b/drivers/media/video/cx231xx/cx231xx-417.c
index b5b6998..2dbad82 100644
--- a/drivers/media/video/cx231xx/cx231xx-417.c
+++ b/drivers/media/video/cx231xx/cx231xx-417.c
@@ -296,7 +296,7 @@ enum cx231xx_mute_video_shift {
#define CX23417_GPIO_MASK 0xFC0003FF
-int setITVCReg(struct cx231xx *dev, u32 gpio_direction, u32 value)
+static int setITVCReg(struct cx231xx *dev, u32 gpio_direction, u32 value)
{
int status = 0;
u32 _gpio_direction = 0;
@@ -307,7 +307,7 @@ int setITVCReg(struct cx231xx *dev, u32 gpio_direction, u32 value)
(u8 *)&value, 4, 0, 0);
return status;
}
-int getITVCReg(struct cx231xx *dev, u32 gpio_direction, u32 *pValue)
+static int getITVCReg(struct cx231xx *dev, u32 gpio_direction, u32 *pValue)
{
int status = 0;
u32 _gpio_direction = 0;
@@ -319,7 +319,8 @@ int getITVCReg(struct cx231xx *dev, u32 gpio_direction, u32 *pValue)
(u8 *)pValue, 4, 0, 1);
return status;
}
-int waitForMciComplete(struct cx231xx *dev)
+
+static int waitForMciComplete(struct cx231xx *dev)
{
u32 gpio;
u32 gpio_driection = 0;
@@ -339,7 +340,7 @@ int waitForMciComplete(struct cx231xx *dev)
return 0;
}
-int mc417_register_write(struct cx231xx *dev, u16 address, u32 value)
+static int mc417_register_write(struct cx231xx *dev, u16 address, u32 value)
{
u32 temp;
int status = 0;
@@ -397,7 +398,7 @@ int mc417_register_write(struct cx231xx *dev, u16 address, u32 value)
return waitForMciComplete(dev);
}
-int mc417_register_read(struct cx231xx *dev, u16 address, u32 *value)
+static int mc417_register_read(struct cx231xx *dev, u16 address, u32 *value)
{
/*write address byte 0;*/
u32 temp;
@@ -473,7 +474,7 @@ int mc417_register_read(struct cx231xx *dev, u16 address, u32 *value)
return ret;
}
-int mc417_memory_write(struct cx231xx *dev, u32 address, u32 value)
+static int mc417_memory_write(struct cx231xx *dev, u32 address, u32 value)
{
/*write data byte 0;*/
@@ -537,7 +538,7 @@ int mc417_memory_write(struct cx231xx *dev, u32 address, u32 value)
return 0;
}
-int mc417_memory_read(struct cx231xx *dev, u32 address, u32 *value)
+static int mc417_memory_read(struct cx231xx *dev, u32 address, u32 *value)
{
u32 temp = 0;
u32 return_value = 0;
@@ -611,7 +612,7 @@ int mc417_memory_read(struct cx231xx *dev, u32 address, u32 *value)
return ret;
}
-void mc417_gpio_set(struct cx231xx *dev, u32 mask)
+static void mc417_gpio_set(struct cx231xx *dev, u32 mask)
{
u32 val;
@@ -621,7 +622,7 @@ void mc417_gpio_set(struct cx231xx *dev, u32 mask)
mc417_register_write(dev, 0x900C, val);
}
-void mc417_gpio_clear(struct cx231xx *dev, u32 mask)
+static void mc417_gpio_clear(struct cx231xx *dev, u32 mask)
{
u32 val;
@@ -631,7 +632,7 @@ void mc417_gpio_clear(struct cx231xx *dev, u32 mask)
mc417_register_write(dev, 0x900C, val);
}
-void mc417_gpio_enable(struct cx231xx *dev, u32 mask, int asoutput)
+static void mc417_gpio_enable(struct cx231xx *dev, u32 mask, int asoutput)
{
u32 val;
@@ -873,7 +874,8 @@ static int cx231xx_find_mailbox(struct cx231xx *dev)
dprintk(3, "Mailbox signature values not found!\n");
return -1;
}
-void mciWriteMemoryToGPIO(struct cx231xx *dev, u32 address, u32 value,
+
+static void mciWriteMemoryToGPIO(struct cx231xx *dev, u32 address, u32 value,
u32 *p_fw_image)
{
@@ -1095,7 +1097,7 @@ static int cx231xx_load_firmware(struct cx231xx *dev)
return 0;
}
-void cx231xx_417_check_encoder(struct cx231xx *dev)
+static void cx231xx_417_check_encoder(struct cx231xx *dev)
{
u32 status, seq;
@@ -1272,7 +1274,7 @@ static void free_buffer(struct videobuf_queue *vq, struct cx231xx_buffer *buf)
buf->vb.state = VIDEOBUF_NEEDS_INIT;
}
-void buffer_copy(struct cx231xx *dev, char *data, int len, struct urb *urb,
+static void buffer_copy(struct cx231xx *dev, char *data, int len, struct urb *urb,
struct cx231xx_dmaqueue *dma_q)
{
void *vbuf;
@@ -1334,7 +1336,7 @@ void buffer_copy(struct cx231xx *dev, char *data, int len, struct urb *urb,
return;
}
-void buffer_filled(char *data, int len, struct urb *urb,
+static void buffer_filled(char *data, int len, struct urb *urb,
struct cx231xx_dmaqueue *dma_q)
{
void *vbuf;
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] V4L/DVB: cx231xx: remove some unused functions
[not found] <cover.1286497447.git.mchehab@redhat.com>
2010-10-08 0:25 ` [PATCH 1/2] V4L/DVB: cx231xx: declare static functions as such Mauro Carvalho Chehab
@ 2010-10-08 0:25 ` Mauro Carvalho Chehab
1 sibling, 0 replies; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2010-10-08 0:25 UTC (permalink / raw)
Cc: Linux Media Mailing List
This file came originally from cx23885 driver. Some functions aren't
used. Now that they are declared as static, we have those errors:
drivers/media/video/cx231xx/cx231xx-417.c:615: warning: ‘mc417_gpio_set’ defined but not used
drivers/media/video/cx231xx/cx231xx-417.c:625: warning: ‘mc417_gpio_clear’ defined but not used
drivers/media/video/cx231xx/cx231xx-417.c:635: warning: ‘mc417_gpio_enable’ defined but not used
As they're not used, just remove them. If needed, they can be restored from
the git logs or from the cx23885 driver.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/drivers/media/video/cx231xx/cx231xx-417.c b/drivers/media/video/cx231xx/cx231xx-417.c
index 2dbad82..e456b97 100644
--- a/drivers/media/video/cx231xx/cx231xx-417.c
+++ b/drivers/media/video/cx231xx/cx231xx-417.c
@@ -612,39 +612,6 @@ static int mc417_memory_read(struct cx231xx *dev, u32 address, u32 *value)
return ret;
}
-static void mc417_gpio_set(struct cx231xx *dev, u32 mask)
-{
- u32 val;
-
- /* Set the gpio value */
- mc417_register_read(dev, 0x900C, &val);
- val |= (mask & 0x000ffff);
- mc417_register_write(dev, 0x900C, val);
-}
-
-static void mc417_gpio_clear(struct cx231xx *dev, u32 mask)
-{
- u32 val;
-
- /* Clear the gpio value */
- mc417_register_read(dev, 0x900C, &val);
- val &= ~(mask & 0x0000ffff);
- mc417_register_write(dev, 0x900C, val);
-}
-
-static void mc417_gpio_enable(struct cx231xx *dev, u32 mask, int asoutput)
-{
- u32 val;
-
- /* Enable GPIO direction bits */
- mc417_register_read(dev, 0x9020, &val);
- if (asoutput)
- val |= (mask & 0x0000ffff);
- else
- val &= ~(mask & 0x0000ffff);
-
- mc417_register_write(dev, 0x9020, val);
-}
/* ------------------------------------------------------------------ */
/* MPEG encoder API */
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-08 0:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1286497447.git.mchehab@redhat.com>
2010-10-08 0:25 ` [PATCH 1/2] V4L/DVB: cx231xx: declare static functions as such Mauro Carvalho Chehab
2010-10-08 0:25 ` [PATCH 2/2] V4L/DVB: cx231xx: remove some unused functions Mauro Carvalho Chehab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox