linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC: 2.6 patch] drivers/media/dvb/: possible cleanups
@ 2006-01-07 18:12 Adrian Bunk
  2006-01-07 18:42 ` [linux-dvb-maintainer] " Michael Krufky
  2006-01-08  7:07 ` Manu Abraham
  0 siblings, 2 replies; 8+ messages in thread
From: Adrian Bunk @ 2006-01-07 18:12 UTC (permalink / raw)
  To: linux-dvb-maintainer; +Cc: linux-kernel

This patch contains the following possible cleanups:
- make needlessly global code static
- #if 0 the following unused global functions:
  - b2c2/flexcop-dma.c: flexcop_dma_control_packet_irq()
  - b2c2/flexcop-dma.c: flexcop_dma_config_packet_count()

Please review which of these changes do make sense and which conflict 
with pending patches.


Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 drivers/media/dvb/b2c2/flexcop-common.h      |    2 -
 drivers/media/dvb/b2c2/flexcop-dma.c         |    4 ++
 drivers/media/dvb/b2c2/flexcop-misc.c        |    6 ++--
 drivers/media/dvb/b2c2/flexcop-reg.h         |    4 --
 drivers/media/dvb/bt8xx/dst.c                |   19 +++++--------
 drivers/media/dvb/bt8xx/dst_common.h         |    5 ---
 drivers/media/dvb/dvb-usb/cxusb.c            |    2 -
 drivers/media/dvb/dvb-usb/dvb-usb-firmware.c |    8 +++--
 drivers/media/dvb/dvb-usb/dvb-usb.h          |    1 
 drivers/media/dvb/dvb-usb/vp702x.c           |    6 ++--
 drivers/media/dvb/dvb-usb/vp702x.h           |    2 -
 drivers/media/dvb/ttpci/av7110.h             |    2 -
 drivers/media/dvb/ttpci/av7110_ir.c          |   26 +++++++++----------
 13 files changed, 38 insertions(+), 49 deletions(-)

--- linux-2.6.15-mm2-full/drivers/media/dvb/bt8xx/dst_common.h.old	2006-01-07 16:51:59.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/bt8xx/dst_common.h	2006-01-07 16:54:49.000000000 +0100
@@ -139,10 +139,8 @@
 };
 
 int rdc_reset_state(struct dst_state *state);
-int rdc_8820_reset(struct dst_state *state);
 
 int dst_wait_dst_ready(struct dst_state *state, u8 delay_mode);
-int dst_pio_enable(struct dst_state *state);
 int dst_pio_disable(struct dst_state *state);
 int dst_error_recovery(struct dst_state* state);
 int dst_error_bailout(struct dst_state *state);
@@ -153,9 +151,6 @@
 u8 dst_check_sum(u8 * buf, u32 len);
 struct dst_state* dst_attach(struct dst_state* state, struct dvb_adapter *dvb_adapter);
 int dst_ca_attach(struct dst_state *state, struct dvb_adapter *dvb_adapter);
-int dst_gpio_outb(struct dst_state* state, u32 mask, u32 enbb, u32 outhigh, int delay);
-
-int dst_command(struct dst_state* state, u8 * data, u8 len);
 
 
 #endif // DST_COMMON_H
--- linux-2.6.15-mm2-full/drivers/media/dvb/bt8xx/dst.c.old	2006-01-07 16:42:33.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/bt8xx/dst.c	2006-01-07 16:54:56.000000000 +0100
@@ -63,6 +63,7 @@
 	}										\
 } while(0)
 
+static int dst_command(struct dst_state *state, u8 *data, u8 len);
 
 static void dst_packsize(struct dst_state *state, int psize)
 {
@@ -72,7 +73,8 @@
 	bt878_device_control(state->bt, DST_IG_TS, &bits);
 }
 
-int dst_gpio_outb(struct dst_state *state, u32 mask, u32 enbb, u32 outhigh, int delay)
+static int dst_gpio_outb(struct dst_state *state, u32 mask, u32 enbb,
+			 u32 outhigh, int delay)
 {
 	union dst_gpio_packet enb;
 	union dst_gpio_packet bits;
@@ -101,9 +103,8 @@
 
 	return 0;
 }
-EXPORT_SYMBOL(dst_gpio_outb);
 
-int dst_gpio_inb(struct dst_state *state, u8 *result)
+static int dst_gpio_inb(struct dst_state *state, u8 *result)
 {
 	union dst_gpio_packet rd_packet;
 	int err;
@@ -117,7 +118,6 @@
 
 	return 0;
 }
-EXPORT_SYMBOL(dst_gpio_inb);
 
 int rdc_reset_state(struct dst_state *state)
 {
@@ -137,7 +137,7 @@
 }
 EXPORT_SYMBOL(rdc_reset_state);
 
