2.3.19 vgacon change

Jeff Garzik (jgarzik@pobox.com)
Mon, 04 Oct 1999 19:29:34 -0400


Was this change necessary? Not all implementations of scr_readw are
implemented as volatile references. The pointer should be cast to
volatile in the implementation of scr_readw(), not in the code itself.

Jeff

--- v2.3.18/linux/drivers/video/vgacon.c Tue Aug 17 10:15:42 1999
+++ linux/drivers/video/vgacon.c Sat Oct 2 07:46:33 1999
@@ -166,7 +166,7 @@
{
const char *display_desc = NULL;
u16 saved1, saved2;
- u16 *p;
+ volatile u16 *p;

if (ORIG_VIDEO_ISVGA == VIDEO_TYPE_VLFB) {
no_vga:
@@ -285,7 +285,7 @@
* Find out if there is a graphics card present.
* Are there smarter methods around?
*/
- p = (u16 *)vga_vram_base;
+ p = (volatile u16 *)vga_vram_base;
saved1 = scr_readw(p);
saved2 = scr_readw(p + 1);
scr_writew(0xAA55, p);

-- 
Custom driver development	|    Never worry about theory as long
Open source programming		|    as the machinery does what it's
				|    supposed to do.  -- R. A. Heinlein

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/