The patch below ncludes the following cleanups for
drivers/video/cyber2000fb.c:
- remove five EXPORT_SYMBOL'ed but completely unused functions
- make some needlessly global code static
diffstat output:
drivers/video/cyber2000fb.c | 79 +-----------------------------------
drivers/video/cyber2000fb.h | 9 ----
2 files changed, 4 insertions(+), 84 deletions(-)
Signed-off-by: Adrian Bunk <[email protected]>
--- linux-2.6.10-rc2-mm2-full/drivers/video/cyber2000fb.h.old 2004-11-21 15:04:35.000000000 +0100
+++ linux-2.6.10-rc2-mm2-full/drivers/video/cyber2000fb.h 2004-11-21 15:04:59.000000000 +0100
@@ -497,12 +497,3 @@
struct fb_var_screeninfo;
-/*
- * Note! Writing to the Cyber20x0 registers from an interrupt
- * routine is definitely a bad idea atm.
- */
-int cyber2000fb_attach(struct cyberpro_info *info, int idx);
-void cyber2000fb_detach(int idx);
-void cyber2000fb_enable_extregs(struct cfb_info *cfb);
-void cyber2000fb_disable_extregs(struct cfb_info *cfb);
-void cyber2000fb_get_fb_var(struct cfb_info *cfb, struct fb_var_screeninfo *var);
--- linux-2.6.10-rc2-mm2-full/drivers/video/cyber2000fb.c.old 2004-11-21 15:05:10.000000000 +0100
+++ linux-2.6.10-rc2-mm2-full/drivers/video/cyber2000fb.c 2004-11-21 15:10:01.000000000 +0100
@@ -1075,79 +1075,6 @@
static struct cfb_info *int_cfb_info;
/*
- * Enable access to the extended registers
- */
-void cyber2000fb_enable_extregs(struct cfb_info *cfb)
-{
- cfb->func_use_count += 1;
-
- if (cfb->func_use_count == 1) {
- int old;
-
- old = cyber2000_grphr(EXT_FUNC_CTL, cfb);
- old |= EXT_FUNC_CTL_EXTREGENBL;
- cyber2000_grphw(EXT_FUNC_CTL, old, cfb);
- }
-}
-
-/*
- * Disable access to the extended registers
- */
-void cyber2000fb_disable_extregs(struct cfb_info *cfb)
-{
- if (cfb->func_use_count == 1) {
- int old;
-
- old = cyber2000_grphr(EXT_FUNC_CTL, cfb);
- old &= ~EXT_FUNC_CTL_EXTREGENBL;
- cyber2000_grphw(EXT_FUNC_CTL, old, cfb);
- }
-
- if (cfb->func_use_count == 0)
- printk(KERN_ERR "disable_extregs: count = 0\n");
- else
- cfb->func_use_count -= 1;
-}
-
-void cyber2000fb_get_fb_var(struct cfb_info *cfb, struct fb_var_screeninfo *var)
-{
- memcpy(var, &cfb->fb.var, sizeof(struct fb_var_screeninfo));
-}
-
-/*
- * Attach a capture/tv driver to the core CyberX0X0 driver.
- */
-int cyber2000fb_attach(struct cyberpro_info *info, int idx)
-{
- if (int_cfb_info != NULL) {
- info->dev = int_cfb_info->dev;
- info->regs = int_cfb_info->regs;
- info->fb = int_cfb_info->fb.screen_base;
- info->fb_size = int_cfb_info->fb.fix.smem_len;
- info->enable_extregs = cyber2000fb_enable_extregs;
- info->disable_extregs = cyber2000fb_disable_extregs;
- info->info = int_cfb_info;
-
- strlcpy(info->dev_name, int_cfb_info->fb.fix.id, sizeof(info->dev_name));
- }
-
- return int_cfb_info != NULL;
-}
-
-/*
- * Detach a capture/tv driver from the core CyberX0X0 driver.
- */
-void cyber2000fb_detach(int idx)
-{
-}
-
-EXPORT_SYMBOL(cyber2000fb_attach);
-EXPORT_SYMBOL(cyber2000fb_detach);
-EXPORT_SYMBOL(cyber2000fb_enable_extregs);
-EXPORT_SYMBOL(cyber2000fb_disable_extregs);
-EXPORT_SYMBOL(cyber2000fb_get_fb_var);
-
-/*
* These parameters give
* 640x480, hsync 31.5kHz, vsync 60Hz
*/
@@ -1306,7 +1233,8 @@
* Parse Cyber2000fb options. Usage:
* video=cyber2000:font:fontname
*/
-int
+#ifndef MODULE
+static int
cyber2000fb_setup(char *options)
{
char *opt;
@@ -1328,6 +1256,7 @@
}
return 0;
}
+#endif
/*
* The CyberPro chips can be placed on many different bus types.
@@ -1717,7 +1646,7 @@
*
* Tony: "module_init" is now required
*/
-int __init cyber2000fb_init(void)
+static int __init cyber2000fb_init(void)
{
int ret = -1, err;
On Sun, Nov 21, 2004 at 04:36:14PM +0100, Adrian Bunk wrote:
> The patch below ncludes the following cleanups for
> drivers/video/cyber2000fb.c:
> - remove five EXPORT_SYMBOL'ed but completely unused functions
> - make some needlessly global code static
These are used by the video capture code which isn't merged, but is
used by people. Rejected.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
On Sun, Nov 21, 2004 at 08:47:52PM +0000, Russell King wrote:
> On Sun, Nov 21, 2004 at 04:36:14PM +0100, Adrian Bunk wrote:
> > The patch below ncludes the following cleanups for
> > drivers/video/cyber2000fb.c:
> > - remove five EXPORT_SYMBOL'ed but completely unused functions
> > - make some needlessly global code static
>
> These are used by the video capture code which isn't merged, but is
> used by people. Rejected.
If people use the code it should get merged or Adrian has all reasons to
remove or #if 0 the code.
On Sun, Nov 21, 2004 at 08:56:13PM +0000, Christoph Hellwig wrote:
> On Sun, Nov 21, 2004 at 08:47:52PM +0000, Russell King wrote:
> > On Sun, Nov 21, 2004 at 04:36:14PM +0100, Adrian Bunk wrote:
> > > The patch below ncludes the following cleanups for
> > > drivers/video/cyber2000fb.c:
> > > - remove five EXPORT_SYMBOL'ed but completely unused functions
> > > - make some needlessly global code static
> >
> > These are used by the video capture code which isn't merged, but is
> > used by people. Rejected.
>
> If people use the code it should get merged or Adrian has all reasons to
> remove or #if 0 the code.
Sigh, if that's what you want to do and place extra burden on me,
that's fine. Don't expect me to co-operate with you next time you
want me to do something though, no matter how important you feel it
is. Works both ways.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
On Mon, Nov 22, 2004 at 12:04:13AM +0000, Russell King wrote:
> On Sun, Nov 21, 2004 at 08:56:13PM +0000, Christoph Hellwig wrote:
> > On Sun, Nov 21, 2004 at 08:47:52PM +0000, Russell King wrote:
> > > On Sun, Nov 21, 2004 at 04:36:14PM +0100, Adrian Bunk wrote:
> > > > The patch below ncludes the following cleanups for
> > > > drivers/video/cyber2000fb.c:
> > > > - remove five EXPORT_SYMBOL'ed but completely unused functions
> > > > - make some needlessly global code static
> > >
> > > These are used by the video capture code which isn't merged, but is
> > > used by people. Rejected.
> >
> > If people use the code it should get merged or Adrian has all reasons to
> > remove or #if 0 the code.
>
> Sigh, if that's what you want to do and place extra burden on me,
> that's fine. Don't expect me to co-operate with you next time you
> want me to do something though, no matter how important you feel it
> is. Works both ways.
Where is this video capture code, and why can't it be included in the
kernel?
cu
Adrian
BTW: It's not my intention to piss off maintainers.
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
On Mon, Nov 22, 2004 at 01:10:51AM +0100, Adrian Bunk wrote:
> Where is this video capture code, and why can't it be included in the
> kernel?
A version of it was in the Netwinder.Org CVS tree, but since the
machine which used to provide that domain has been impounded by
the provider (because of problems with a third party providing the
hosting for it), that source vanished.
That leaves me as the sole provider of the source code, and the
code has always been in the "experimental but useful" stage. The
capture code is something which doesn't meet my standards for
mainline kernel inclusion.
However, since the capture is part of the PCI VGA device, the VGA
driver needs to export some hooks so that the capture driver can
safely talk to the VGA chip. That is what these are for, and, since
they have to be part of the VGA driver itself, I see no reason why
I can't include them as part of the driver that _I_ maintain.
Of course, if it is preferred to put crap code into the kernel, then
that I shall do. That's contary to what I believe should be merged,
and I'm sure then Christoph will whinge about crap code being included.
So I suspect I can't win either way.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
On Mon, Nov 22, 2004 at 12:21:36AM +0000, Russell King wrote:
>...
> That leaves me as the sole provider of the source code, and the
> code has always been in the "experimental but useful" stage. The
> capture code is something which doesn't meet my standards for
> mainline kernel inclusion.
>...
This sounds reasonable.
Below is only the rest of my patch.
<-- snip -->
The patch below ncludes the following cleanups for
drivers/video/cyber2000fb.c:
- make some needlessly global code static
diffstat output:
drivers/video/cyber2000fb.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
Signed-off-by: Adrian Bunk <[email protected]>
--- linux-2.6.10-rc2-mm2-full/drivers/video/cyber2000fb.c.old 2004-11-21 15:05:10.000000000 +0100
+++ linux-2.6.10-rc2-mm2-full/drivers/video/cyber2000fb.c 2004-11-21 15:10:01.000000000 +0100
@@ -1306,7 +1233,8 @@
* Parse Cyber2000fb options. Usage:
* video=cyber2000:font:fontname
*/
-int
+#ifndef MODULE
+static int
cyber2000fb_setup(char *options)
{
char *opt;
@@ -1328,6 +1256,7 @@
}
return 0;
}
+#endif
/*
* The CyberPro chips can be placed on many different bus types.
@@ -1717,7 +1646,7 @@
*
* Tony: "module_init" is now required
*/
-int __init cyber2000fb_init(void)
+static int __init cyber2000fb_init(void)
{
int ret = -1, err;