-int rdc_8820_reset(struct dst_state *state)
+static int rdc_8820_reset(struct dst_state *state)
 {
 	dprintk(verbose, DST_DEBUG, 1, "Resetting DST");
 	if (dst_gpio_outb(state, RDC_8820_RESET, RDC_8820_RESET, 0, NO_DELAY) < 0) {
@@ -152,9 +152,8 @@
 
 	return 0;
 }
-EXPORT_SYMBOL(rdc_8820_reset);
 
-int dst_pio_enable(struct dst_state *state)
+static int dst_pio_enable(struct dst_state *state)
 {
 	if (dst_gpio_outb(state, ~0, RDC_8820_PIO_0_ENABLE, 0, NO_DELAY) < 0) {
 		dprintk(verbose, DST_ERROR, 1, "dst_gpio_outb ERROR !");
@@ -164,7 +163,6 @@
 
 	return 0;
 }
-EXPORT_SYMBOL(dst_pio_enable);
 
 int dst_pio_disable(struct dst_state *state)
 {
@@ -602,7 +600,7 @@
 
 */
 
-struct dst_types dst_tlist[] = {
+static struct dst_types dst_tlist[] = {
 	{
 		.device_id = "200103A",
 		.offset = 0,
@@ -958,7 +956,7 @@
 	return 0;
 }
 
-int dst_command(struct dst_state *state, u8 *data, u8 len)
+static int dst_command(struct dst_state *state, u8 *data, u8 len)
 {
 	u8 reply;
 
@@ -1021,7 +1019,6 @@
 	return -EIO;
 
 }
-EXPORT_SYMBOL(dst_command);
 
 static int dst_get_signal(struct dst_state *state)
 {
--- linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-common.h.old	2006-01-07 16:49:18.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-common.h	2006-01-07 16:49:28.000000000 +0100
@@ -116,11 +116,9 @@
 
 int flexcop_dma_control_timer_irq(struct flexcop_device *fc, flexcop_dma_index_t no, int onoff);
 int flexcop_dma_control_size_irq(struct flexcop_device *fc, flexcop_dma_index_t no, int onoff);
-int flexcop_dma_control_packet_irq(struct flexcop_device *fc, flexcop_dma_index_t no, int onoff);
 int flexcop_dma_config(struct flexcop_device *fc, struct flexcop_dma *dma, flexcop_dma_index_t dma_idx);
 int flexcop_dma_xfer_control(struct flexcop_device *fc, flexcop_dma_index_t dma_idx, flexcop_dma_addr_index_t index, int onoff);
 int flexcop_dma_config_timer(struct flexcop_device *fc, flexcop_dma_index_t dma_idx, u8 cycles);
-int flexcop_dma_config_packet_count(struct flexcop_device *fc, flexcop_dma_index_t dma_idx, u8 packets);
 
 /* from flexcop-eeprom.c */
 /* the PCI part uses this call to get the MAC address, the USB part has its own */
--- linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-dma.c.old	2006-01-07 16:49:37.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-dma.c	2006-01-07 16:50:25.000000000 +0100
@@ -169,6 +169,8 @@
 }
 EXPORT_SYMBOL(flexcop_dma_config_timer);
 
+#if 0
+
 /* packet IRQ does not exist in FCII or FCIIb - according to data book and tests */
 int flexcop_dma_control_packet_irq(struct flexcop_device *fc,
 		flexcop_dma_index_t no,
@@ -204,3 +206,5 @@
 	return 0;
 }
 EXPORT_SYMBOL(flexcop_dma_config_packet_count);
+
+#endif  /*  0  */
--- linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-reg.h.old	2006-01-07 16:51:05.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-reg.h	2006-01-07 16:51:38.000000000 +0100
@@ -16,8 +16,6 @@
 	FLEXCOP_III,
 } flexcop_revision_t;
 
-extern const char *flexcop_revision_names[];
-
 typedef enum {
 	FC_UNK = 0,
 	FC_AIR_DVB,
@@ -34,8 +32,6 @@
 	FC_PCI,
 } flexcop_bus_t;
 
-extern const char *flexcop_device_names[];
-
 /* FlexCop IBI Registers */
 #if defined(__LITTLE_ENDIAN)
 	#include "flexcop_ibi_value_le.h"
--- linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-misc.c.old	2006-01-07 16:48:00.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-misc.c	2006-01-07 16:51:27.000000000 +0100
@@ -36,14 +36,14 @@
 	/* bus parts have to decide if hw pid filtering is used or not. */
 }
 
-const char *flexcop_revision_names[] = {
+static const char *flexcop_revision_names[] = {
 	"Unkown chip",
 	"FlexCopII",
 	"FlexCopIIb",
 	"FlexCopIII",
 };
 
-const char *flexcop_device_names[] = {
+static const char *flexcop_device_names[] = {
 	"Unkown device",
 	"Air2PC/AirStar 2 DVB-T",
 	"Air2PC/AirStar 2 ATSC 1st generation",
@@ -54,7 +54,7 @@
 	"Air2PC/AirStar 2 ATSC 3rd generation (HD5000)",
 };
 
-const char *flexcop_bus_names[] = {
+static const char *flexcop_bus_names[] = {
 	"USB",
 	"PCI",
 };
--- linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/cxusb.c.old	2006-01-07 16:55:20.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/cxusb.c	2006-01-07 16:55:27.000000000 +0100
@@ -156,7 +156,7 @@
 	return 0;
 }
 
-struct cx22702_config cxusb_cx22702_config = {
+static struct cx22702_config cxusb_cx22702_config = {
 	.demod_address = 0x63,
 
 	.output_mode = CX22702_PARALLEL_OUTPUT,
--- linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/dvb-usb.h.old	2006-01-07 16:56:12.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/dvb-usb.h	2006-01-07 16:56:18.000000000 +0100
@@ -341,6 +341,5 @@
 	u8 data[255];
 	u8 chk;
 };
-extern int dvb_usb_get_hexline(const struct firmware *, struct hexline *, int *);
 
 #endif
--- linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c.old	2006-01-07 16:56:27.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c	2006-01-07 16:57:06.000000000 +0100
@@ -24,6 +24,9 @@
 	{ .id = CYPRESS_FX2,     .name = "Cypress FX2",     .cpu_cs_register = 0xe600 },
 };
 
+static int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx,
+			       int *pos);
+
 /*
  * load a firmware packet to the device
  */
@@ -111,7 +114,8 @@
 	return ret;
 }
 
-int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx, int *pos)
+static int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx,
+			       int *pos)
 {
 	u8 *b = (u8 *) &fw->data[*pos];
 	int data_offs = 4;
@@ -141,5 +145,3 @@
 
 	return *pos;
 }
-EXPORT_SYMBOL(dvb_usb_get_hexline);
-
--- linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/vp702x.h.old	2006-01-07 16:57:23.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/vp702x.h	2006-01-07 16:58:15.000000000 +0100
@@ -102,8 +102,6 @@
 extern struct dvb_frontend * vp702x_fe_attach(struct dvb_usb_device *d);
 
 extern int vp702x_usb_inout_op(struct dvb_usb_device *d, u8 *o, int olen, u8 *i, int ilen, int msec);
-extern int vp702x_usb_inout_cmd(struct dvb_usb_device *d, u8 cmd, u8 *o, int olen, u8 *i, int ilen, int msec);
 extern int vp702x_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen);
-extern int vp702x_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen);
 
 #endif
--- linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/vp702x.c.old	2006-01-07 16:57:37.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/vp702x.c	2006-01-07 16:58:27.000000000 +0100
@@ -53,7 +53,8 @@
 	return ret;
 }
 
-int vp702x_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen)
+static int vp702x_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value,
+			     u16 index, u8 *b, int blen)
 {
 	deb_xfer("out: req. %x, val: %x, ind: %x, buffer: ",req,value,index);
 	debug_dump(b,blen,deb_xfer);
@@ -88,7 +89,8 @@
 	return ret;
 }
 
-int vp702x_usb_inout_cmd(struct dvb_usb_device *d, u8 cmd, u8 *o, int olen, u8 *i, int ilen, int msec)
+static int vp702x_usb_inout_cmd(struct dvb_usb_device *d, u8 cmd, u8 *o,
+				int olen, u8 *i, int ilen, int msec)
 {
 	u8 bout[olen+2];
 	u8 bin[ilen+1];
--- linux-2.6.15-mm2-full/drivers/media/dvb/ttpci/av7110.h.old	2006-01-07 16:59:33.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/ttpci/av7110.h	2006-01-07 16:59:39.000000000 +0100
@@ -261,8 +261,6 @@
 extern int ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid,
 		       u16 subpid, u16 pcrpid);
 
-extern int av7110_setup_irc_config (struct av7110 *av7110, u32 ir_config);
-
 extern int av7110_ir_init(struct av7110 *av7110);
 extern void av7110_ir_exit(struct av7110 *av7110);
 
--- linux-2.6.15-mm2-full/drivers/media/dvb/ttpci/av7110_ir.c.old	2006-01-07 16:59:47.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/ttpci/av7110_ir.c	2006-01-07 17:00:21.000000000 +0100
@@ -155,6 +155,19 @@
 }
 
 
+static int av7110_setup_irc_config(struct av7110 *av7110, u32 ir_config)
+{
+	int ret = 0;
+
+	dprintk(4, "%p\n", av7110);
+	if (av7110) {
+		ret = av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, SetIR, 1, ir_config);
+		av7110->ir_config = ir_config;
+	}
+	return ret;
+}
+
+
 static int av7110_ir_write_proc(struct file *file, const char __user *buffer,
 				unsigned long count, void *data)
 {
@@ -187,19 +200,6 @@
 }
 
 
