linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/8] fbdev: Fix access to ROM in aty128fb
@ 2004-11-02 11:46 Antonino A. Daplas
  2004-11-02 14:31 ` Jon Smirl
  0 siblings, 1 reply; 2+ messages in thread
From: Antonino A. Daplas @ 2004-11-02 11:46 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Fbdev development list

Fix access to ROM in aty128fb. Found by sparse.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
---

 aty128fb.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -Nru a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
--- a/drivers/video/aty/aty128fb.c	2004-10-24 05:46:29 +08:00
+++ b/drivers/video/aty/aty128fb.c	2004-10-31 12:36:43 +08:00
@@ -939,7 +939,7 @@
                 rom_base = ioremap(segstart, 0x10000);
 		if (rom_base == NULL)
 			return NULL;
-                if ((*rom_base == 0x55) && (((*(rom_base + 1)) & 0xff) == 0xaa))
+		if (readb(rom_base) == 0x55 && readb(rom_base + 1) == 0xaa)
 	                break;
                 iounmap(rom_base);
 		rom_base = NULL;




-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/8] fbdev: Fix access to ROM in aty128fb
  2004-11-02 11:46 [PATCH 2/8] fbdev: Fix access to ROM in aty128fb Antonino A. Daplas
@ 2004-11-02 14:31 ` Jon Smirl
  0 siblings, 0 replies; 2+ messages in thread
From: Jon Smirl @ 2004-11-02 14:31 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: Antonino A. Daplas

Have you looked at the new PCI API for ROM access in the -mm tree yet?
It is in the bk-pci patch and should be going into linus' tree sooner
or later. It will allow you to get rid of some common code in a lot of
the fbdev drivers.

pci_map_rom/pci_unmap_rom

It also tracks the boot video card. pci_map_rom for that card returns
a pointer to the shadow ROM copy at C0000. That let's you
transparently get to laptop ROMs that are stored compressed in the
system ROM.

-- 
Jon Smirl
jonsmirl@gmail.com


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-11-02 14:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-02 11:46 [PATCH 2/8] fbdev: Fix access to ROM in aty128fb Antonino A. Daplas
2004-11-02 14:31 ` Jon Smirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).