2005-03-20 19:31:43

by Adrian Bunk

[permalink] [raw]
Subject: [-mm patch] kill include/video/edid.h

This patch removes some completely unused code.

Signed-off-by: Adrian Bunk <[email protected]>

---

arch/i386/boot/compressed/misc.c | 1 -
arch/i386/kernel/setup.c | 4 ----
arch/x86_64/kernel/setup.c | 3 ---
drivers/video/fbmon.c | 1 -
drivers/video/vesafb.c | 3 ---
include/asm-i386/setup.h | 1 -
include/asm-x86_64/bootsetup.h | 1 -
include/video/edid.h | 27 ---------------------------
8 files changed, 41 deletions(-)

--- linux-2.6.11-mm4-full/arch/i386/kernel/setup.c.old 2005-03-20 20:06:06.000000000 +0100
+++ linux-2.6.11-mm4-full/arch/i386/kernel/setup.c 2005-03-20 20:06:45.000000000 +0100
@@ -43,8 +43,6 @@
#include <linux/nodemask.h>
#include <linux/kexec.h>

-#include <video/edid.h>
-
#include <asm/apic.h>
#include <asm/e820.h>
#include <asm/mpspec.h>
@@ -118,7 +116,6 @@
unsigned short length;
unsigned char table[0];
};
-struct edid_info edid_info;
struct ist_info ist_info;
struct e820map e820;

@@ -1468,7 +1465,6 @@
ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
drive_info = DRIVE_INFO;
screen_info = SCREEN_INFO;
- edid_info = EDID_INFO;
apm_info.bios = APM_BIOS_INFO;
ist_info = IST_INFO;
saved_videomode = VIDEO_MODE;
--- linux-2.6.11-mm4-full/arch/x86_64/kernel/setup.c.old 2005-03-20 20:04:42.000000000 +0100
+++ linux-2.6.11-mm4-full/arch/x86_64/kernel/setup.c 2005-03-20 20:07:11.000000000 +0100
@@ -48,7 +48,6 @@
#include <asm/smp.h>
#include <asm/msr.h>
#include <asm/desc.h>
-#include <video/edid.h>
#include <asm/e820.h>
#include <asm/dma.h>
#include <asm/mpspec.h>
@@ -100,7 +99,6 @@
unsigned char table[0];
};

-struct edid_info edid_info;
struct e820map e820;

extern int root_mountflags;
@@ -523,7 +521,6 @@
ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
drive_info = DRIVE_INFO;
screen_info = SCREEN_INFO;
- edid_info = EDID_INFO;
saved_video_mode = SAVED_VIDEO_MODE;
bootloader_type = LOADER_TYPE;

--- linux-2.6.11-mm4-full/drivers/video/fbmon.c.old 2005-03-20 20:03:56.000000000 +0100
+++ linux-2.6.11-mm4-full/drivers/video/fbmon.c 2005-03-20 20:04:27.000000000 +0100
@@ -34,7 +34,6 @@
#include <asm/prom.h>
#include <asm/pci-bridge.h>
#endif
-#include <video/edid.h>
#include "edid.h"