-int av7110_setup_irc_config(struct av7110 *av7110, u32 ir_config)
-{
-	int ret = 0;
-
-	dprintk(4, "%p\n", av7110);
-	if (av7110) {
-		ret = av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, SetIR, 1, ir_config);
-		av7110->ir_config = ir_config;
-	}
-	return ret;
-}
-
-
 static void ir_handler(struct av7110 *av7110, u32 ircom)
 {
 	dprintk(4, "ircommand = %08x\n", ircom);


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [linux-dvb-maintainer] [RFC: 2.6 patch] drivers/media/dvb/: possible cleanups
  2006-01-07 18:12 [RFC: 2.6 patch] drivers/media/dvb/: possible cleanups Adrian Bunk
@ 2006-01-07 18:42 ` Michael Krufky
       [not found]   ` <1136848727.6782.75.camel@localhost>
  2006-01-08  7:07 ` Manu Abraham
  1 sibling, 1 reply; 8+ messages in thread
From: Michael Krufky @ 2006-01-07 18:42 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-dvb-maintainer, linux-kernel

On 1/7/06, Adrian Bunk <bunk@stusta.de> wrote:
> This patch contains the following possible cleanups:
> - make needlessly global code static
> - #if 0 the following unused global functions:
>   - b2c2/flexcop-dma.c: flexcop_dma_control_packet_irq()
>   - b2c2/flexcop-dma.c: flexcop_dma_config_packet_count()
>
> Please review which of these changes do make sense and which conflict
> with pending patches.
>
>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
>
> ---
>
>  drivers/media/dvb/b2c2/flexcop-common.h      |    2 -
>  drivers/media/dvb/b2c2/flexcop-dma.c         |    4 ++
>  drivers/media/dvb/b2c2/flexcop-misc.c        |    6 ++--
>  drivers/media/dvb/b2c2/flexcop-reg.h         |    4 --
>  drivers/media/dvb/bt8xx/dst.c                |   19 +++++--------
>  drivers/media/dvb/bt8xx/dst_common.h         |    5 ---
>  drivers/media/dvb/dvb-usb/cxusb.c            |    2 -
>  drivers/media/dvb/dvb-usb/dvb-usb-firmware.c |    8 +++--
>  drivers/media/dvb/dvb-usb/dvb-usb.h          |    1
>  drivers/media/dvb/dvb-usb/vp702x.c           |    6 ++--
>  drivers/media/dvb/dvb-usb/vp702x.h           |    2 -
>  drivers/media/dvb/ttpci/av7110.h             |    2 -
>  drivers/media/dvb/ttpci/av7110_ir.c          |   26 +++++++++----------
>  13 files changed, 38 insertions(+), 49 deletions(-)


Adrian,

At first glance, I already see many collisions with pending
patchsets...  Mauro is getting ready to push a whole bunch of patches
onto the v4l-dvb git tree.

Could you please wait until after those get merged?

Also, I'm not sure about some of the changes here... Hopefully some of
the other DVB guys will have some comments.  I think it's better to
postphone reviewing this until after we merge our new v4l / dvb stuff.

Regards,
Michael Krufky

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFC: 2.6 patch] drivers/media/dvb/: possible cleanups
  2006-01-07 18:12 [RFC: 2.6 patch] drivers/media/dvb/: possible cleanups Adrian Bunk
  2006-01-07 18:42 ` [linux-dvb-maintainer] " Michael Krufky
@ 2006-01-08  7:07 ` Manu Abraham
  1 sibling, 0 replies; 8+ messages in thread
From: Manu Abraham @ 2006-01-08  7:07 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-dvb-maintainer, linux-kernel

Adrian Bunk wrote:

>This patch contains the following possible cleanups:
>- make needlessly global code static
>- #if 0 the following unused global functions:
>  - b2c2/flexcop-dma.c: flexcop_dma_control_packet_irq()
>  - b2c2/flexcop-dma.c: flexcop_dma_config_packet_count()
>
>Please review which of these changes do make sense and which conflict 
>with pending patches.
>
>
>Signed-off-by: Adrian Bunk <bunk@stusta.de>
>
>
> u8 dst_check_sum(u8 * buf, u32 len);
> struct dst_state* dst_attach(struct dst_state* state, struct dvb_adapter *dvb_adapter);
> int dst_ca_attach(struct dst_state *state, struct dvb_adapter *dvb_adapter);
>-int dst_gpio_outb(struct dst_state* state, u32 mask, u32 enbb, u32 outhigh, int delay);
>-
>-int dst_command(struct dst_state* state, u8 * data, u8 len);
> 
> 
> #endif // DST_COMMON_H
>--- linux-2.6.15-mm2-full/drivers/media/dvb/bt8xx/dst.c.old	2006-01-07 16:42:33.000000000 +0100
>+++ linux-2.6.15-mm2-full/drivers/media/dvb/bt8xx/dst.c	2006-01-07 16:54:56.000000000 +0100
>@@ -63,6 +63,7 @@
> 	}										\
> } while(0)
> 
>+static int dst_command(struct dst_state *state, u8 *data, u8 len);
> 
> static void dst_packsize(struct dst_state *state, int psize)
> {
>@@ -72,7 +73,8 @@
> 	bt878_device_control(state->bt, DST_IG_TS, &bits);
> }
> 
>-int dst_gpio_outb(struct dst_state *state, u32 mask, u32 enbb, u32 outhigh, int delay)
>+static int dst_gpio_outb(struct dst_state *state, u32 mask, u32 enbb,
>+			 u32 outhigh, int delay)
> {
> 	union dst_gpio_packet enb;
> 	union dst_gpio_packet bits;
>@@ -101,9 +103,8 @@
> 
> 	return 0;
> }
>-EXPORT_SYMBOL(dst_gpio_outb);
> 
>-int dst_gpio_inb(struct dst_state *state, u8 *result)
>+static int dst_gpio_inb(struct dst_state *state, u8 *result)
> {
> 	union dst_gpio_packet rd_packet;
> 	int err;
>@@ -117,7 +118,6 @@
> 
> 	return 0;
> }
>-EXPORT_SYMBOL(dst_gpio_inb);
> 
> int rdc_reset_state(struct dst_state *state)
> {
>@@ -137,7 +137,7 @@
> }
> EXPORT_SYMBOL(rdc_reset_state);
> 
>-int rdc_8820_reset(struct dst_state *state)
>+static int rdc_8820_reset(struct dst_state *state)
> {
> 	dprintk(verbose, DST_DEBUG, 1, "Resetting DST");
> 	if (dst_gpio_outb(state, RDC_8820_RESET, RDC_8820_RESET, 0, NO_DELAY) < 0) {
>@@ -152,9 +152,8 @@
> 
> 	return 0;
> }
>-EXPORT_SYMBOL(rdc_8820_reset);
> 
>-int dst_pio_enable(struct dst_state *state)
>+static int dst_pio_enable(struct dst_state *state)
> {
> 	if (dst_gpio_outb(state, ~0, RDC_8820_PIO_0_ENABLE, 0, NO_DELAY) < 0) {
> 		dprintk(verbose, DST_ERROR, 1, "dst_gpio_outb ERROR !");
>@@ -164,7 +163,6 @@
> 
> 	return 0;
> }
>-EXPORT_SYMBOL(dst_pio_enable);
> 
> int dst_pio_disable(struct dst_state *state)
> {
>@@ -602,7 +600,7 @@
> 
> */
> 
>-struct dst_types dst_tlist[] = {
>+static struct dst_types dst_tlist[] = {
> 	{
> 		.device_id = "200103A",
> 		.offset = 0,
>@@ -958,7 +956,7 @@
> 	return 0;
> }
> 
>-int dst_command(struct dst_state *state, u8 *data, u8 len)
>+static int dst_command(struct dst_state *state, u8 *data, u8 len)
> {
> 	u8 reply;
> 
>@@ -1021,7 +1019,6 @@
> 	return -EIO;
> 
> }
>-EXPORT_SYMBOL(dst_command);
> 
> static int dst_get_signal(struct dst_state *state)
> {
>  
>

dst is currently a bit broken ATM and there are quite a bit changes that 
haven't yet gone into linuxtv.org CVS tree. So i would be of the 
opinion, that if you can hold off on the patches to the dst/dst_ca 
module till it's fixed, that would be quite helpful.


Thanks,
Manu


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [RFC: 2.6 patch] drivers/media/dvb/: possible cleanups
       [not found]   ` <1136848727.6782.75.camel@localhost>
@ 2006-01-14  2:09     ` Adrian Bunk
  0 siblings, 0 replies; 8+ messages in thread
From: Adrian Bunk @ 2006-01-14  2:09 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Michael Krufky, linux-dvb-maintainer, linux-kernel

On Mon, Jan 09, 2006 at 09:18:47PM -0200, Mauro Carvalho Chehab wrote:
> Adrian,
> Em Sáb, 2006-01-07 às 13:42 -0500, Michael Krufky escreveu:
> > On 1/7/06, Adrian Bunk <bunk@stusta.de> wrote:
> 
> > Adrian,
> > 
> > At first glance, I already see many collisions with pending
> > patchsets...  Mauro is getting ready to push a whole bunch of patches
> > onto the v4l-dvb git tree.
> >
> > Could you please wait until after those get merged?
> > 
> > Also, I'm not sure about some of the changes here... Hopefully some of
> > the other DVB guys will have some comments.  I think it's better to
> > postphone reviewing this until after we merge our new v4l / dvb stuff.
> > 
> 	Patches applied and already available at 2.6.15-git.

Updated patch below (without the dst parts).

cu
Adrian


<--  snip  -->


This patch contains the following possible cleanups:
- make needlessly global code static
- #if 0 the following unused global functions:
  - b2c2/flexcop-dma.c: flexcop_dma_control_packet_irq()
  - b2c2/flexcop-dma.c: flexcop_dma_config_packet_count()

Please review which of these changes do make sense and which conflict 
with pending patches.


Signed-off-by: Adrian Bunk <bunk@stusta.de>

---
 drivers/media/dvb/b2c2/flexcop-common.h      |    2 -
 drivers/media/dvb/b2c2/flexcop-dma.c         |    4 ++
 drivers/media/dvb/b2c2/flexcop-misc.c        |    6 ++--
 drivers/media/dvb/b2c2/flexcop-reg.h         |    4 --
 drivers/media/dvb/dvb-usb/cxusb.c            |    8 ++---
 drivers/media/dvb/dvb-usb/dvb-usb-firmware.c |    8 +++--
 drivers/media/dvb/dvb-usb/dvb-usb.h          |    1 
 drivers/media/dvb/dvb-usb/vp702x.c           |    6 ++--
 drivers/media/dvb/dvb-usb/vp702x.h           |    2 -
 drivers/media/dvb/ttpci/av7110.h             |    2 -
 drivers/media/dvb/ttpci/av7110_ir.c          |   26 +++++++++----------
 11 files changed, 33 insertions(+), 36 deletions(-)

--- linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-common.h.old	2006-01-07 16:49:18.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-common.h	2006-01-07 16:49:28.000000000 +0100
@@ -116,11 +116,9 @@
 
 int flexcop_dma_control_timer_irq(struct flexcop_device *fc, flexcop_dma_index_t no, int onoff);
 int flexcop_dma_control_size_irq(struct flexcop_device *fc, flexcop_dma_index_t no, int onoff);
-int flexcop_dma_control_packet_irq(struct flexcop_device *fc, flexcop_dma_index_t no, int onoff);
 int flexcop_dma_config(struct flexcop_device *fc, struct flexcop_dma *dma, flexcop_dma_index_t dma_idx);
 int flexcop_dma_xfer_control(struct flexcop_device *fc, flexcop_dma_index_t dma_idx, flexcop_dma_addr_index_t index, int onoff);
 int flexcop_dma_config_timer(struct flexcop_device *fc, flexcop_dma_index_t dma_idx, u8 cycles);
-int flexcop_dma_config_packet_count(struct flexcop_device *fc, flexcop_dma_index_t dma_idx, u8 packets);
 
 /* from flexcop-eeprom.c */
 /* the PCI part uses this call to get the MAC address, the USB part has its own */
--- linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-dma.c.old	2006-01-07 16:49:37.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-dma.c	2006-01-07 16:50:25.000000000 +0100
@@ -169,6 +169,8 @@
 }
 EXPORT_SYMBOL(flexcop_dma_config_timer);
 
+#if 0
+
 /* packet IRQ does not exist in FCII or FCIIb - according to data book and tests */
 int flexcop_dma_control_packet_irq(struct flexcop_device *fc,
 		flexcop_dma_index_t no,
@@ -204,3 +206,5 @@
 	return 0;
 }
 EXPORT_SYMBOL(flexcop_dma_config_packet_count);
+
+#endif  /*  0  */
--- linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-reg.h.old	2006-01-07 16:51:05.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-reg.h	2006-01-07 16:51:38.000000000 +0100
@@ -16,8 +16,6 @@
 	FLEXCOP_III,
 } flexcop_revision_t;
 
-extern const char *flexcop_revision_names[];
-
 typedef enum {
 	FC_UNK = 0,
 	FC_AIR_DVB,
@@ -34,8 +32,6 @@
 	FC_PCI,
 } flexcop_bus_t;
 
-extern const char *flexcop_device_names[];
-
 /* FlexCop IBI Registers */
 #if defined(__LITTLE_ENDIAN)
 	#include "flexcop_ibi_value_le.h"
--- linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-misc.c.old	2006-01-07 16:48:00.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-misc.c	2006-01-07 16:51:27.000000000 +0100
@@ -36,14 +36,14 @@
 	/* bus parts have to decide if hw pid filtering is used or not. */
 }
 
-const char *flexcop_revision_names[] = {
+static const char *flexcop_revision_names[] = {
 	"Unkown chip",
 	"FlexCopII",
 	"FlexCopIIb",
 	"FlexCopIII",
 };
 
-const char *flexcop_device_names[] = {
+static const char *flexcop_device_names[] = {
 	"Unkown device",
 	"Air2PC/AirStar 2 DVB-T",
 	"Air2PC/AirStar 2 ATSC 1st generation",
@@ -54,7 +54,7 @@
 	"Air2PC/AirStar 2 ATSC 3rd generation (HD5000)",
 };
 
-const char *flexcop_bus_names[] = {
+static const char *flexcop_bus_names[] = {
 	"USB",
 	"PCI",
 };
--- linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c.old	2006-01-07 16:56:27.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c	2006-01-07 16:57:06.000000000 +0100
@@ -24,6 +24,9 @@
 	{ .id = CYPRESS_FX2,     .name = "Cypress FX2",     .cpu_cs_register = 0xe600 },
 };
 
+static int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx,
+			       int *pos);
+
 /*
  * load a firmware packet to the device
  */
@@ -111,7 +114,8 @@
 	return ret;
 }
 
-int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx, int *pos)
+static int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx,
+			       int *pos)
 {
 	u8 *b = (u8 *) &fw->data[*pos];
 	int data_offs = 4;
@@ -141,5 +145,3 @@
 
 	return *pos;
 }
-EXPORT_SYMBOL(dvb_usb_get_hexline);
-
--- linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/vp702x.h.old	2006-01-07 16:57:23.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/vp702x.h	2006-01-07 16:58:15.000000000 +0100
@@ -102,8 +102,6 @@
 extern struct dvb_frontend * vp702x_fe_attach(struct dvb_usb_device *d);
 
 extern int vp702x_usb_inout_op(struct dvb_usb_device *d, u8 *o, int olen, u8 *i, int ilen, int msec);
-extern int vp702x_usb_inout_cmd(struct dvb_usb_device *d, u8 cmd, u8 *o, int olen, u8 *i, int ilen, int msec);
 extern int vp702x_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen);
-extern int vp702x_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen);
 
 #endif
--- linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/vp702x.c.old	2006-01-07 16:57:37.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/vp702x.c	2006-01-07 16:58:27.000000000 +0100
@@ -53,7 +53,8 @@
 	return ret;
 }
 
-int vp702x_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen)
+static int vp702x_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value,
+			     u16 index, u8 *b, int blen)
 {
 	deb_xfer("out: req. %x, val: %x, ind: %x, buffer: ",req,value,index);
 	debug_dump(b,blen,deb_xfer);
@@ -88,7 +89,8 @@
 	return ret;
 }
 
-int vp702x_usb_inout_cmd(struct dvb_usb_device *d, u8 cmd, u8 *o, int olen, u8 *i, int ilen, int msec)
+static int vp702x_usb_inout_cmd(struct dvb_usb_device *d, u8 cmd, u8 *o,
+				int olen, u8 *i, int ilen, int msec)
 {
 	u8 bout[olen+2];
 	u8 bin[ilen+1];
--- linux-2.6.15-mm2-full/drivers/media/dvb/ttpci/av7110.h.old	2006-01-07 16:59:33.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/ttpci/av7110.h	2006-01-07 16:59:39.000000000 +0100
@@ -261,8 +261,6 @@
 extern int ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid,
 		       u16 subpid, u16 pcrpid);
 
-extern int av7110_setup_irc_config (struct av7110 *av7110, u32 ir_config);
-
 extern int av7110_ir_init(struct av7110 *av7110);
 extern void av7110_ir_exit(struct av7110 *av7110);
 
--- linux-2.6.15-mm2-full/drivers/media/dvb/ttpci/av7110_ir.c.old	2006-01-07 16:59:47.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/ttpci/av7110_ir.c	2006-01-07 17:00:21.000000000 +0100
@@ -155,6 +155,19 @@
 }
 
 
+static int av7110_setup_irc_config(struct av7110 *av7110, u32 ir_config)
+{
+	int ret = 0;
+
+	dprintk(4, "%p\n", av7110);
+	if (av7110) {
+		ret = av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, SetIR, 1, ir_config);
+		av7110->ir_config = ir_config;
+	}
+	return ret;
+}
+
+
 static int av7110_ir_write_proc(struct file *file, const char __user *buffer,
 				unsigned long count, void *data)
 {
@@ -187,19 +200,6 @@
 }
 
 
-int av7110_setup_irc_config(struct av7110 *av7110, u32 ir_config)
-{
-	int ret = 0;
-
-	dprintk(4, "%p\n", av7110);
-	if (av7110) {
-		ret = av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, SetIR, 1, ir_config);
-		av7110->ir_config = ir_config;
-	}
-	return ret;
-}
-
-
 static void ir_handler(struct av7110 *av7110, u32 ircom)
 {
 	dprintk(4, "ircommand = %08x\n", ircom);

--- linux-2.6.15-mm3-full/drivers/media/dvb/dvb-usb/dvb-usb.h.old	2006-01-14 01:04:34.000000000 +0100
+++ linux-2.6.15-mm3-full/drivers/media/dvb/dvb-usb/dvb-usb.h	2006-01-14 01:04:50.000000000 +0100
@@ -341,7 +341,6 @@
 	u8 data[255];
 	u8 chk;
 };
-extern int dvb_usb_get_hexline(const struct firmware *, struct hexline *, int *);
 extern int usb_cypress_load_firmware(struct usb_device *udev, const struct firmware *fw, int type);
 
 #endif
--- linux-2.6.15-mm3-full/drivers/media/dvb/dvb-usb/cxusb.c.old	2006-01-14 01:02:27.000000000 +0100
+++ linux-2.6.15-mm3-full/drivers/media/dvb/dvb-usb/cxusb.c	2006-01-14 01:03:28.000000000 +0100
@@ -184,7 +184,7 @@
 	return 0;
 }
 
-struct dvb_usb_rc_key dvico_mce_rc_keys[] = {
+static struct dvb_usb_rc_key dvico_mce_rc_keys[] = {
 	{ 0xfe, 0x02, KEY_TV },
 	{ 0xfe, 0x0e, KEY_MP3 },
 	{ 0xfe, 0x1a, KEY_DVD },
@@ -253,7 +253,7 @@
 	return 0;
 }
 
-struct cx22702_config cxusb_cx22702_config = {
+static struct cx22702_config cxusb_cx22702_config = {
 	.demod_address = 0x63,
 
 	.output_mode = CX22702_PARALLEL_OUTPUT,
@@ -262,13 +262,13 @@
 	.pll_set  = dvb_usb_pll_set_i2c,
 };
 
-struct lgdt330x_config cxusb_lgdt330x_config = {
+static struct lgdt330x_config cxusb_lgdt330x_config = {
 	.demod_address = 0x0e,
 	.demod_chip    = LGDT3303,
 	.pll_set       = dvb_usb_pll_set_i2c,
 };
 
-struct mt352_config cxusb_dee1601_config = {
+static struct mt352_config cxusb_dee1601_config = {
 	.demod_address = 0x0f,
 	.demod_init    = cxusb_dee1601_demod_init,
 	.pll_set       = dvb_usb_pll_set,


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFC: 2.6 patch] drivers/media/dvb/: possible cleanups
  2006-01-22 17:51   ` Patrick Boettcher
@ 2006-01-22 18:05     ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 8+ messages in thread
From: Mauro Carvalho Chehab @ 2006-01-22 18:05 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Patrick Boettcher, Michael Krufky, linux-dvb-maintainer,
	linux-kernel, johannes Stezenbach

Adrian,

	I'll commit on our -git.

Cheers,
Mauro

Em Dom, 2006-01-22 às 18:51 +0100, Patrick Boettcher escreveu:
> Hi,
> 
> On Sun, 22 Jan 2006, Michael Krufky wrote:
> > Patrick, please let us know where you stand on this.   Can we apply this now?
> 
> It is just about this:
> 
> >> drivers/media/dvb/dvb-usb/dvb-usb-firmware.c |    8 +++--
> >> drivers/media/dvb/dvb-usb/dvb-usb.h          |    1
> 
> >> -int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx, int 
> >> *pos)
> >> +static int dvb_usb_get_hexline(const struct firmware *fw, struct hexline 
> >> *hx,
> >> +			       int *pos)
> 
> >> -extern int dvb_usb_get_hexline(const struct firmware *, struct hexline *, 
> >> int *);
> 
> But I don't care much... Just another change I have to re-commit 
> afterwards. Just apply it.
> 
> regards,
> Patrick.
> 
> --
>    Mail: patrick.boettcher@desy.de
>    WWW:  http://www.wi-bw.tfh-wildau.de/~pboettch/
Cheers, 
Mauro.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFC: 2.6 patch] drivers/media/dvb/: possible cleanups
  2006-01-22 17:40 ` Michael Krufky
@ 2006-01-22 17:51   ` Patrick Boettcher
  2006-01-22 18:05     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 8+ messages in thread
