Commit 862c759d authored by Kai Germaschewski's avatar Kai Germaschewski Committed by Linus Torvalds

[PATCH] Use phys_to_virt instead of bus_to_virt in vesafb

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.
parent 1bc8f69a
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment