]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Use phys_to_virt instead of bus_to_virt in vesafb
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Thu, 7 Mar 2002 08:40:09 +0000 (00:40 -0800)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Thu, 7 Mar 2002 08:40:09 +0000 (00:40 -0800)
Several people (including Alan Cox) on lkml claimed that the BIOS
returns CPU addresses, so using phys_to_virt is actually correct -
and it makes my kernel compile again.

As vesafb only compiles on i386, using a more portable API isn't useful,
anyway.

drivers/video/vesafb.c

index 1868b6f2125723d40323cca446759452756c84ca..a106e5c0eca4444e0a32ecfdc26adb2895c5f351 100644 (file)
@@ -550,7 +550,7 @@ int __init vesafb_init(void)
                ypan = pmi_setpal = 0; /* not available or some DOS TSR ... */
 
        if (ypan || pmi_setpal) {
-               pmi_base  = (unsigned short*)bus_to_virt(((unsigned long)screen_info.vesapm_seg << 4) + screen_info.vesapm_off);
+               pmi_base  = (unsigned short*)phys_to_virt(((unsigned long)screen_info.vesapm_seg << 4) + screen_info.vesapm_off);
                pmi_start = (void*)((char*)pmi_base + pmi_base[1]);
                pmi_pal   = (void*)((char*)pmi_base + pmi_base[2]);
                printk(KERN_INFO "vesafb: pmi: set display start = %p, set palette = %p\n",pmi_start,pmi_pal);