From: Adrian Bunk <bunk@stusta.de>
To: Andrew Morton <akpm@linux-foundation.org>, mchehab@infradead.org
Cc: linux-kernel@vger.kernel.org, v4l-dvb-maintainer@linuxtv.org
Subject: [-mm patch] drivers/media/video/ivtv/: possible cleanups
Date: Mon, 5 Mar 2007 02:49:19 +0100 [thread overview]
Message-ID: <20070305014919.GV3441@stusta.de> (raw)
In-Reply-To: <20070302030026.5eef0c92.akpm@linux-foundation.org>
On Fri, Mar 02, 2007 at 03:00:26AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.20-mm2:
>...
> git-dvb.patch
>...
> git trees
>...
This patch contains the following possible cleanups:
- every file should #include the headers containing the prototypes for
it's global functions
- make the following needlessly global variables static:
- ivtv-driver.c: newi2c
- ivtv-streams.c: struct ivtv_stream_info[]
- make the following needlessly global functions static:
- ivtv-fileops.c: ivtv_stop_decoding()
- ivtv-i2c.c: ivtv_i2c_id_addr()
- #if 0 the following unused global functions:
- ivtv-i2c.c: ivtv_msp34xx()
- ivtv-udma.c: ivtv_udma_setup()
- ivtv-video.c: ivtv_encoder_enable()
- ivtv-driver.c: remove the unused EXPORT_SYMBOL's
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
drivers/media/video/ivtv/ivtv-driver.c | 16 +---------------
drivers/media/video/ivtv/ivtv-fileops.c | 2 +-
drivers/media/video/ivtv/ivtv-fileops.h | 1 -
drivers/media/video/ivtv/ivtv-i2c.c | 5 ++++-
drivers/media/video/ivtv/ivtv-i2c.h | 2 --
drivers/media/video/ivtv/ivtv-streams.c | 2 +-
drivers/media/video/ivtv/ivtv-udma.c | 2 ++
drivers/media/video/ivtv/ivtv-udma.h | 2 --
drivers/media/video/ivtv/ivtv-video.c | 2 ++
drivers/media/video/ivtv/ivtv-video.h | 1 -
drivers/media/video/ivtv/ivtv-yuv.c | 1 +
11 files changed, 12 insertions(+), 24 deletions(-)
--- linux-2.6.21-rc2-mm1/drivers/media/video/ivtv/ivtv-driver.c.old 2007-03-04 21:00:12.000000000 +0100
+++ linux-2.6.21-rc2-mm1/drivers/media/video/ivtv/ivtv-driver.c 2007-03-04 21:04:50.000000000 +0100
@@ -121,7 +121,7 @@
int ivtv_debug = 0;
-int newi2c = -1;
+static int newi2c = -1;
module_param_array(tuner, int, &tuner_c, 0644);
module_param_array(radio, bool, &radio_c, 0644);
@@ -1367,19 +1367,5 @@
pci_unregister_driver(&ivtv_pci_driver);
}
-EXPORT_SYMBOL(ivtv_set_irq_mask);
-EXPORT_SYMBOL(ivtv_cards_active);
-EXPORT_SYMBOL(ivtv_cards);
-EXPORT_SYMBOL(ivtv_api);
-EXPORT_SYMBOL(ivtv_vapi);
-EXPORT_SYMBOL(ivtv_vapi_result);
-EXPORT_SYMBOL(ivtv_clear_irq_mask);
-EXPORT_SYMBOL(ivtv_debug);
-EXPORT_SYMBOL(ivtv_reset_ir_gpio);
-EXPORT_SYMBOL(ivtv_udma_setup);
-EXPORT_SYMBOL(ivtv_udma_unmap);
-EXPORT_SYMBOL(ivtv_udma_alloc);
-EXPORT_SYMBOL(ivtv_udma_prepare);
-
module_init(module_start);
module_exit(module_cleanup);
--- linux-2.6.21-rc2-mm1/drivers/media/video/ivtv/ivtv-fileops.h.old 2007-03-04 21:00:35.000000000 +0100
+++ linux-2.6.21-rc2-mm1/drivers/media/video/ivtv/ivtv-fileops.h 2007-03-04 21:00:41.000000000 +0100
@@ -30,7 +30,6 @@
int ivtv_start_capture(struct ivtv_open_id *id);
void ivtv_stop_capture(struct ivtv_open_id *id, int gop_end);
int ivtv_start_decoding(struct ivtv_open_id *id, int speed);
-void ivtv_stop_decoding(struct ivtv_open_id *id, int flags, u64 pts);
void ivtv_mute(struct ivtv *itv);
void ivtv_unmute(struct ivtv *itv);
--- linux-2.6.21-rc2-mm1/drivers/media/video/ivtv/ivtv-fileops.c.old 2007-03-04 21:00:50.000000000 +0100
+++ linux-2.6.21-rc2-mm1/drivers/media/video/ivtv/ivtv-fileops.c 2007-03-04 21:01:01.000000000 +0100
@@ -730,7 +730,7 @@
ivtv_release_stream(s);
}
-void ivtv_stop_decoding(struct ivtv_open_id *id, int flags, u64 pts)
+static void ivtv_stop_decoding(struct ivtv_open_id *id, int flags, u64 pts)
{
struct ivtv *itv = id->itv;
struct ivtv_stream *s = &itv->streams[id->type];
--- linux-2.6.21-rc2-mm1/drivers/media/video/ivtv/ivtv-i2c.h.old 2007-03-04 21:01:31.000000000 +0100
+++ linux-2.6.21-rc2-mm1/drivers/media/video/ivtv/ivtv-i2c.h 2007-03-04 21:02:07.000000000 +0100
@@ -22,11 +22,9 @@
int ivtv_saa7115(struct ivtv *itv, unsigned int cmd, void *arg);
int ivtv_saa7127(struct ivtv *itv, unsigned int cmd, void *arg);
int ivtv_saa717x(struct ivtv *itv, unsigned int cmd, void *arg);
-int ivtv_msp34xx(struct ivtv *itv, unsigned int cmd, void *arg);
int ivtv_upd64031a(struct ivtv *itv, unsigned int cmd, void *arg);
int ivtv_upd64083(struct ivtv *itv, unsigned int cmd, void *arg);
-int ivtv_i2c_id_addr(struct ivtv *itv, u32 id);
int ivtv_i2c_hw_addr(struct ivtv *itv, u32 hw);
int ivtv_i2c_hw(struct ivtv *itv, u32 hw, unsigned int cmd, void *arg);
int ivtv_i2c_id(struct ivtv *itv, u32 id, unsigned int cmd, void *arg);
--- linux-2.6.21-rc2-mm1/drivers/media/video/ivtv/ivtv-i2c.c.old 2007-03-04 21:01:43.000000000 +0100
+++ linux-2.6.21-rc2-mm1/drivers/media/video/ivtv/ivtv-i2c.c 2007-03-04 21:27:22.000000000 +0100
@@ -62,6 +62,7 @@
#include "ivtv-driver.h"
#include "ivtv-cards.h"
#include "ivtv-gpio.h"
+#include "ivtv-i2c.h"
#include <media/ir-kbd-i2c.h>
@@ -574,7 +575,7 @@
/* Find the i2c device based on the driver ID and return
its i2c address or -ENODEV if no matching device was found. */
-int ivtv_i2c_id_addr(struct ivtv *itv, u32 id)
+static int ivtv_i2c_id_addr(struct ivtv *itv, u32 id)
{
struct i2c_client *client;
int retval = -ENODEV;
@@ -681,10 +682,12 @@
return ivtv_call_i2c_client(itv, IVTV_SAA717x_I2C_ADDR, cmd, arg);
}
+#if 0
int ivtv_msp34xx(struct ivtv *itv, unsigned int cmd, void *arg)
{
return ivtv_call_i2c_client(itv, IVTV_MSP3400_I2C_ADDR, cmd, arg);
}
+#endif /* 0 */
int ivtv_upd64031a(struct ivtv *itv, unsigned int cmd, void *arg)
{
--- linux-2.6.21-rc2-mm1/drivers/media/video/ivtv/ivtv-streams.c.old 2007-03-04 21:02:36.000000000 +0100
+++ linux-2.6.21-rc2-mm1/drivers/media/video/ivtv/ivtv-streams.c 2007-03-04 21:02:44.000000000 +0100
@@ -66,7 +66,7 @@
.poll = ivtv_v4l2_dec_poll,
};
-struct {
+static struct {
const char *name;
int vfl_type;
int minor_offset;
--- linux-2.6.21-rc2-mm1/drivers/media/video/ivtv/ivtv-udma.h.old 2007-03-04 21:03:09.000000000 +0100
+++ linux-2.6.21-rc2-mm1/drivers/media/video/ivtv/ivtv-udma.h 2007-03-04 21:03:16.000000000 +0100
@@ -22,8 +22,6 @@
void ivtv_udma_get_page_info(struct ivtv_dma_page_info *dma_page, unsigned long first, unsigned long size);
int ivtv_udma_fill_sg_list(struct ivtv_user_dma *dma, struct ivtv_dma_page_info *dma_page, int map_offset);
void ivtv_udma_fill_sg_array(struct ivtv_user_dma *dma, u32 buffer_offset, u32 buffer_offset_2, u32 split);
-int ivtv_udma_setup(struct ivtv *itv, unsigned long ivtv_dest_addr,
- void __user *userbuf, int size_in_bytes);
void ivtv_udma_unmap(struct ivtv *itv);
void ivtv_udma_free(struct ivtv *itv);
void ivtv_udma_alloc(struct ivtv *itv);
--- linux-2.6.21-rc2-mm1/drivers/media/video/ivtv/ivtv-udma.c.old 2007-03-04 21:05:07.000000000 +0100
+++ linux-2.6.21-rc2-mm1/drivers/media/video/ivtv/ivtv-udma.c 2007-03-04 21:05:30.000000000 +0100
@@ -84,6 +84,7 @@
}
}
+#if 0
int ivtv_udma_setup(struct ivtv *itv, unsigned long ivtv_dest_addr,
void __user *userbuf, int size_in_bytes)
{
@@ -137,6 +138,7 @@
ivtv_udma_sync_for_device(itv);
return dma->page_count;
}
+#endif /* 0 */
void ivtv_udma_unmap(struct ivtv *itv)
{
--- linux-2.6.21-rc2-mm1/drivers/media/video/ivtv/ivtv-video.h.old 2007-03-04 21:06:31.000000000 +0100
+++ linux-2.6.21-rc2-mm1/drivers/media/video/ivtv/ivtv-video.h 2007-03-04 21:06:38.000000000 +0100
@@ -21,5 +21,4 @@
void ivtv_set_cc(struct ivtv *itv, int mode, u8 cc1, u8 cc2, u8 cc3, u8 cc4);
void ivtv_set_vps(struct ivtv *itv, int enabled, u8 vps1, u8 vps2, u8 vps3,
u8 vps4, u8 vps5);
-void ivtv_encoder_enable(struct ivtv *itv, int enabled);
void ivtv_video_set_io(struct ivtv *itv);
--- linux-2.6.21-rc2-mm1/drivers/media/video/ivtv/ivtv-video.c.old 2007-03-04 21:06:46.000000000 +0100
+++ linux-2.6.21-rc2-mm1/drivers/media/video/ivtv/ivtv-video.c 2007-03-04 21:06:59.000000000 +0100
@@ -85,6 +85,7 @@
ivtv_saa7127(itv, VIDIOC_INT_S_VBI_DATA, &data);
}
+#if 0
void ivtv_encoder_enable(struct ivtv *itv, int enabled)
{
if (itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT) {
@@ -92,6 +93,7 @@
&enabled);
}
}
+#endif /* 0 */
void ivtv_video_set_io(struct ivtv *itv)
{
--- linux-2.6.21-rc2-mm1/drivers/media/video/ivtv/ivtv-yuv.c.old 2007-03-04 21:28:12.000000000 +0100
+++ linux-2.6.21-rc2-mm1/drivers/media/video/ivtv/ivtv-yuv.c 2007-03-04 21:28:25.000000000 +0100
@@ -22,6 +22,7 @@
#include "ivtv-queue.h"
#include "ivtv-udma.h"
#include "ivtv-irq.h"
+#include "ivtv-yuv.h"
static int ivtv_yuv_prep_user_dma(struct ivtv *itv, struct ivtv_user_dma *dma,
struct ivtv_dma_frame *args)
next prev parent reply other threads:[~2007-03-05 1:49 UTC|newest]
Thread overview: 129+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-02 11:00 2.6.21-rc2-mm1 Andrew Morton
2007-03-02 11:04 ` 2.6.21-rc2-mm1 Andrew Morton
2007-03-02 17:30 ` 2.6.21-rc2-mm1 Randy Dunlap
2007-03-04 11:58 ` [Re: 2.6.21-rc2-mm1] #error no ROMFS backing store interface configured Maciej Rutecki
2007-03-04 12:11 ` Andrew Morton
2007-03-04 15:11 ` Maciej Rutecki
2007-03-04 15:11 ` David Howells
2007-03-04 15:25 ` Adrian Bunk
2007-03-04 15:35 ` David Howells
2007-03-05 1:49 ` [-mm patch] fix the ROMFS_* dependencies Adrian Bunk
2007-03-05 13:36 ` David Howells
2007-03-06 23:43 ` Adrian Bunk
2007-03-02 11:04 ` 2.6.21-rc2-mm1 Russell King
2007-03-02 11:08 ` 2.6.21-rc2-mm1 Andrew Morton
2007-03-02 11:10 ` 2.6.21-rc2-mm1 Russell King
2007-03-02 11:15 ` 2.6.21-rc2-mm1 Andrew Morton
2007-03-03 18:03 ` 2.6.21-rc2-mm1 Russell King
2007-03-05 10:41 ` arm utrace Roland McGrath
2007-03-02 14:05 ` 2.6.21-rc2-mm1: EIP is at ext2_discard_reservation+0x1c/0x52 Alexey Dobriyan
2007-03-02 14:24 ` 2.6.21-rc2-mm1 Bryan Wu
2007-03-02 14:40 ` [-mm patch] cpu_idle: fix build break Frederik Deweerdt
2007-03-02 15:24 ` Venkatesh Pallipadi
2007-03-02 16:24 ` Frederik Deweerdt
2007-03-02 15:42 ` 2.6.21-rc2-mm1 - build error with HOTPLUG_CPU=N, CPU_IDLE=Y Valdis.Kletnieks
2007-03-02 15:56 ` 2.6.21-rc2-mm1 Michal Piotrowski
2007-03-05 10:14 ` 2.6.21-rc2-mm1 Andrew Morton
2007-03-05 10:30 ` 2.6.21-rc2-mm1 Antonino A. Daplas
2007-03-02 16:03 ` 2.6.21-rc2-mm1 - fb_ddc_read() not defined Valdis.Kletnieks
2007-03-02 16:31 ` James Simmons
2007-03-02 16:51 ` Valdis.Kletnieks
2007-03-02 16:19 ` [PATCH] longhaul pci_find_device -> pci_get_device conversion (was: Re: 2.6.21-rc2-mm1) Michal Piotrowski
[not found] ` <3888a5cd0703020945r4ca51f3dxe981050b817e7594@mail.gmail.com>
2007-03-02 18:10 ` Michal Piotrowski
2007-03-02 16:32 ` 2.6.21-rc2-mm1 Badari Pulavarty
2007-03-02 17:03 ` [patch -mm] x86_64: fake numa cmdline flag fix David Rientjes
2007-03-02 17:21 ` Badari Pulavarty
2007-03-02 17:10 ` 2.6.21-rc2-mm1 Andrew Morton
2007-03-02 17:15 ` 2.6.21-rc2-mm1 Badari Pulavarty
2007-03-02 21:12 ` 2.6.21-rc2-mm1: what about CONFIG_NO_HZ and !CONFIG_SMP ? Laurent Riffard
2007-03-02 20:57 ` Siddha, Suresh B
2007-03-02 22:09 ` Laurent Riffard
2007-03-02 22:52 ` 2.6.21-rc2-mm1: pata_via: wrong cable detection Laurent Riffard
2007-03-02 23:05 ` [PATCH -mm] char/epca.c remove unused function (was: Re: 2.6.21-rc2-mm1) Michal Piotrowski
2007-03-03 0:48 ` Alan Cox
2007-03-02 23:42 ` 2.6.21-rc2-mm1 Michal Piotrowski
2007-03-03 0:40 ` 2.6.21-rc2-mm1 Andrew Morton
2007-03-03 1:22 ` 2.6.21-rc2-mm1 Michal Piotrowski
2007-03-03 1:41 ` 2.6.21-rc2-mm1 Andrew Morton
2007-03-03 10:08 ` 2.6.21-rc2-mm1 Michal Piotrowski
2007-03-03 12:06 ` 2.6.21-rc2-mm1 Andrew Morton
2007-03-03 7:45 ` 2.6.21-rc2-mm1 - build error with CONFIG_NO_HZ=y and CONFIG_SMP=n Antonino A. Daplas
2007-03-03 7:59 ` Andrew Morton
2007-03-03 15:39 ` Keyboard stops working after *lock [Was: 2.6.21-rc2-mm1] Jiri Slaby
2007-03-03 15:54 ` Jiri Slaby
2007-03-03 17:41 ` Andrew Morton
2007-03-09 10:31 ` Jiri Slaby
2007-03-09 14:13 ` Dmitry Torokhov
2007-03-09 14:40 ` Jiri Kosina
2007-03-09 16:01 ` Jiri Kosina
2007-03-09 16:48 ` Jiri Slaby
2007-03-09 17:10 ` Jiri Slaby
2007-03-11 21:39 ` Jiri Slaby
2007-03-11 21:47 ` Jiri Kosina
2007-03-11 21:53 ` Jiri Slaby
2007-03-11 22:11 ` Jiri Slaby
2007-03-12 9:08 ` Jiri Slaby
2007-03-12 15:09 ` Alan Stern
2007-03-12 16:28 ` Jiri Slaby
2007-03-12 19:56 ` Alan Stern
2007-03-12 21:00 ` Jiri Kosina
2007-03-12 22:32 ` Jiri Slaby
2007-03-13 16:01 ` Alan Stern
2007-03-13 16:13 ` Jiri Slaby
2007-03-13 16:30 ` Alan Stern
2007-03-15 20:00 ` Alan Stern
2007-03-16 10:52 ` Jiri Slaby
2007-03-17 22:50 ` Jiri Slaby
2007-03-18 2:39 ` Alan Stern
2007-03-18 8:46 ` Jiri Slaby
2007-03-18 14:26 ` Alan Stern
2007-03-18 14:36 ` Jiri Slaby
2007-03-18 15:39 ` Alan Stern
2007-03-18 15:45 ` Jiri Slaby
2007-03-18 16:11 ` Alan Stern
2007-03-04 9:07 ` 2.6.21-rc2-mm1 Mariusz Kozlowski
2007-03-04 9:48 ` 2.6.21-rc2-mm1 Mariusz Kozlowski
2007-03-04 11:34 ` 2.6.21-rc2-mm1 Andrew Morton
2007-03-04 12:01 ` 2.6.21-rc2-mm1 Mariusz Kozlowski
2007-03-04 17:06 ` 2.6.21-rc2-mm1 Mariusz Kozlowski
2007-03-04 17:13 ` 2.6.21-rc2-mm1 Michal Piotrowski
2007-03-04 17:20 ` 2.6.21-rc2-mm1 Michal Piotrowski
2007-03-05 16:34 ` 2.6.21-rc2-mm1 Zan Lynx
2007-03-05 0:11 ` 2.6.21-rc2-mm1 J.A. Magallón
2007-03-05 0:29 ` 2.6.21-rc2-mm1 Andrew Morton
2007-03-05 1:17 ` 2.6.21-rc2-mm1 Andrew Morton
2007-03-05 2:25 ` 2.6.21-rc2-mm1 Neil Brown
2007-03-05 15:42 ` 2.6.21-rc2-mm1 Bill Davidsen
2007-03-05 1:47 ` [-mm patch] saa7134: fix MODULES=n compilation Adrian Bunk
2007-03-05 1:47 ` 2.6.21-rc2-mm1: drivers/net/wireless/ compile error Adrian Bunk
2007-03-05 10:41 ` Michael Buesch
2007-03-05 1:47 ` 2.6.21-rc2-mm1: drivers/usb/host/ohci-ssb.c doesn't compile Adrian Bunk
2007-03-05 10:49 ` Michael Buesch
2007-03-05 10:57 ` Michael Buesch
2007-03-05 11:26 ` Michael Buesch
2007-03-05 18:26 ` Greg KH
2007-03-05 18:37 ` Adrian Bunk
2007-03-05 18:42 ` David Brownell
2007-03-05 19:09 ` Michael Buesch
2007-03-05 1:47 ` [-mm patch] arch/i386/kernel/vmi.c must #include <asm/kmap_types.h> Adrian Bunk
2007-03-05 2:57 ` Zachary Amsden
2007-03-05 1:47 ` [-mm patch] remove arch/i386/kernel/tsc.c:custom_sched_clock Adrian Bunk
2007-03-05 2:57 ` Zachary Amsden
2007-03-05 1:47 ` [-mm patch] make drivers/char/drm/drm_vm.c:drm_io_prot() static Adrian Bunk
2007-03-05 1:47 ` [-mm patch] drivers/cpuidle/: make code static Adrian Bunk
2007-03-05 1:49 ` Adrian Bunk [this message]
2007-03-05 6:53 ` [v4l-dvb-maintainer] [-mm patch] drivers/media/video/ivtv/: possible cleanups Hans Verkuil
2007-03-05 1:49 ` [-mm patch] drivers/net/bonding/bond_main.c:make 3 functions static Adrian Bunk
2007-03-05 1:49 ` [-mm patch] make drivers/video/display/display-sysfs.c:display_class static Adrian Bunk
2007-03-05 1:49 ` [-mm patch] make fb_deferred_io_mkwrite() static Adrian Bunk
2007-03-05 1:49 ` [-mm patch] drivers/video/hecubafb.c: make 4 functions static Adrian Bunk
2007-03-05 22:20 ` 2.6.21-rc2-mm1 J.A. Magallón
2007-03-05 23:11 ` 2.6.21-rc2-mm1 Andrew Morton
2007-03-06 6:25 ` [PATCH] sched: fix idle at tick Con Kolivas
[not found] ` <20070305230240.9c2741d1.akpm@linux-foundation.org>
2007-03-06 7:41 ` Con Kolivas
2007-03-06 8:38 ` J.A. Magallón
2007-03-06 0:16 ` i2c vs nVidia [Re: 2.6.21-rc2-mm1] J.A. Magallón
2007-03-06 0:33 ` Andrew Morton
2007-03-06 0:44 ` Greg KH
2007-03-06 8:45 ` Jean Delvare
2007-03-06 10:56 ` Jean Delvare
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=20070305014919.GV3441@stusta.de \
--to=bunk@stusta.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@infradead.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;
as well as URLs for NNTP newsgroup(s).