From: Patrick Boettcher @ 2006-01-22 17:51 UTC (permalink / raw)
  To: Michael Krufky
  Cc: Adrian Bunk, Mauro Carvalho Chehab, linux-dvb-maintainer,
	linux-kernel, johannes Stezenbach

Hi,

On Sun, 22 Jan 2006, Michael Krufky wrote:
> Patrick, please let us know where you stand on this.   Can we apply this now?

It is just about this:

>> drivers/media/dvb/dvb-usb/dvb-usb-firmware.c |    8 +++--
>> drivers/media/dvb/dvb-usb/dvb-usb.h          |    1

>> -int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx, int 
>> *pos)
>> +static int dvb_usb_get_hexline(const struct firmware *fw, struct hexline 
>> *hx,
>> +			       int *pos)

>> -extern int dvb_usb_get_hexline(const struct firmware *, struct hexline *, 
>> int *);

But I don't care much... Just another change I have to re-commit 
afterwards. Just apply it.

regards,
Patrick.

--
   Mail: patrick.boettcher@desy.de
   WWW:  http://www.wi-bw.tfh-wildau.de/~pboettch/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFC: 2.6 patch] drivers/media/dvb/: possible cleanups
  2006-01-22 17:10 Adrian Bunk
@ 2006-01-22 17:40 ` Michael Krufky
  2006-01-22 17:51   ` Patrick Boettcher
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Krufky @ 2006-01-22 17:40 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Mauro Carvalho Chehab, linux-dvb-maintainer, linux-kernel,
	Patrick Boettcher, johannes Stezenbach