/*
--- linux-2.6.11-mm4-full/drivers/video/vesafb.c.old 2005-03-20 20:04:12.000000000 +0100
+++ linux-2.6.11-mm4-full/drivers/video/vesafb.c 2005-03-20 20:04:18.000000000 +0100
@@ -19,9 +19,6 @@
#include <linux/fb.h>
#include <linux/ioport.h>
#include <linux/init.h>
-#ifdef __i386__
-#include <video/edid.h>
-#endif
#include <asm/io.h>
#include <asm/mtrr.h>

--- linux-2.6.11-mm4-full/arch/i386/boot/compressed/misc.c.old 2005-03-20 20:05:55.000000000 +0100
+++ linux-2.6.11-mm4-full/arch/i386/boot/compressed/misc.c 2005-03-20 20:05:58.000000000 +0100
@@ -12,7 +12,6 @@
#include <linux/linkage.h>
#include <linux/vmalloc.h>
#include <linux/tty.h>
-#include <video/edid.h>
#include <asm/io.h>
#include <asm/page.h>

--- linux-2.6.11-mm4-full/include/asm-x86_64/bootsetup.h.old 2005-03-20 20:07:33.000000000 +0100
+++ linux-2.6.11-mm4-full/include/asm-x86_64/bootsetup.h 2005-03-20 20:07:44.000000000 +0100
@@ -25,7 +25,6 @@
#define KERNEL_START (*(unsigned int *) (PARAM+0x214))
#define INITRD_START (*(unsigned int *) (PARAM+0x218))
#define INITRD_SIZE (*(unsigned int *) (PARAM+0x21c))
-#define EDID_INFO (*(struct edid_info *) (PARAM+0x140))
#define EDD_NR (*(unsigned char *) (PARAM+EDDNR))
#define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF))
#define EDD_MBR_SIGNATURE ((unsigned int *) (PARAM+EDD_MBR_SIG_BUF))
--- linux-2.6.11-mm4-full/include/asm-i386/setup.h.old 2005-03-20 20:07:52.000000000 +0100
+++ linux-2.6.11-mm4-full/include/asm-i386/setup.h 2005-03-20 20:07:55.000000000 +0100
@@ -55,7 +55,6 @@
#define KERNEL_START (*(unsigned long *) (PARAM+0x214))
#define INITRD_START (*(unsigned long *) (PARAM+0x218))
#define INITRD_SIZE (*(unsigned long *) (PARAM+0x21c))
-#define EDID_INFO (*(struct edid_info *) (PARAM+0x140))
#define EDD_NR (*(unsigned char *) (PARAM+EDDNR))
#define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF))
#define EDD_MBR_SIGNATURE ((unsigned int *) (PARAM+EDD_MBR_SIG_BUF))
--- linux-2.6.11-mm4-full/include/video/edid.h 2005-03-02 08:37:50.000000000 +0100
+++ /dev/null 2005-03-19 22:42:59.000000000 +0100
@@ -1,27 +0,0 @@
-#ifndef __linux_video_edid_h__
-#define __linux_video_edid_h__
-
-#ifdef __KERNEL__
-
-#include <linux/config.h>
-#ifdef CONFIG_PPC_OF
-#include <linux/pci.h>
-#endif
-
-#ifdef CONFIG_X86
-struct edid_info {
- unsigned char dummy[128];
-};
-
-extern struct edid_info edid_info;
-extern char *get_EDID_from_BIOS(void *);
-
-#endif /* CONFIG_X86 */
-
-#ifdef CONFIG_PPC_OF
-extern char *get_EDID_from_OF(struct pci_dev *pdev);
-#endif
-
-#endif /* __KERNEL__ */
-
-#endif /* __linux_video_edid_h__ */


2005-03-20 20:54:04

by Antonino A. Daplas

[permalink] [raw]
Subject: Re: [-mm patch] kill include/video/edid.h

