diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-11-05 18:07:20 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-11-05 18:07:20 +0100 |
commit | 8508dcbbd5f00de2ed49bf527490072e0ed3a001 (patch) | |
tree | 123d19ab7140440c191a12e2acbdc309713df7f6 /linux/drivers/media/video/cx23885 | |
parent | 8a6667f83442a2d051be1dfe253d5a5f31c9c1a8 (diff) | |
download | mediapointer-dvb-s2-8508dcbbd5f00de2ed49bf527490072e0ed3a001.tar.gz mediapointer-dvb-s2-8508dcbbd5f00de2ed49bf527490072e0ed3a001.tar.bz2 |
cx23885/: cleanups
From: Adrian Bunk <bunk@kernel.org>
This patch contains the following cleanups:
- make the following needlessly global code static:
- cx23885-core.c: struct cx23885_sram_channels[]
- cx23885-core.c: struct cx23887_sram_channels[]
- cx23885-core.c: cx23885_wakeup()
- cx23885-core.c: cx23885_sram_channel_setup()
- cx23885-core.c: cx23885_sram_channel_dump()
- cx23885-core.c: cx23885_risc_disasm()
- cx23885-core.c: cx23885_shutdown()
- cx23885-core.c: cx23885_reset()
- cx23885-core.c: cx23885_dev_unregister()
- cx23885-core.c: cx23885_risc_databuffer()
- cx23885-core.c: cx23885_risc_stopper()
- #if 0 the following unused functions:
- cx23885-core.c: cx23885_risc_buffer()
- cx23885-core.c: cx23885_cancel_buffers()
- remove the following unused EXPORT_SYMBOL's:
- cx23885-cards.c: cx23885_boards
- cx23885-i2c.c: cx23885_call_i2c_clients
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Reviewed-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/cx23885')
-rw-r--r-- | linux/drivers/media/video/cx23885/cx23885-cards.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/cx23885/cx23885-core.c | 50 | ||||
-rw-r--r-- | linux/drivers/media/video/cx23885/cx23885-i2c.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/cx23885/cx23885.h | 4 |
4 files changed, 27 insertions, 31 deletions
diff --git a/linux/drivers/media/video/cx23885/cx23885-cards.c b/linux/drivers/media/video/cx23885/cx23885-cards.c index 3ea417146..b1268099f 100644 --- a/linux/drivers/media/video/cx23885/cx23885-cards.c +++ b/linux/drivers/media/video/cx23885/cx23885-cards.c @@ -271,8 +271,6 @@ void cx23885_card_setup(struct cx23885_dev *dev) /* ------------------------------------------------------------------ */ -EXPORT_SYMBOL(cx23885_boards); - /* * Local variables: * c-basic-offset: 8 diff --git a/linux/drivers/media/video/cx23885/cx23885-core.c b/linux/drivers/media/video/cx23885/cx23885-core.c index 1ffc9695e..5422482dc 100644 --- a/linux/drivers/media/video/cx23885/cx23885-core.c +++ b/linux/drivers/media/video/cx23885/cx23885-core.c @@ -74,7 +74,7 @@ static LIST_HEAD(cx23885_devlist); * 0x00010ea0 0x00010xxx Free */ -struct sram_channel cx23885_sram_channels[] = { +static struct sram_channel cx23885_sram_channels[] = { [SRAM_CH01] = { .name = "test ch1", .cmds_start = 0x10000, @@ -206,7 +206,7 @@ struct sram_channel cx23885_sram_channels[] = { * 0x00010ea0 0x00010xxx Free */ -struct sram_channel cx23887_sram_channels[] = { +static struct sram_channel cx23887_sram_channels[] = { [SRAM_CH01] = { .name = "test ch1", .cmds_start = 0x0, @@ -357,8 +357,8 @@ static int cx23885_risc_decode(u32 risc) return incr[risc >> 28] ? incr[risc >> 28] : 1; } -void cx23885_wakeup(struct cx23885_tsport *port, - struct cx23885_dmaqueue *q, u32 count) +static void cx23885_wakeup(struct cx23885_tsport *port, + struct cx23885_dmaqueue *q, u32 count) { struct cx23885_dev *dev = port->dev; struct cx23885_buffer *buf; @@ -392,12 +392,10 @@ void cx23885_wakeup(struct cx23885_tsport *port, printk("%s: %d buffers handled (should be 1)\n", __FUNCTION__, bc); } -void cx23885_sram_channel_dump(struct cx23885_dev *dev, - struct sram_channel *ch); -int cx23885_sram_channel_setup(struct cx23885_dev *dev, - struct sram_channel *ch, - unsigned int bpl, u32 risc) +static int cx23885_sram_channel_setup(struct cx23885_dev *dev, + struct sram_channel *ch, + unsigned int bpl, u32 risc) { unsigned int i, lines; u32 cdt; @@ -468,8 +466,8 @@ int cx23885_sram_channel_setup(struct cx23885_dev *dev, return 0; } -void cx23885_sram_channel_dump(struct cx23885_dev *dev, - struct sram_channel *ch) +static void cx23885_sram_channel_dump(struct cx23885_dev *dev, + struct sram_channel *ch) { static char *name[] = { "init risc lo", @@ -530,8 +528,8 @@ void cx23885_sram_channel_dump(struct cx23885_dev *dev, dev->name, cx_read(ch->cnt2_reg)); } -void cx23885_risc_disasm(struct cx23885_tsport *port, - struct btcx_riscmem *risc) +static void cx23885_risc_disasm(struct cx23885_tsport *port, + struct btcx_riscmem *risc) { struct cx23885_dev *dev = port->dev; unsigned int i, j, n; @@ -549,7 +547,7 @@ void cx23885_risc_disasm(struct cx23885_tsport *port, } } -void cx23885_shutdown(struct cx23885_dev *dev) +static void cx23885_shutdown(struct cx23885_dev *dev) { /* disable RISC controller */ cx_write(DEV_CNTRL2, 0); @@ -579,7 +577,7 @@ void cx23885_shutdown(struct cx23885_dev *dev) } -void cx23885_reset(struct cx23885_dev *dev) +static void cx23885_reset(struct cx23885_dev *dev) { dprintk(1, "%s()\n", __FUNCTION__); @@ -637,8 +635,8 @@ static int get_resources(struct cx23885_dev *dev) } static void cx23885_timeout(unsigned long data); -int cx23885_risc_stopper(struct pci_dev *pci, struct btcx_riscmem *risc, - u32 reg, u32 mask, u32 value); +static int cx23885_risc_stopper(struct pci_dev *pci, struct btcx_riscmem *risc, + u32 reg, u32 mask, u32 value); static int cx23885_init_tsport(struct cx23885_dev *dev, struct cx23885_tsport *port, int portno) { @@ -838,7 +836,7 @@ static int cx23885_dev_setup(struct cx23885_dev *dev) return 0; } -void cx23885_dev_unregister(struct cx23885_dev *dev) +static void cx23885_dev_unregister(struct cx23885_dev *dev) { release_mem_region(pci_resource_start(dev->pci,0), pci_resource_len(dev->pci,0)); @@ -913,6 +911,7 @@ static u32* cx23885_risc_field(u32 *rp, struct scatterlist *sglist, return rp; } +#if 0 int cx23885_risc_buffer(struct pci_dev *pci, struct btcx_riscmem *risc, struct scatterlist *sglist, unsigned int top_offset, unsigned int bottom_offset, unsigned int bpl, @@ -952,10 +951,13 @@ int cx23885_risc_buffer(struct pci_dev *pci, struct btcx_riscmem *risc, BUG_ON((risc->jmp - risc->cpu + 2) * sizeof (*risc->cpu) > risc->size); return 0; } +#endif /* 0 */ -int cx23885_risc_databuffer(struct pci_dev *pci, struct btcx_riscmem *risc, - struct scatterlist *sglist, unsigned int bpl, - unsigned int lines) +static int cx23885_risc_databuffer(struct pci_dev *pci, + struct btcx_riscmem *risc, + struct scatterlist *sglist, + unsigned int bpl, + unsigned int lines) { u32 instructions; u32 *rp; @@ -982,8 +984,8 @@ int cx23885_risc_databuffer(struct pci_dev *pci, struct btcx_riscmem *risc, return 0; } -int cx23885_risc_stopper(struct pci_dev *pci, struct btcx_riscmem *risc, - u32 reg, u32 mask, u32 value) +static int cx23885_risc_stopper(struct pci_dev *pci, struct btcx_riscmem *risc, + u32 reg, u32 mask, u32 value) { u32 *rp; int rc; @@ -1244,6 +1246,7 @@ static void do_cancel_buffers(struct cx23885_tsport *port, char *reason, spin_unlock_irqrestore(&port->slock, flags); } +#if 0 void cx23885_cancel_buffers(struct cx23885_tsport *port) { struct cx23885_dev *dev = port->dev; @@ -1254,6 +1257,7 @@ void cx23885_cancel_buffers(struct cx23885_tsport *port) cx23885_stop_dma(port); do_cancel_buffers(port, "cancel", 0); } +#endif /* 0 */ static void cx23885_timeout(unsigned long data) { diff --git a/linux/drivers/media/video/cx23885/cx23885-i2c.c b/linux/drivers/media/video/cx23885/cx23885-i2c.c index 9906a02a8..6e9a89da6 100644 --- a/linux/drivers/media/video/cx23885/cx23885-i2c.c +++ b/linux/drivers/media/video/cx23885/cx23885-i2c.c @@ -371,8 +371,6 @@ int cx23885_i2c_unregister(struct cx23885_i2c *bus) /* ----------------------------------------------------------------------- */ -EXPORT_SYMBOL(cx23885_call_i2c_clients); - /* * Local variables: * c-basic-offset: 8 diff --git a/linux/drivers/media/video/cx23885/cx23885.h b/linux/drivers/media/video/cx23885/cx23885.h index fa249761b..94cdb1c3b 100644 --- a/linux/drivers/media/video/cx23885/cx23885.h +++ b/linux/drivers/media/video/cx23885/cx23885.h @@ -261,10 +261,6 @@ struct sram_channel { #define cx_set(reg,bit) cx_andor((reg),(bit),(bit)) #define cx_clear(reg,bit) cx_andor((reg),(bit),0) -extern int cx23885_sram_channel_setup(struct cx23885_dev *dev, - struct sram_channel *ch, - unsigned int bpl, u32 risc); - /* ----------------------------------------------------------- */ /* cx23885-cards.c */ |