From: Adrian Bunk <bunk@stusta.de>
To: Andrew Morton <akpm@osdl.org>
Cc: jgarzik@pobox.com, Antonino Daplas <adaplas@pol.net>,
linux-kernel@vger.kernel.org,
linux-fbdev-devel@lists.sourceforge.net
Subject: [2.6 patch] cirrusfb.c: make some code static
Date: Sun, 23 Jan 2005 11:16:09 +0100 [thread overview]
Message-ID: <20050123101609.GC3212@stusta.de> (raw)
This patch makes some nedlessly global code static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
drivers/video/cirrusfb.c | 70 ++++++++++++++++++++-------------------
1 files changed, 36 insertions(+), 34 deletions(-)
This patch was already sent on:
- 21 Nov 2004
--- linux-2.6.10-rc2-mm2-full/drivers/video/cirrusfb.c.old 2004-11-21 03:07:59.000000000 +0100
+++ linux-2.6.10-rc2-mm2-full/drivers/video/cirrusfb.c 2004-11-21 03:13:04.000000000 +0100
@@ -515,23 +515,25 @@
/*--- Interface used by the world ------------------------------------------*/
-int cirrusfb_init (void);
-int cirrusfb_setup (char *options);
+static int cirrusfb_init (void);
+#ifndef MODULE
+static int cirrusfb_setup (char *options);
+#endif
-int cirrusfb_open (struct fb_info *info, int user);
-int cirrusfb_release (struct fb_info *info, int user);
-int cirrusfb_setcolreg (unsigned regno, unsigned red, unsigned green,
- unsigned blue, unsigned transp,
- struct fb_info *info);
-int cirrusfb_check_var (struct fb_var_screeninfo *var,
- struct fb_info *info);
-int cirrusfb_set_par (struct fb_info *info);
-int cirrusfb_pan_display (struct fb_var_screeninfo *var,
- struct fb_info *info);
-int cirrusfb_blank (int blank_mode, struct fb_info *info);
-void cirrusfb_fillrect (struct fb_info *info, const struct fb_fillrect *region);
-void cirrusfb_copyarea(struct fb_info *info, const struct fb_copyarea *area);
-void cirrusfb_imageblit(struct fb_info *info, const struct fb_image *image);
+static int cirrusfb_open (struct fb_info *info, int user);
+static int cirrusfb_release (struct fb_info *info, int user);
+static int cirrusfb_setcolreg (unsigned regno, unsigned red, unsigned green,
+ unsigned blue, unsigned transp,
+ struct fb_info *info);
+static int cirrusfb_check_var (struct fb_var_screeninfo *var,
+ struct fb_info *info);
+static int cirrusfb_set_par (struct fb_info *info);
+static int cirrusfb_pan_display (struct fb_var_screeninfo *var,
+ struct fb_info *info);
+static int cirrusfb_blank (int blank_mode, struct fb_info *info);
+static void cirrusfb_fillrect (struct fb_info *info, const struct fb_fillrect *region);
+static void cirrusfb_copyarea(struct fb_info *info, const struct fb_copyarea *area);
+static void cirrusfb_imageblit(struct fb_info *info, const struct fb_image *image);
/* function table of the above functions */
static struct fb_ops cirrusfb_ops = {
@@ -600,7 +602,7 @@
static int opencount = 0;
/*--- Open /dev/fbx ---------------------------------------------------------*/
-int cirrusfb_open (struct fb_info *info, int user)
+static int cirrusfb_open (struct fb_info *info, int user)
{
if (opencount++ == 0)
switch_monitor (info->par, 1);
@@ -608,7 +610,7 @@
}
/*--- Close /dev/fbx --------------------------------------------------------*/
-int cirrusfb_release (struct fb_info *info, int user)
+static int cirrusfb_release (struct fb_info *info, int user)
{
if (--opencount == 0)
switch_monitor (info->par, 0);
@@ -660,8 +662,8 @@
return mclk;
}
-int cirrusfb_check_var(struct fb_var_screeninfo *var,
- struct fb_info *info)
+static int cirrusfb_check_var(struct fb_var_screeninfo *var,
+ struct fb_info *info)
{
struct cirrusfb_info *cinfo = info->par;
int nom, den; /* translyting from pixels->bytes */
@@ -1573,15 +1575,15 @@
/* for some reason incomprehensible to me, cirrusfb requires that you write
* the registers twice for the settings to take..grr. -dte */
-int cirrusfb_set_par (struct fb_info *info)
+static int cirrusfb_set_par (struct fb_info *info)
{
cirrusfb_set_par_foo (info);
return cirrusfb_set_par_foo (info);
}
-int cirrusfb_setcolreg (unsigned regno, unsigned red, unsigned green,
- unsigned blue, unsigned transp,
- struct fb_info *info)
+static int cirrusfb_setcolreg (unsigned regno, unsigned red, unsigned green,
+ unsigned blue, unsigned transp,
+ struct fb_info *info)
{
struct cirrusfb_info *cinfo = info->par;
@@ -1632,8 +1634,8 @@
performs display panning - provided hardware permits this
**************************************************************************/
-int cirrusfb_pan_display (struct fb_var_screeninfo *var,
- struct fb_info *info)
+static int cirrusfb_pan_display (struct fb_var_screeninfo *var,
+ struct fb_info *info)
{
int xoffset = 0;
int yoffset = 0;
@@ -1702,7 +1704,7 @@
}
-int cirrusfb_blank (int blank_mode, struct fb_info *info)
+static int cirrusfb_blank (int blank_mode, struct fb_info *info)
{
/*
* Blank the screen if blank_mode != 0, else unblank. If blank == NULL
@@ -2036,7 +2038,7 @@
return;
}
-void cirrusfb_fillrect (struct fb_info *info, const struct fb_fillrect *region)
+static void cirrusfb_fillrect (struct fb_info *info, const struct fb_fillrect *region)
{
struct cirrusfb_info *cinfo = info->par;
struct fb_fillrect modded;
@@ -2086,7 +2088,7 @@
}
-void cirrusfb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
+static void cirrusfb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
{
struct cirrusfb_info *cinfo = info->par;
struct fb_copyarea modded;
@@ -2121,7 +2123,7 @@
cirrusfb_prim_copyarea(cinfo, &modded);
}
-void cirrusfb_imageblit(struct fb_info *info, const struct fb_image *image)
+static void cirrusfb_imageblit(struct fb_info *info, const struct fb_image *image)
{
struct cirrusfb_info *cinfo = info->par;
@@ -2459,7 +2461,7 @@
return ret;
}
-void __devexit cirrusfb_pci_unregister (struct pci_dev *pdev)
+static void __devexit cirrusfb_pci_unregister (struct pci_dev *pdev)
{
struct fb_info *info = pci_get_drvdata(pdev);
DPRINTK ("ENTER\n");
@@ -2605,7 +2607,7 @@
};
#endif /* CONFIG_ZORRO */
-int __init cirrusfb_init(void)
+static int __init cirrusfb_init(void)
{
int error = 0;
@@ -2629,7 +2631,7 @@
#ifndef MODULE
-int __init cirrusfb_setup(char *options) {
+static int __init cirrusfb_setup(char *options) {
char *this_opt, s[32];
int i;
@@ -2664,7 +2666,7 @@
MODULE_DESCRIPTION("Accelerated FBDev driver for Cirrus Logic chips");
MODULE_LICENSE("GPL");
-void __exit cirrusfb_exit (void)
+static void __exit cirrusfb_exit (void)
{
#ifdef CONFIG_PCI
pci_unregister_driver(&cirrusfb_pci_driver);
next reply other threads:[~2005-01-23 10:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-23 10:16 Adrian Bunk [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-11-21 15:36 [2.6 patch] cirrusfb.c: make some code static 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=20050123101609.GC3212@stusta.de \
--to=bunk@stusta.de \
--cc=adaplas@pol.net \
--cc=akpm@osdl.org \
--cc=jgarzik@pobox.com \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--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 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).