All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Stezenbach <js@linuxtv.org>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, Adrian Bunk <bunk@stusta.de>
Subject: [DVB patch 24/37] make needlessly global code static or drop it
Date: Sun, 08 May 2005 20:42:53 +0200	[thread overview]
Message-ID: <20050508184348.329919000@abc> (raw)
In-Reply-To: 20050508184229.957247000@abc

[-- Attachment #1: dvb-cleanup-make-static-drop-ununsed.patch --]
[-- Type: text/plain, Size: 8582 bytes --]

- make needlessly global code static
- #if 0 the following unused global functions:
  - ttpci/av7110_hw.c: av7110_reset_arm
  - ttpci/av7110_hw.c: av7110_send_ci_cmd
- frontends/mt352.[ch]: drop mt352_read

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
---

 drivers/media/dvb/frontends/mt352.c               |   12 ------------
 drivers/media/dvb/frontends/mt352.h               |    1 -
 drivers/media/dvb/ttpci/av7110.h                  |    1 -
 drivers/media/dvb/ttpci/av7110_hw.c               |   12 +++++++-----
 drivers/media/dvb/ttpci/av7110_hw.h               |    5 -----
 drivers/media/dvb/ttpci/av7110_v4l.c              |    2 +-
 drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c |    2 +-
 drivers/media/dvb/ttusb-dec/ttusb_dec.c           |    8 ++++----
 8 files changed, 13 insertions(+), 30 deletions(-)

Index: linux-2.6.12-rc4/drivers/media/dvb/frontends/mt352.c
===================================================================
--- linux-2.6.12-rc4.orig/drivers/media/dvb/frontends/mt352.c	2005-05-08 16:26:30.000000000 +0200
+++ linux-2.6.12-rc4/drivers/media/dvb/frontends/mt352.c	2005-05-08 16:32:39.000000000 +0200
@@ -102,11 +102,6 @@ static int mt352_read_register(struct mt
 	return b1[0];
 }
 
-int mt352_read(struct dvb_frontend *fe, u8 reg)
-{
-	return mt352_read_register(fe->demodulator_priv,reg);
-}
-
 static int mt352_sleep(struct dvb_frontend* fe)
 {
 	static u8 mt352_softdown[] = { CLOCK_CTL, 0x20, 0x08 };
@@ -601,10 +596,3 @@ MODULE_LICENSE("GPL");
 
 EXPORT_SYMBOL(mt352_attach);
 EXPORT_SYMBOL(mt352_write);
-EXPORT_SYMBOL(mt352_read);
-/*
- * Local variables:
- * c-basic-offset: 8
- * compile-command: "make DVB=1"
- * End:
- */
Index: linux-2.6.12-rc4/drivers/media/dvb/frontends/mt352.h
===================================================================
--- linux-2.6.12-rc4.orig/drivers/media/dvb/frontends/mt352.h	2005-05-08 15:55:37.000000000 +0200
+++ linux-2.6.12-rc4/drivers/media/dvb/frontends/mt352.h	2005-05-08 16:32:39.000000000 +0200
@@ -61,7 +61,6 @@ extern struct dvb_frontend* mt352_attach
 					 struct i2c_adapter* i2c);
 
 extern int mt352_write(struct dvb_frontend* fe, u8* ibuf, int ilen);
-extern int mt352_read(struct dvb_frontend *fe, u8 reg);
 
 #endif // MT352_H
 
Index: linux-2.6.12-rc4/drivers/media/dvb/ttpci/av7110.h
===================================================================
--- linux-2.6.12-rc4.orig/drivers/media/dvb/ttpci/av7110.h	2005-05-08 15:55:37.000000000 +0200
+++ linux-2.6.12-rc4/drivers/media/dvb/ttpci/av7110.h	2005-05-08 16:32:39.000000000 +0200
@@ -274,7 +274,6 @@ extern void av7110_ir_exit (void);
 extern int i2c_writereg(struct av7110 *av7110, u8 id, u8 reg, u8 val);
 extern u8 i2c_readreg(struct av7110 *av7110, u8 id, u8 reg);
 extern int msp_writereg(struct av7110 *av7110, u8 dev, u16 reg, u16 val);
-extern int msp_readreg(struct av7110 *av7110, u8 dev, u16 reg, u16 *val);
 
 
 extern int av7110_init_analog_module(struct av7110 *av7110);
Index: linux-2.6.12-rc4/drivers/media/dvb/ttpci/av7110_hw.c
===================================================================
--- linux-2.6.12-rc4.orig/drivers/media/dvb/ttpci/av7110_hw.c	2005-05-08 15:55:37.000000000 +0200
+++ linux-2.6.12-rc4/drivers/media/dvb/ttpci/av7110_hw.c	2005-05-08 16:32:39.000000000 +0200
@@ -104,7 +104,7 @@ u32 av7110_debiread(struct av7110 *av711
 
 
 /* av7110 ARM core boot stuff */
-
+#if 0
 void av7110_reset_arm(struct av7110 *av7110)
 {
 	saa7146_setgpio(av7110->dev, RESET_LINE, SAA7146_GPIO_OUTLO);
@@ -124,7 +124,7 @@ void av7110_reset_arm(struct av7110 *av7
 	av7110->arm_ready = 1;
 	dprintk(1, "reset ARM\n");
 }
-
+#endif  /*  0  */
 
 static int waitdebi(struct av7110 *av7110, int adr, int state)
 {
@@ -335,7 +335,7 @@ int av7110_wait_msgstate(struct av7110 *
 	return 0;
 }
 
-int __av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length)
+static int __av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length)
 {
 	int i;
 	unsigned long start;
@@ -455,7 +455,7 @@ int __av7110_send_fw_cmd(struct av7110 *
 	return 0;
 }
 
-int av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length)
+static int av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length)
 {
 	int ret;
 
@@ -500,6 +500,7 @@ int av7110_fw_cmd(struct av7110 *av7110,
 	return ret;
 }
 
+#if 0
 int av7110_send_ci_cmd(struct av7110 *av7110, u8 subcom, u8 *buf, u8 len)
 {
 	int i, ret;
@@ -521,6 +522,7 @@ int av7110_send_ci_cmd(struct av7110 *av
 		printk(KERN_ERR "dvb-ttpci: av7110_send_ci_cmd error %d\n", ret);
 	return ret;
 }
+#endif  /*  0  */
 
 int av7110_fw_request(struct av7110 *av7110, u16 *request_buf,
 		      int request_buf_len, u16 *reply_buf, int reply_buf_len)
@@ -593,7 +595,7 @@ int av7110_fw_request(struct av7110 *av7
 	return 0;
 }
 
-int av7110_fw_query(struct av7110 *av7110, u16 tag, u16* buf, s16 length)
+static int av7110_fw_query(struct av7110 *av7110, u16 tag, u16* buf, s16 length)
 {
 	int ret;
 	ret = av7110_fw_request(av7110, &tag, 0, buf, length);
Index: linux-2.6.12-rc4/drivers/media/dvb/ttpci/av7110_hw.h
===================================================================
--- linux-2.6.12-rc4.orig/drivers/media/dvb/ttpci/av7110_hw.h	2005-05-08 15:55:37.000000000 +0200
+++ linux-2.6.12-rc4/drivers/media/dvb/ttpci/av7110_hw.h	2005-05-08 16:32:39.000000000 +0200
@@ -364,7 +364,6 @@ enum av7110_command_type {
 
 
 
-extern void av7110_reset_arm(struct av7110 *av7110);
 extern int av7110_bootarm(struct av7110 *av7110);
 extern int av7110_firmversion(struct av7110 *av7110);
 #define FW_CI_LL_SUPPORT(arm_app) ((arm_app) & 0x80000000)
@@ -373,12 +372,8 @@ extern int av7110_firmversion(struct av7
 
 extern int av7110_wait_msgstate(struct av7110 *av7110, u16 flags);
 extern int av7110_fw_cmd(struct av7110 *av7110, int type, int com, int num, ...);
-extern int __av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length);
-extern int av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length);
-extern int av7110_send_ci_cmd(struct av7110 *av7110, u8 subcom, u8 *buf, u8 len);
 extern int av7110_fw_request(struct av7110 *av7110, u16 *request_buf,
 			     int request_buf_len, u16 *reply_buf, int reply_buf_len);
-extern int av7110_fw_query(struct av7110 *av7110, u16 tag, u16* Buff, s16 length);
 
 
 /* DEBI (saa7146 data extension bus interface) access */
Index: linux-2.6.12-rc4/drivers/media/dvb/ttpci/av7110_v4l.c
===================================================================
--- linux-2.6.12-rc4.orig/drivers/media/dvb/ttpci/av7110_v4l.c	2005-05-08 16:14:09.000000000 +0200
+++ linux-2.6.12-rc4/drivers/media/dvb/ttpci/av7110_v4l.c	2005-05-08 16:32:39.000000000 +0200
@@ -52,7 +52,7 @@ int msp_writereg(struct av7110 *av7110, 
 	return 0;
 }
 
-int msp_readreg(struct av7110 *av7110, u8 dev, u16 reg, u16 *val)
+static int msp_readreg(struct av7110 *av7110, u8 dev, u16 reg, u16 *val)
 {
 	u8 msg1[3] = { dev, reg >> 8, reg & 0xff };
 	u8 msg2[2];
Index: linux-2.6.12-rc4/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
===================================================================
--- linux-2.6.12-rc4.orig/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c	2005-05-08 15:55:37.000000000 +0200
+++ linux-2.6.12-rc4/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c	2005-05-08 16:32:39.000000000 +0200
@@ -1065,7 +1065,7 @@ static int alps_tdmb7_pll_set(struct dvb
 	return 0;
 }
 
-struct cx22700_config alps_tdmb7_config = {
+static struct cx22700_config alps_tdmb7_config = {
 	.demod_address = 0x43,
 	.pll_set = alps_tdmb7_pll_set,
 };
Index: linux-2.6.12-rc4/drivers/media/dvb/ttusb-dec/ttusb_dec.c
===================================================================
--- linux-2.6.12-rc4.orig/drivers/media/dvb/ttusb-dec/ttusb_dec.c	2005-05-08 15:55:37.000000000 +0200
+++ linux-2.6.12-rc4/drivers/media/dvb/ttusb-dec/ttusb_dec.c	2005-05-08 16:32:39.000000000 +0200
@@ -1565,15 +1565,15 @@ static void ttusb_dec_exit_filters(struc
 	}
 }
 
-int fe_send_command(struct dvb_frontend* fe, const u8 command,
-		    int param_length, const u8 params[],
-		    int *result_length, u8 cmd_result[])
+static int fe_send_command(struct dvb_frontend* fe, const u8 command,
+			   int param_length, const u8 params[],
+			   int *result_length, u8 cmd_result[])
 {
 	struct ttusb_dec* dec = (struct ttusb_dec*) fe->dvb->priv;
 	return ttusb_dec_send_command(dec, command, param_length, params, result_length, cmd_result);
 }
 
-struct ttusbdecfe_config fe_config = {
+static struct ttusbdecfe_config fe_config = {
 	.send_command = fe_send_command
 };
 

--


  parent reply	other threads:[~2005-05-08 19:59 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-08 18:42 [DVB patch 00/37] DVB updates for 2.6.12-rc4 Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 01/37] support for TT/Hauppauge Nexus-S Rev 2.3 Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 02/37] saa7146: no need to initialize static/global variables to 0 Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 03/37] dvb_frontend: fix module param Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 04/37] av7110: audio out fix Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 05/37] add support for KNC-1 cards Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 06/37] remove unnecessary casts in dvb-core Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 07/37] make dvb_class static Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 08/37] dvb_net: handle IPv6 and LLC/SNAP Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 09/37] av7110: fix VIDEO_SET_DISPLAY_FORMAT Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 10/37] av7110: fix NTSC/PAL switching Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 11/37] av7110: fix comment Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 12/37] av7110: fix indentation Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 13/37] nxt6000: support frontend status reads Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 14/37] tda1004x: formatting cleanups Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 15/37] stv0299: fix FE_DISHNETWORK_SEND_LEGACY_CMD Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 16/37] remove unnecessary casts in frontends Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 17/37] dib3000: add NULL pointer check Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 18/37] ves1820: remove unnecessary msleep Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 19/37] mt352: embed struct mt352_config in mt352_state Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 20/37] tda1004x: dont use bitfields Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 21/37] tda1004x: allow N_I2C to be overridden by the card driver Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 22/37] tda10046: support for different firmware versions Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 23/37] dvb-pll.h: prevent multiple inclusion Johannes Stezenbach
