From: "Antonino A. Daplas" This patch places 'video/i810/' after 'char/' in drivers/Makefile. This order change makes it unnecessary for i810fb to explicitly call agp_intel_init(). This is untested, as I don't have any i810 hardware anymore, but I believe it will work. If it does, the ugly 'early initialization hack' in drivers/char/agp/intel-agp.c:agp_intel_init() can be removed (haven't done it yet). Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton --- 25-akpm/drivers/Makefile | 4 ++++ 25-akpm/drivers/video/Makefile | 5 ++--- 25-akpm/drivers/video/i810/i810_main.c | 5 ----- 3 files changed, 6 insertions(+), 8 deletions(-) diff -puN drivers/Makefile~fbdev-initialize-i810fb-after-agpgart drivers/Makefile --- 25/drivers/Makefile~fbdev-initialize-i810fb-after-agpgart 2004-09-10 23:47:48.044879016 -0700 +++ 25-akpm/drivers/Makefile 2004-09-10 23:48:09.878559792 -0700 @@ -16,6 +16,10 @@ obj-$(CONFIG_PNP) += pnp/ # char/ comes before serial/ etc so that the VT console is the boot-time # default. obj-y += char/ + +# i810fb depends on char/agp/ +obj-$(CONFIG_FB_I810) += video/i810/ + # we also need input/serio early so serio bus is initialized by the time # serial drivers start registering their serio ports obj-$(CONFIG_SERIO) += input/serio/ diff -puN drivers/video/i810/i810_main.c~fbdev-initialize-i810fb-after-agpgart drivers/video/i810/i810_main.c --- 25/drivers/video/i810/i810_main.c~fbdev-initialize-i810fb-after-agpgart 2004-09-10 23:47:48.058876888 -0700 +++ 25-akpm/drivers/video/i810/i810_main.c 2004-09-10 23:47:48.068875368 -0700 @@ -1991,11 +1991,6 @@ int __init i810fb_init(void) { i810fb_setup(fb_get_options("i810fb")); - if (agp_intel_init()) { - printk("i810fb_init: cannot initialize intel agpgart\n"); - return -ENODEV; - } - if (pci_register_driver(&i810fb_driver) > 0) return 0; pci_unregister_driver(&i810fb_driver); diff -puN drivers/video/Makefile~fbdev-initialize-i810fb-after-agpgart drivers/video/Makefile --- 25/drivers/video/Makefile~fbdev-initialize-i810fb-after-agpgart 2004-09-10 23:47:48.059876736 -0700 +++ 25-akpm/drivers/video/Makefile 2004-09-10 23:47:48.074874456 -0700 @@ -61,9 +61,8 @@ obj-$(CONFIG_FB_SIS) += sis/ cfbcopya obj-$(CONFIG_FB_ATY) += aty/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o obj-$(CONFIG_FB_ATY128) += aty/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o obj-$(CONFIG_FB_RADEON) += aty/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o -obj-$(CONFIG_FB_I810) += i810/ cfbfillrect.o cfbcopyarea.o \ - cfbimgblt.o vgastate.o - +obj-$(CONFIG_FB_I810) += cfbcopyarea.o cfbfillrect.o cfbimgblt.o \ + vgastate.o obj-$(CONFIG_FB_SUN3) += sun3fb.o obj-$(CONFIG_FB_HGA) += hgafb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_SA1100) += sa1100fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o _