All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: rmk@arm.linux.org.uk
Cc: Antonino Daplas <adaplas@pol.net>,
	linux-kernel@vger.kernel.org,
	linux-fbdev-devel@lists.sourceforge.net
Subject: [2.6 patch] cyber2000fb.c: misc cleanups
Date: Sun, 21 Nov 2004 16:36:14 +0100	[thread overview]
Message-ID: <20041121153614.GR2829@stusta.de> (raw)

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 <bunk@stusta.de>

--- 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;
 

             reply	other threads:[~2004-11-21 15:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-21 15:36 Adrian Bunk [this message]
2004-11-21 20:47 ` [2.6 patch] cyber2000fb.c: misc cleanups Russell King
2004-11-21 20:56   ` Christoph Hellwig
2004-11-22  0:04     ` Russell King
2004-11-22  0:10       ` Adrian Bunk
2004-11-22  0:21         ` Russell King
2004-11-22  1:05           ` Adrian Bunk

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=20041121153614.GR2829@stusta.de \
    --to=bunk@stusta.de \
    --cc=adaplas@pol.net \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    /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.