Adrian Bunk wrote:

>This patch contains the following possible cleanups:
>- make needlessly global code static
>- #if 0 the following unused global functions:
>  - b2c2/flexcop-dma.c: flexcop_dma_control_packet_irq()
>  - b2c2/flexcop-dma.c: flexcop_dma_config_packet_count()
>
>Please review which of these changes do make sense and which conflict 
>with pending patches.
>
>
>Signed-off-by: Adrian Bunk <bunk@stusta.de>
>  
>
Adrian-

I apologize for the delay in our response to this patch, and I thank you 
for holding it back from merging, as there were some conflicts with our 
previous patches, although I believe that those have been resolved by now.

I spoke to Patrick Boettcher briefly about this, and we agree that your 
patch can be applied, for the most part, but he explained to me that 
there is a conflict in your patch with some of the code that he is 
currently working on, but then he disappeared, without telling me where 
the problem was, specifically.

I havent been able to contact Patrick since then, but I've cc'd him on 
this email, and hopefully he can share his comments with us.

Patrick, please let us know where you stand on this.   Can we apply this 
now?

-Michael

>---
>
>This patch was already sent on:
>- 14 Jan 2006
>
> drivers/media/dvb/b2c2/flexcop-common.h      |    2 -
> drivers/media/dvb/b2c2/flexcop-dma.c         |    4 ++
> drivers/media/dvb/b2c2/flexcop-misc.c        |    6 ++--
> drivers/media/dvb/b2c2/flexcop-reg.h         |    4 --
> drivers/media/dvb/dvb-usb/cxusb.c            |    8 ++---
> drivers/media/dvb/dvb-usb/dvb-usb-firmware.c |    8 +++--
> drivers/media/dvb/dvb-usb/dvb-usb.h          |    1 
> drivers/media/dvb/dvb-usb/vp702x.c           |    6 ++--
> drivers/media/dvb/dvb-usb/vp702x.h           |    2 -
> drivers/media/dvb/ttpci/av7110.h             |    2 -
> drivers/media/dvb/ttpci/av7110_ir.c          |   26 +++++++++----------
> 11 files changed, 33 insertions(+), 36 deletions(-)
>
>--- linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-common.h.old	2006-01-07 16:49:18.000000000 +0100
>+++ linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-common.h	2006-01-07 16:49:28.000000000 +0100
>@@ -116,11 +116,9 @@
> 
> int flexcop_dma_control_timer_irq(struct flexcop_device *fc, flexcop_dma_index_t no, int onoff);
> int flexcop_dma_control_size_irq(struct flexcop_device *fc, flexcop_dma_index_t no, int onoff);
>-int flexcop_dma_control_packet_irq(struct flexcop_device *fc, flexcop_dma_index_t no, int onoff);
> int flexcop_dma_config(struct flexcop_device *fc, struct flexcop_dma *dma, flexcop_dma_index_t dma_idx);
> int flexcop_dma_xfer_control(struct flexcop_device *fc, flexcop_dma_index_t dma_idx, flexcop_dma_addr_index_t index, int onoff);
> int flexcop_dma_config_timer(struct flexcop_device *fc, flexcop_dma_index_t dma_idx, u8 cycles);
>-int flexcop_dma_config_packet_count(struct flexcop_device *fc, flexcop_dma_index_t dma_idx, u8 packets);
> 
> /* from flexcop-eeprom.c */
> /* the PCI part uses this call to get the MAC address, the USB part has its own */
>--- linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-dma.c.old	2006-01-07 16:49:37.000000000 +0100
>+++ linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-dma.c	2006-01-07 16:50:25.000000000 +0100
>@@ -169,6 +169,8 @@
> }
> EXPORT_SYMBOL(flexcop_dma_config_timer);
> 
>+#if 0
>+
> /* packet IRQ does not exist in FCII or FCIIb - according to data book and tests */
> int flexcop_dma_control_packet_irq(struct flexcop_device *fc,
> 		flexcop_dma_index_t no,
>@@ -204,3 +206,5 @@
> 	return 0;
> }
> EXPORT_SYMBOL(flexcop_dma_config_packet_count);
>+
>+#endif  /*  0  */
>--- linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-reg.h.old	2006-01-07 16:51:05.000000000 +0100
>+++ linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-reg.h	2006-01-07 16:51:38.000000000 +0100
>@@ -16,8 +16,6 @@
> 	FLEXCOP_III,
> } flexcop_revision_t;
> 
>-extern const char *flexcop_revision_names[];
>-
> typedef enum {
> 	FC_UNK = 0,
> 	FC_AIR_DVB,
>@@ -34,8 +32,6 @@
> 	FC_PCI,
> } flexcop_bus_t;
> 
>-extern const char *flexcop_device_names[];
>-
> /* FlexCop IBI Registers */
> #if defined(__LITTLE_ENDIAN)
> 	#include "flexcop_ibi_value_le.h"
>--- linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-misc.c.old	2006-01-07 16:48:00.000000000 +0100
>+++ linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-misc.c	2006-01-07 16:51:27.000000000 +0100
>@@ -36,14 +36,14 @@
> 	/* bus parts have to decide if hw pid filtering is used or not. */
> }
> 
>-const char *flexcop_revision_names[] = {
>+static const char *flexcop_revision_names[] = {
> 	"Unkown chip",
> 	"FlexCopII",
> 	"FlexCopIIb",
> 	"FlexCopIII",
> };
> 
>-const char *flexcop_device_names[] = {
>+static const char *flexcop_device_names[] = {
> 	"Unkown device",
> 	"Air2PC/AirStar 2 DVB-T",
> 	"Air2PC/AirStar 2 ATSC 1st generation",
>@@ -54,7 +54,7 @@
> 	"Air2PC/AirStar 2 ATSC 3rd generation (HD5000)",
> };
> 
>-const char *flexcop_bus_names[] = {
>+static const char *flexcop_bus_names[] = {
> 	"USB",
> 	"PCI",
> };
>--- linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c.old	2006-01-07 16:56:27.000000000 +0100
>+++ linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c	2006-01-07 16:57:06.000000000 +0100
>@@ -24,6 +24,9 @@
> 	{ .id = CYPRESS_FX2,     .name = "Cypress FX2",     .cpu_cs_register = 0xe600 },
> };
> 
>+static int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx,
>+			       int *pos);
>+
> /*
>  * load a firmware packet to the device
>  */
>@@ -111,7 +114,8 @@
> 	return ret;
> }
> 
>-int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx, int *pos)
>+static int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx,
>+			       int *pos)
> {
> 	u8 *b = (u8 *) &fw->data[*pos];
> 	int data_offs = 4;
>@@ -141,5 +145,3 @@
> 
> 	return *pos;
> }
>-EXPORT_SYMBOL(dvb_usb_get_hexline);
>-
>--- linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/vp702x.h.old	2006-01-07 16:57:23.000000000 +0100
>+++ linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/vp702x.h	2006-01-07 16:58:15.000000000 +0100
>@@ -102,8 +102,6 @@
> extern struct dvb_frontend * vp702x_fe_attach(struct dvb_usb_device *d);
> 
> extern int vp702x_usb_inout_op(struct dvb_usb_device *d, u8 *o, int olen, u8 *i, int ilen, int msec);
>-extern int vp702x_usb_inout_cmd(struct dvb_usb_device *d, u8 cmd, u8 *o, int olen, u8 *i, int ilen, int msec);
> extern int vp702x_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen);
>-extern int vp702x_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen);
> 
> #endif
>--- linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/vp702x.c.old	2006-01-07 16:57:37.000000000 +0100
>+++ linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/vp702x.c	2006-01-07 16:58:27.000000000 +0100
>@@ -53,7 +53,8 @@
> 	return ret;
> }
> 
>-int vp702x_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen)
>+static int vp702x_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value,
>+			     u16 index, u8 *b, int blen)
> {
> 	deb_xfer("out: req. %x, val: %x, ind: %x, buffer: ",req,value,index);
> 	debug_dump(b,blen,deb_xfer);
>@@ -88,7 +89,8 @@
> 	return ret;
> }
> 
>-int vp702x_usb_inout_cmd(struct dvb_usb_device *d, u8 cmd, u8 *o, int olen, u8 *i, int ilen, int msec)
>+static int vp702x_usb_inout_cmd(struct dvb_usb_device *d, u8 cmd, u8 *o,
>+				int olen, u8 *i, int ilen, int msec)
> {
> 	u8 bout[olen+2];
> 	u8 bin[ilen+1];
>--- linux-2.6.15-mm2-full/drivers/media/dvb/ttpci/av7110.h.old	2006-01-07 16:59:33.000000000 +0100
>+++ linux-2.6.15-mm2-full/drivers/media/dvb/ttpci/av7110.h	2006-01-07 16:59:39.000000000 +0100
>@@ -261,8 +261,6 @@
> extern int ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid,
> 		       u16 subpid, u16 pcrpid);
> 
>-extern int av7110_setup_irc_config (struct av7110 *av7110, u32 ir_config);
>-
> extern int av7110_ir_init(struct av7110 *av7110);
> extern void av7110_ir_exit(struct av7110 *av7110);
> 
>--- linux-2.6.15-mm2-full/drivers/media/dvb/ttpci/av7110_ir.c.old	2006-01-07 16:59:47.000000000 +0100
>+++ linux-2.6.15-mm2-full/drivers/media/dvb/ttpci/av7110_ir.c	2006-01-07 17:00:21.000000000 +0100
>@@ -155,6 +155,19 @@
> }
> 
> 
>+static int av7110_setup_irc_config(struct av7110 *av7110, u32 ir_config)
>+{
>+	int ret = 0;
>+
>+	dprintk(4, "%p\n", av7110);
>+	if (av7110) {
>+		ret = av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, SetIR, 1, ir_config);
>+		av7110->ir_config = ir_config;
>+	}
>+	return ret;
>+}
>+
>+
> static int av7110_ir_write_proc(struct file *file, const char __user *buffer,
> 				unsigned long count, void *data)
> {
>@@ -187,19 +200,6 @@
> }
> 
> 
>-int av7110_setup_irc_config(struct av7110 *av7110, u32 ir_config)
>-{
>-	int ret = 0;
>-
>-	dprintk(4, "%p\n", av7110);
>-	if (av7110) {
>-		ret = av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, SetIR, 1, ir_config);
>-		av7110->ir_config = ir_config;
>-	}
>-	return ret;
>-}
>-
>-
> static void ir_handler(struct av7110 *av7110, u32 ircom)
> {
> 	dprintk(4, "ircommand = %08x\n", ircom);
>
>--- linux-2.6.15-mm3-full/drivers/media/dvb/dvb-usb/dvb-usb.h.old	2006-01-14 01:04:34.000000000 +0100
>+++ linux-2.6.15-mm3-full/drivers/media/dvb/dvb-usb/dvb-usb.h	2006-01-14 01:04:50.000000000 +0100
>@@ -341,7 +341,6 @@
> 	u8 data[255];
> 	u8 chk;
> };
>-extern int dvb_usb_get_hexline(const struct firmware *, struct hexline *, int *);
> extern int usb_cypress_load_firmware(struct usb_device *udev, const struct firmware *fw, int type);
> 
> #endif
>--- linux-2.6.15-mm3-full/drivers/media/dvb/dvb-usb/cxusb.c.old	2006-01-14 01:02:27.000000000 +0100
>+++ linux-2.6.15-mm3-full/drivers/media/dvb/dvb-usb/cxusb.c	2006-01-14 01:03:28.000000000 +0100
>@@ -184,7 +184,7 @@
> 	return 0;
> }
> 
>-struct dvb_usb_rc_key dvico_mce_rc_keys[] = {
>+static struct dvb_usb_rc_key dvico_mce_rc_keys[] = {
> 	{ 0xfe, 0x02, KEY_TV },
> 	{ 0xfe, 0x0e, KEY_MP3 },
> 	{ 0xfe, 0x1a, KEY_DVD },
>@@ -253,7 +253,7 @@
> 	return 0;
> }
> 
>-struct cx22702_config cxusb_cx22702_config = {
>+static struct cx22702_config cxusb_cx22702_config = {
> 	.demod_address = 0x63,
> 
> 	.output_mode = CX22702_PARALLEL_OUTPUT,
>@@ -262,13 +262,13 @@
> 	.pll_set  = dvb_usb_pll_set_i2c,
> };
> 
>-struct lgdt330x_config cxusb_lgdt330x_config = {
>+static struct lgdt330x_config cxusb_lgdt330x_config = {
> 	.demod_address = 0x0e,
> 	.demod_chip    = LGDT3303,
> 	.pll_set       = dvb_usb_pll_set_i2c,
> };
> 
>-struct mt352_config cxusb_dee1601_config = {
>+static struct mt352_config cxusb_dee1601_config = {
> 	.demod_address = 0x0f,
> 	.demod_init    = cxusb_dee1601_demod_init,
> 	.pll_set       = dvb_usb_pll_set,
>
>  
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [RFC: 2.6 patch] drivers/media/dvb/: possible cleanups
@ 2006-01-22 17:10 Adrian Bunk
  2006-01-22 17:40 ` Michael Krufky
  0 siblings, 1 reply; 8+ messages in thread
From: Adrian Bunk @ 2006-01-22 17:10 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Michael Krufky, linux-dvb-maintainer, linux-kernel


This patch contains the following possible cleanups:
- make needlessly global code static
- #if 0 the following unused global functions:
  - b2c2/flexcop-dma.c: flexcop_dma_control_packet_irq()
  - b2c2/flexcop-dma.c: flexcop_dma_config_packet_count()

Please review which of these changes do make sense and which conflict 
with pending patches.


Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

This patch was already sent on:
- 14 Jan 2006

 drivers/media/dvb/b2c2/flexcop-common.h      |    2 -
 drivers/media/dvb/b2c2/flexcop-dma.c         |    4 ++
 drivers/media/dvb/b2c2/flexcop-misc.c        |    6 ++--
 drivers/media/dvb/b2c2/flexcop-reg.h         |    4 --
 drivers/media/dvb/dvb-usb/cxusb.c            |    8 ++---
 drivers/media/dvb/dvb-usb/dvb-usb-firmware.c |    8 +++--
 drivers/media/dvb/dvb-usb/dvb-usb.h          |    1 
 drivers/media/dvb/dvb-usb/vp702x.c           |    6 ++--
 drivers/media/dvb/dvb-usb/vp702x.h           |    2 -
 drivers/media/dvb/ttpci/av7110.h             |    2 -
 drivers/media/dvb/ttpci/av7110_ir.c          |   26 +++++++++----------
 11 files changed, 33 insertions(+), 36 deletions(-)

--- linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-common.h.old	2006-01-07 16:49:18.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-common.h	2006-01-07 16:49:28.000000000 +0100
@@ -116,11 +116,9 @@
 
 int flexcop_dma_control_timer_irq(struct flexcop_device *fc, flexcop_dma_index_t no, int onoff);
 int flexcop_dma_control_size_irq(struct flexcop_device *fc, flexcop_dma_index_t no, int onoff);
-int flexcop_dma_control_packet_irq(struct flexcop_device *fc, flexcop_dma_index_t no, int onoff);
 int flexcop_dma_config(struct flexcop_device *fc, struct flexcop_dma *dma, flexcop_dma_index_t dma_idx);
 int flexcop_dma_xfer_control(struct flexcop_device *fc, flexcop_dma_index_t dma_idx, flexcop_dma_addr_index_t index, int onoff);
 int flexcop_dma_config_timer(struct flexcop_device *fc, flexcop_dma_index_t dma_idx, u8 cycles);
-int flexcop_dma_config_packet_count(struct flexcop_device *fc, flexcop_dma_index_t dma_idx, u8 packets);
 
 /* from flexcop-eeprom.c */
 /* the PCI part uses this call to get the MAC address, the USB part has its own */
--- linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-dma.c.old	2006-01-07 16:49:37.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-dma.c	2006-01-07 16:50:25.000000000 +0100
@@ -169,6 +169,8 @@
 }
 EXPORT_SYMBOL(flexcop_dma_config_timer);
 
+#if 0
+
 /* packet IRQ does not exist in FCII or FCIIb - according to data book and tests */
 int flexcop_dma_control_packet_irq(struct flexcop_device *fc,
 		flexcop_dma_index_t no,
@@ -204,3 +206,5 @@
 	return 0;
 }
 EXPORT_SYMBOL(flexcop_dma_config_packet_count);
+
+#endif  /*  0  */
--- linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-reg.h.old	2006-01-07 16:51:05.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-reg.h	2006-01-07 16:51:38.000000000 +0100
@@ -16,8 +16,6 @@
 	FLEXCOP_III,
 } flexcop_revision_t;
 
-extern const char *flexcop_revision_names[];
-
 typedef enum {
 	FC_UNK = 0,
 	FC_AIR_DVB,
@@ -34,8 +32,6 @@
 	FC_PCI,
 } flexcop_bus_t;
 
-extern const char *flexcop_device_names[];
-
 /* FlexCop IBI Registers */
 #if defined(__LITTLE_ENDIAN)
 	#include "flexcop_ibi_value_le.h"
--- linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-misc.c.old	2006-01-07 16:48:00.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/b2c2/flexcop-misc.c	2006-01-07 16:51:27.000000000 +0100
@@ -36,14 +36,14 @@
 	/* bus parts have to decide if hw pid filtering is used or not. */
 }
 
-const char *flexcop_revision_names[] = {
+static const char *flexcop_revision_names[] = {
 	"Unkown chip",
 	"FlexCopII",
 	"FlexCopIIb",
 	"FlexCopIII",
 };
 
-const char *flexcop_device_names[] = {
+static const char *flexcop_device_names[] = {
 	"Unkown device",
 	"Air2PC/AirStar 2 DVB-T",
 	"Air2PC/AirStar 2 ATSC 1st generation",
@@ -54,7 +54,7 @@
 	"Air2PC/AirStar 2 ATSC 3rd generation (HD5000)",
 };
 
-const char *flexcop_bus_names[] = {
+static const char *flexcop_bus_names[] = {
 	"USB",
 	"PCI",
 };
--- linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c.old	2006-01-07 16:56:27.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c	2006-01-07 16:57:06.000000000 +0100
@@ -24,6 +24,9 @@
 	{ .id = CYPRESS_FX2,     .name = "Cypress FX2",     .cpu_cs_register = 0xe600 },
 };
 
+static int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx,
+			       int *pos);
+
 /*
  * load a firmware packet to the device
  */
@@ -111,7 +114,8 @@
 	return ret;
 }
 
-int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx, int *pos)
+static int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx,
+			       int *pos)
 {
 	u8 *b = (u8 *) &fw->data[*pos];
 	int data_offs = 4;
@@ -141,5 +145,3 @@
 
 	return *pos;
 }
-EXPORT_SYMBOL(dvb_usb_get_hexline);
-
--- linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/vp702x.h.old	2006-01-07 16:57:23.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/vp702x.h	2006-01-07 16:58:15.000000000 +0100
@@ -102,8 +102,6 @@
 extern struct dvb_frontend * vp702x_fe_attach(struct dvb_usb_device *d);
 
 extern int vp702x_usb_inout_op(struct dvb_usb_device *d, u8 *o, int olen, u8 *i, int ilen, int msec);
-extern int vp702x_usb_inout_cmd(struct dvb_usb_device *d, u8 cmd, u8 *o, int olen, u8 *i, int ilen, int msec);
 extern int vp702x_usb_in_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen);
-extern int vp702x_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen);
 
 #endif
--- linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/vp702x.c.old	2006-01-07 16:57:37.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/dvb-usb/vp702x.c	2006-01-07 16:58:27.000000000 +0100
@@ -53,7 +53,8 @@
 	return ret;
 }
 
-int vp702x_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value, u16 index, u8 *b, int blen)
+static int vp702x_usb_out_op(struct dvb_usb_device *d, u8 req, u16 value,
+			     u16 index, u8 *b, int blen)
 {
 	deb_xfer("out: req. %x, val: %x, ind: %x, buffer: ",req,value,index);
 	debug_dump(b,blen,deb_xfer);
@@ -88,7 +89,8 @@
 	return ret;
 }
 
-int vp702x_usb_inout_cmd(struct dvb_usb_device *d, u8 cmd, u8 *o, int olen, u8 *i, int ilen, int msec)
+static int vp702x_usb_inout_cmd(struct dvb_usb_device *d, u8 cmd, u8 *o,
+				int olen, u8 *i, int ilen, int msec)
 {
 	u8 bout[olen+2];
 	u8 bin[ilen+1];
--- linux-2.6.15-mm2-full/drivers/media/dvb/ttpci/av7110.h.old	2006-01-07 16:59:33.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/ttpci/av7110.h	2006-01-07 16:59:39.000000000 +0100
@@ -261,8 +261,6 @@
 extern int ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid,
 		       u16 subpid, u16 pcrpid);
 
-extern int av7110_setup_irc_config (struct av7110 *av7110, u32 ir_config);
-
 extern int av7110_ir_init(struct av7110 *av7110);
 extern void av7110_ir_exit(struct av7110 *av7110);
 
--- linux-2.6.15-mm2-full/drivers/media/dvb/ttpci/av7110_ir.c.old	2006-01-07 16:59:47.000000000 +0100
+++ linux-2.6.15-mm2-full/drivers/media/dvb/ttpci/av7110_ir.c	2006-01-07 17:00:21.000000000 +0100
@@ -155,6 +155,19 @@
 }
 
 
+static int av7110_setup_irc_config(struct av7110 *av7110, u32 ir_config)
+{
+	int ret = 0;
+
+	dprintk(4, "%p\n", av7110);
+	if (av7110) {
+		ret = av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, SetIR, 1, ir_config);
+		av7110->ir_config = ir_config;
+	}
+	return ret;
+}
+
+
 static int av7110_ir_write_proc(struct file *file, const char __user *buffer,
 				unsigned long count, void *data)
 {
@@ -187,19 +200,6 @@
 }
 
 
-int av7110_setup_irc_config(struct av7110 *av7110, u32 ir_config)
-{
-	int ret = 0;
-
-	dprintk(4, "%p\n", av7110);
-	if (av7110) {
-		ret = av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, SetIR, 1, ir_config);
-		av7110->ir_config = ir_config;
-	}
-	return ret;
-}
-
-
 static void ir_handler(struct av7110 *av7110, u32 ircom)
 {
 	dprintk(4, "ircommand = %08x\n", ircom);

--- linux-2.6.15-mm3-full/drivers/media/dvb/dvb-usb/dvb-usb.h.old	2006-01-14 01:04:34.000000000 +0100
+++ linux-2.6.15-mm3-full/drivers/media/dvb/dvb-usb/dvb-usb.h	2006-01-14 01:04:50.000000000 +0100
@@ -341,7 +341,6 @@
 	u8 data[255];
 	u8 chk;
 };
-extern int dvb_usb_get_hexline(const struct firmware *, struct hexline *, int *);
 extern int usb_cypress_load_firmware(struct usb_device *udev, const struct firmware *fw, int type);
 
 #endif
--- linux-2.6.15-mm3-full/drivers/media/dvb/dvb-usb/cxusb.c.old	2006-01-14 01:02:27.000000000 +0100
+++ linux-2.6.15-mm3-full/drivers/media/dvb/dvb-usb/cxusb.c	2006-01-14 01:03:28.000000000 +0100
@@ -184,7 +184,7 @@
 	return 0;
 }
 
-struct dvb_usb_rc_key dvico_mce_rc_keys[] = {
+static struct dvb_usb_rc_key dvico_mce_rc_keys[] = {
 	{ 0xfe, 0x02, KEY_TV },
 	{ 0xfe, 0x0e, KEY_MP3 },
 	{ 0xfe, 0x1a, KEY_DVD },
@@ -253,7 +253,7 @@
 	return 0;
 }
 
-struct cx22702_config cxusb_cx22702_config = {
+static struct cx22702_config cxusb_cx22702_config = {
 	.demod_address = 0x63,
 
 	.output_mode = CX22702_PARALLEL_OUTPUT,
@@ -262,13 +262,13 @@
 	.pll_set  = dvb_usb_pll_set_i2c,
 };
 
-struct lgdt330x_config cxusb_lgdt330x_config = {
+static struct lgdt330x_config cxusb_lgdt330x_config = {
 	.demod_address = 0x0e,
 	.demod_chip    = LGDT3303,
 	.pll_set       = dvb_usb_pll_set_i2c,
 };
 
-struct mt352_config cxusb_dee1601_config = {
+static struct mt352_config cxusb_dee1601_config = {
 	.demod_address = 0x0f,
 	.demod_init    = cxusb_dee1601_demod_init,
 	.pll_set       = dvb_usb_pll_set,


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-01-22 18:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-07 18:12 [RFC: 2.6 patch] drivers/media/dvb/: possible cleanups Adrian Bunk
2006-01-07 18:42 ` [linux-dvb-maintainer] " Michael Krufky
     [not found]   ` <1136848727.6782.75.camel@localhost>
2006-01-14  2:09     ` Adrian Bunk
2006-01-08  7:07 ` Manu Abraham
2006-01-22 17:10 Adrian Bunk
2006-01-22 17:40 ` Michael Krufky
2006-01-22 17:51   ` Patrick Boettcher
2006-01-22 18:05     ` 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;
as well as URLs for NNTP newsgroup(s).