drivers/video/: possible cleanups
Subsystems (2)
PATCH 1/1 drivers/video/: possible cleanups
This patch contains the possible cleanups including the following:
- every file should #include the headers containing the prototypes for it's global functions
- make needlessly global functions static
- kyro/STG4000Interface.h: #include video/kyro.h and linux/pci.h instead of a manual "struct pci_dev"
- i810_main.{c,h}: prototypes for static functions belong to the C file
---
drivers/video/arcfb.c | 8 +-- drivers/video/console/softcursor.c | 2 drivers/video/i810/i810-i2c.c | 1 drivers/video/i810/i810_accel.c | 1 drivers/video/i810/i810_gtf.c | 1 drivers/video/i810/i810_main.c | 51 ++++++++++++++++++-- drivers/video/i810/i810_main.h | 56 +--------------------- drivers/video/kyro/STG4000InitDevice.c | 1 drivers/video/kyro/STG4000Interface.h | 3 - drivers/video/kyro/STG4000OverlayDevice.c | 1 drivers/video/matrox/matroxfb_g450.c | 2 drivers/video/nvidia/nv_hw.c | 1 drivers/video/tdfxfb.c | 2 13 files changed, 68 insertions(+), 62 deletions(-)
drivers/video/console/softcursor.c renamed from drivers/video/console/softcursor.c.old +2 -0
@@ -17,6 +17,8 @@#include <asm/uaccess.h> #include <asm/io.h> +#include "fbcon.h" +int soft_cursor (struct fb_info *info,struct fb_cursor *cursor) {unsigned int scan_align = info->pixmap.scan_align -1 ;
drivers/video/kyro/STG4000Interface.h renamed from drivers/video/kyro/STG4000Interface.h.old +2 -1
@@ -11,7 +11,8 @@#ifndef _STG4000INTERFACE_H#define _STG4000INTERFACE_H -struct pci_dev ; +#include <linux/pci.h> +#include <video/kyro.h> /* * Ramdac Setup
drivers/video/kyro/STG4000OverlayDevice.c renamed from drivers/video/kyro/STG4000OverlayDevice.c.old +1 -0
@@ -14,6 +14,7 @@#include <linux/types.h> #include "STG4000Reg.h" +#include "STG4000Interface.h" /* HW Defines */
drivers/video/kyro/STG4000InitDevice.c renamed from drivers/video/kyro/STG4000InitDevice.c.old +1 -0
@@ -15,6 +15,7 @@#include <linux/pci.h> #include "STG4000Reg.h" +#include "STG4000Interface.h" /* SDRAM fixed settings */ #define SDRAM_CFG_0 0x49A1
drivers/video/matrox/matroxfb_g450.c renamed from drivers/video/matrox/matroxfb_g450.c.old +2 -0
@@ -20,6 +20,8 @@#include <asm/uaccess.h> #include <asm/div64.h> +#include "matroxfb_g450.h" +/* Definition of the various controls */ struct mctl {struct v4l2_queryctrl desc;
drivers/video/nvidia/nv_hw.c renamed from drivers/video/nvidia/nv_hw.c.old +1 -0
@@ -52,6 +52,7 @@#include <linux/pci.h> #include "nv_type.h" #include "nv_local.h" +#include "nv_proto.h" void NVLockUnlock (struct nvidia_par *par,int Lock) {
drivers/video/arcfb.c renamed from drivers/video/arcfb.c.old +5 -3
@@ -365,7 +365,8 @@ } } -void arcfb_fillrect (struct fb_info *info,const struct fb_fillrect *rect) +static void arcfb_fillrect (struct fb_info *info, +const struct fb_fillrect *rect) {struct arcfb_par *par = info->par;
@@ -375,7 +376,8 @@arcfb_lcd_update (par, rect->dx, rect->dy, rect->width, rect->height); } -void arcfb_copyarea (struct fb_info *info,const struct fb_copyarea *area) +static void arcfb_copyarea (struct fb_info *info, +const struct fb_copyarea *area) {struct arcfb_par *par = info->par;
@@ -385,7 +387,7 @@arcfb_lcd_update (par, area->dx, area->dy, area->width, area->height); } -void arcfb_imageblit (struct fb_info *info,const struct fb_image *image) +static void arcfb_imageblit (struct fb_info *info,const struct fb_image *image) {struct arcfb_par *par = info->par;
drivers/video/tdfxfb.c renamed from drivers/video/tdfxfb.c.old +1 -1
@@ -1307,7 +1307,7 @@ }#ifndef MODULE -void tdfxfb_setup (char *options) +static void tdfxfb_setup (char *options) {char * this_opt;
drivers/video/i810/i810_main.h renamed from drivers/video/i810/i810_main.h.old +4 -52
80 lines not on this page · raw message
drivers/video/i810/i810_main.c renamed from drivers/video/i810/i810_main.c.old +46 -5
63 lines not on this page · raw message
drivers/video/i810/i810_accel.c renamed from drivers/video/i810/i810_accel.c.old +1 -0
@@ -14,6 +14,7 @@#include "i810_regs.h" #include "i810.h" +#include "i810_main.h" static u32 i810fb_rop[] = {COLOR_COPY_ROP ,/* ROP_COPY */
drivers/video/i810/i810_gtf.c renamed from drivers/video/i810/i810_gtf.c.old +1 -0
@@ -14,6 +14,7 @@#include "i810_regs.h" #include "i810.h" +#include "i810_main.h" /* * FIFO and Watermark tables - based almost wholly on i810_wmark.c in
drivers/video/i810/i810-i2c.c renamed from drivers/video/i810/i810-i2c.c.old +1 -0
@@ -17,6 +17,7 @@#include <linux/fb.h> #include "i810.h" #include "i810_regs.h" +#include "i810_main.h" #include "../edid.h" #define I810_DDC 0x50
Quoted 32 lines · Adrian Bunk
This patch contains the possible cleanups including the following:
- every file should #include the headers containing the prototypes for it's global functions
- make needlessly global functions static
-kyro/STG4000Interface.h: #includevideo/kyro.handlinux/pci.hinstead of a manual "structpci_dev"
- i810_main.{c,h}: prototypes for static functions belong to the C fileSigned-off-by Adrian Bunk <[email protected]>---
drivers/video/arcfb.c | 8 +-- drivers/video/console/softcursor.c | 2 drivers/video/i810/i810-i2c.c | 1 drivers/video/i810/i810_accel.c | 1 drivers/video/i810/i810_gtf.c | 1 drivers/video/i810/i810_main.c | 51 ++++++++++++++++++-- drivers/video/i810/i810_main.h | 56 +--------------------- drivers/video/kyro/STG4000InitDevice.c | 1 drivers/video/kyro/STG4000Interface.h | 3 - drivers/video/kyro/STG4000OverlayDevice.c | 1 drivers/video/matrox/matroxfb_g450.c | 2 drivers/video/nvidia/nv_hw.c | 1 drivers/video/tdfxfb.c | 2 13 files changed, 68 insertions(+), 62 deletions(-)
drivers/video/console/softcursor.c line 20
Quoted 4 lines
drivers/video/console/softcursor.c renamed from drivers/video/console/softcursor.c.old +1
-0@@ -17,6 +17,8 @@#include <asm/uaccess.h> #include <asm/io.h> +#include "fbcon.h"
I don't think softcursor needs anything in fbcon.h. The rest looks okay.
Tony
Quoted 36 lines · Antonino A. Daplas
Quoted 35 lines · Adrian Bunk
This patch contains the possible cleanups including the following:
- every file should #include the headers containing the prototypes for it's global functions
- make needlessly global functions static
-kyro/STG4000Interface.h: #includevideo/kyro.handlinux/pci.hinstead of a manual "structpci_dev"
- i810_main.{c,h}: prototypes for static functions belong to the C fileSigned-off-by Adrian Bunk <[email protected]>---
drivers/video/arcfb.c | 8 +-- drivers/video/console/softcursor.c | 2 drivers/video/i810/i810-i2c.c | 1 drivers/video/i810/i810_accel.c | 1 drivers/video/i810/i810_gtf.c | 1 drivers/video/i810/i810_main.c | 51 ++++++++++++++++++-- drivers/video/i810/i810_main.h | 56 +--------------------- drivers/video/kyro/STG4000InitDevice.c | 1 drivers/video/kyro/STG4000Interface.h | 3 - drivers/video/kyro/STG4000OverlayDevice.c | 1 drivers/video/matrox/matroxfb_g450.c | 2 drivers/video/nvidia/nv_hw.c | 1 drivers/video/tdfxfb.c | 2 13 files changed, 68 insertions(+), 62 deletions(-)drivers/video/console/softcursor.c renamed from drivers/video/console/softcursor.c.old +0
-0@@ -17,6 +17,8 @@#include <asm/uaccess.h> #include <asm/io.h>
Quoted 3 lines
drivers/video/console/softcursor.c line 20
Quoted 1 line
drivers/video/console/softcursor.c renamed from drivers/video/console/softcursor.c.old +1
-0+#include "fbcon.h" I don't think softcursor needs anything in
fbcon.h. The rest looks okay.
fbcon.h contains the function prototype for soft_cursor().
Quoted 1 line
Tony
cu
Adrian
Signature · 4 lines
"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 SeedQuoted 9 lines · Adrian Bunk
Quoted 8 lines · Antonino A. Daplas
Quoted 7 lines · Adrian Bunk
drivers/video/console/softcursor.c renamed from drivers/video/console/softcursor.c.old +0
-0@@ -17,6 +17,8 @@#include <asm/uaccess.h> #include <asm/io.h>
Quoted 4 lines
Quoted 2 lines
drivers/video/console/softcursor.c line 20
Quoted 1 line
drivers/video/console/softcursor.c renamed from drivers/video/console/softcursor.c.old +1
-0+#include "fbcon.h" I don't think softcursor needs anything in
fbcon.h. The rest looks okay.
fbcon.hcontains the function prototype forsoft_cursor().
Ahh, you're right. I forgot that I moved it to the console directory.
Tony