On Monday 21 March 2005 03:29, Adrian Bunk wrote:
> This patch removes some completely unused code.
>
> Signed-off-by: Adrian Bunk <[email protected]>
>
> ---
>
> arch/i386/boot/compressed/misc.c | 1 -
> arch/i386/kernel/setup.c | 4 ----
> arch/x86_64/kernel/setup.c | 3 ---
> drivers/video/fbmon.c | 1 -
> drivers/video/vesafb.c | 3 ---
> include/asm-i386/setup.h | 1 -
> include/asm-x86_64/bootsetup.h | 1 -
> include/video/edid.h | 27 ---------------------------
> 8 files changed, 41 deletions(-)
>
> --- linux-2.6.11-mm4-full/arch/i386/kernel/setup.c.old 2005-03-20
> 20:06:06.000000000 +0100 +++
> linux-2.6.11-mm4-full/arch/i386/kernel/setup.c 2005-03-20
> 20:06:45.000000000 +0100 @@ -43,8 +43,6 @@
> #include <linux/nodemask.h>
> #include <linux/kexec.h>
>
> -#include <video/edid.h>
> -
> #include <asm/apic.h>
> #include <asm/e820.h>
> #include <asm/mpspec.h>
> @@ -118,7 +116,6 @@
> unsigned short length;
> unsigned char table[0];
> };
> -struct edid_info edid_info;
> struct ist_info ist_info;
> struct e820map e820;
>
> @@ -1468,7 +1465,6 @@
> ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
> drive_info = DRIVE_INFO;
> screen_info = SCREEN_INFO;
> - edid_info = EDID_INFO;
> apm_info.bios = APM_BIOS_INFO;
> ist_info = IST_INFO;
> saved_videomode = VIDEO_MODE;
> --- linux-2.6.11-mm4-full/arch/x86_64/kernel/setup.c.old 2005-03-20
> 20:04:42.000000000 +0100 +++
> linux-2.6.11-mm4-full/arch/x86_64/kernel/setup.c 2005-03-20
> 20:07:11.000000000 +0100 @@ -48,7 +48,6 @@
> #include <asm/smp.h>
> #include <asm/msr.h>
> #include <asm/desc.h>
> -#include <video/edid.h>
> #include <asm/e820.h>
> #include <asm/dma.h>
> #include <asm/mpspec.h>
> @@ -100,7 +99,6 @@
> unsigned char table[0];
> };
>
> -struct edid_info edid_info;
> struct e820map e820;
>
> extern int root_mountflags;
> @@ -523,7 +521,6 @@
> ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
> drive_info = DRIVE_INFO;
> screen_info = SCREEN_INFO;
> - edid_info = EDID_INFO;
> saved_video_mode = SAVED_VIDEO_MODE;
> bootloader_type = LOADER_TYPE;
>
> --- linux-2.6.11-mm4-full/drivers/video/fbmon.c.old 2005-03-20
> 20:03:56.000000000 +0100 +++
> linux-2.6.11-mm4-full/drivers/video/fbmon.c 2005-03-20 20:04:27.000000000
> +0100 @@ -34,7 +34,6 @@
> #include <asm/prom.h>
> #include <asm/pci-bridge.h>
> #endif
> -#include <video/edid.h>
> #include "edid.h"
>
> /*
> --- linux-2.6.11-mm4-full/drivers/video/vesafb.c.old 2005-03-20
> 20:04:12.000000000 +0100 +++
> linux-2.6.11-mm4-full/drivers/video/vesafb.c 2005-03-20 20:04:18.000000000
> +0100 @@ -19,9 +19,6 @@
> #include <linux/fb.h>
> #include <linux/ioport.h>
> #include <linux/init.h>
> -#ifdef __i386__
> -#include <video/edid.h>
> -#endif
> #include <asm/io.h>
> #include <asm/mtrr.h>
>
> --- linux-2.6.11-mm4-full/arch/i386/boot/compressed/misc.c.old 2005-03-20
> 20:05:55.000000000 +0100 +++
> linux-2.6.11-mm4-full/arch/i386/boot/compressed/misc.c 2005-03-20
> 20:05:58.000000000 +0100 @@ -12,7 +12,6 @@
> #include <linux/linkage.h>
> #include <linux/vmalloc.h>
> #include <linux/tty.h>
> -#include <video/edid.h>
> #include <asm/io.h>
> #include <asm/page.h>
>
> --- linux-2.6.11-mm4-full/include/asm-x86_64/bootsetup.h.old 2005-03-20
> 20:07:33.000000000 +0100 +++
> linux-2.6.11-mm4-full/include/asm-x86_64/bootsetup.h 2005-03-20
> 20:07:44.000000000 +0100 @@ -25,7 +25,6 @@
> #define KERNEL_START (*(unsigned int *) (PARAM+0x214))
> #define INITRD_START (*(unsigned int *) (PARAM+0x218))
> #define INITRD_SIZE (*(unsigned int *) (PARAM+0x21c))
> -#define EDID_INFO (*(struct edid_info *) (PARAM+0x140))
> #define EDD_NR (*(unsigned char *) (PARAM+EDDNR))
> #define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF))
> #define EDD_MBR_SIGNATURE ((unsigned int *) (PARAM+EDD_MBR_SIG_BUF))
> --- linux-2.6.11-mm4-full/include/asm-i386/setup.h.old 2005-03-20
> 20:07:52.000000000 +0100 +++
> linux-2.6.11-mm4-full/include/asm-i386/setup.h 2005-03-20
> 20:07:55.000000000 +0100 @@ -55,7 +55,6 @@
> #define KERNEL_START (*(unsigned long *) (PARAM+0x214))
> #define INITRD_START (*(unsigned long *) (PARAM+0x218))
> #define INITRD_SIZE (*(unsigned long *) (PARAM+0x21c))
> -#define EDID_INFO (*(struct edid_info *) (PARAM+0x140))
> #define EDD_NR (*(unsigned char *) (PARAM+EDDNR))
> #define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF))
> #define EDD_MBR_SIGNATURE ((unsigned int *) (PARAM+EDD_MBR_SIG_BUF))

Not this one. Code that grabs the EDID block using the video BIOS is in video.S.
Currently, there's no driver that uses this but it's an acceptable backup for drivers
that want the EDID block but has no i2c, or i2c probing fails.

Tony


2005-03-24 03:34:26

by Adrian Bunk

[permalink] [raw]
Subject: [2.6 patch] edid.h cleanups

On Mon, Mar 21, 2005 at 04:53:43AM +0800, Antonino A. Daplas wrote:

> Not this one. Code that grabs the EDID block using the video BIOS is in video.S.
> Currently, there's no driver that uses this but it's an acceptable backup for drivers
> that want the EDID block but has no i2c, or i2c probing fails.

OK, below are only the other parts of my patch.

> Tony

cu
Adrian



<-- snip -->


This patch contains the following cleanups:
- remove unneeded #include <video/edid.h>'s
- include/video/edid.h: kill two stale function prototypes

Signed-off-by: Adrian Bunk <[email protected]>

---

arch/i386/boot/compressed/misc.c | 1 -
drivers/video/fbmon.c | 1 -
drivers/video/vesafb.c | 3 ---
include/video/edid.h | 9 ---------
4 files changed, 14 deletions(-)

--- linux-2.6.11-mm4-full/drivers/video/fbmon.c.old 2005-03-20 20:03:56.000000000 +0100
+++ linux-2.6.11-mm4-full/drivers/video/fbmon.c 2005-03-20 20:04:27.000000000 +0100
@@ -34,7 +34,6 @@
#include <asm/prom.h>
#include <asm/pci-bridge.h>
#endif
-#include <video/edid.h>
#include "edid.h"

/*
--- linux-2.6.11-mm4-full/drivers/video/vesafb.c.old 2005-03-20 20:04:12.000000000 +0100
+++ linux-2.6.11-mm4-full/drivers/video/vesafb.c 2005-03-20 20:04:18.000000000 +0100
@@ -19,9 +19,6 @@
#include <linux/fb.h>
#include <linux/ioport.h>
#include <linux/init.h>
-#ifdef __i386__
-#include <video/edid.h>
-#endif
#include <asm/io.h>
#include <asm/mtrr.h>

--- linux-2.6.11-mm4-full/arch/i386/boot/compressed/misc.c.old 2005-03-20 20:05:55.000000000 +0100
+++ linux-2.6.11-mm4-full/arch/i386/boot/compressed/misc.c 2005-03-20 20:05:58.000000000 +0100
@@ -12,7 +12,6 @@
#include <linux/linkage.h>
#include <linux/vmalloc.h>
#include <linux/tty.h>
-#include <video/edid.h>
#include <asm/io.h>
#include <asm/page.h>

--- linux-2.6.12-rc1-mm1-full/include/video/edid.h.old 2005-03-24 01:37:07.000000000 +0100
+++ linux-2.6.12-rc1-mm1-full/include/video/edid.h 2005-03-24 01:37:27.000000000 +0100
@@ -4,9 +4,6 @@
#ifdef __KERNEL__

#include <linux/config.h>
-#ifdef CONFIG_PPC_OF
-#include <linux/pci.h>
-#endif

#ifdef CONFIG_X86
struct edid_info {
@@ -14,14 +11,8 @@
};

extern struct edid_info edid_info;
-extern char *get_EDID_from_BIOS(void *);
-
#endif /* CONFIG_X86 */

-#ifdef CONFIG_PPC_OF
-extern char *get_EDID_from_OF(struct pci_dev *pdev);
-#endif
-
#endif /* __KERNEL__ */

#endif /* __linux_video_edid_h__ */