2005-05-08 18:42 ` Johannes Stezenbach [this message]
2005-05-08 18:42 ` [DVB patch 25/37] frontends: misc. minor cleanups Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 26/37] modified dvb_register_adapter() to avoid kmalloc/kfree Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 27/37] bt8xx: update documentation Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 28/37] DST: reorganize Twinhan DST driver to support CI Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 29/37] DST: add support for Twinhan 200103A Johannes Stezenbach
2005-05-08 18:42 ` [DVB patch 30/37] DST: fixed tuning problem Johannes Stezenbach
2005-05-08 18:43 ` [DVB patch 31/37] DST: fix for descrambling failure Johannes Stezenbach
2005-05-08 18:43 ` [DVB patch 32/37] DST: misc. fixes Johannes Stezenbach
2005-05-08 18:43 ` [DVB patch 33/37] bt8xx: updated documentation Johannes Stezenbach
2005-05-08 18:43 ` [DVB patch 34/37] DST: fix a bug in the module parameter Johannes Stezenbach
2005-05-08 18:43 ` [DVB patch 35/37] DST: fixed CI debug output Johannes Stezenbach
2005-05-08 18:43 ` [DVB patch 36/37] bt8xx: whitespace cleanup Johannes Stezenbach
2005-05-08 18:43 ` [DVB patch 37/37] budget-av: CI fixes Johannes Stezenbach
2005-05-10  1:04 ` [DVB patch 00/37] DVB updates for 2.6.12-rc4 Andrew Morton
2005-05-10  8:52   ` Johannes Stezenbach
2005-05-10  9:16     ` Andrew Morton

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=20050508184348.329919000@abc \
    --to=js@linuxtv.org \
    --cc=akpm@osdl.org \
    --cc=bunk@stusta.de \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.