From: "Antonino A. Daplas" remove/modify all references to info->cursor Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton --- 25-akpm/drivers/video/aty/mach64_cursor.c | 35 ++++++++---------------------- 1 files changed, 10 insertions(+), 25 deletions(-) diff -puN drivers/video/aty/mach64_cursor.c~fbdev-clean-up-mach64-cursor-implementation drivers/video/aty/mach64_cursor.c --- 25/drivers/video/aty/mach64_cursor.c~fbdev-clean-up-mach64-cursor-implementation Wed Oct 20 15:45:12 2004 +++ 25-akpm/drivers/video/aty/mach64_cursor.c Wed Oct 20 15:45:12 2004 @@ -88,22 +88,9 @@ int atyfb_cursor(struct fb_info *info, s wait_for_fifo(1, par); aty_st_le32(GEN_TEST_CNTL, aty_ld_le32(GEN_TEST_CNTL, par) & ~HWCURSOR_ENABLE, par); - /* Set size */ - if (cursor->set & FB_CUR_SETSIZE) { - info->cursor.image.height = cursor->image.height; - info->cursor.image.width = cursor->image.width; - } - - /* Set hot spot */ - if (cursor->set & FB_CUR_SETHOT) - info->cursor.hot = cursor->hot; - /* set position */ if (cursor->set & FB_CUR_SETPOS) { - info->cursor.image.dx = cursor->image.dx; - info->cursor.image.dy = cursor->image.dy; - - x = info->cursor.image.dx - info->cursor.hot.x - info->var.xoffset; + x = cursor->image.dx - cursor->hot.x - info->var.xoffset; if (x < 0) { xoff = -x; x = 0; @@ -111,7 +98,7 @@ int atyfb_cursor(struct fb_info *info, s xoff = 0; } - y = info->cursor.image.dy - info->cursor.hot.y - info->var.yoffset; + y = cursor->image.dy - cursor->hot.y - info->var.yoffset; if (y < 0) { yoff = -y; y = 0; @@ -128,7 +115,7 @@ int atyfb_cursor(struct fb_info *info, s wait_for_fifo(4, par); aty_st_le32(CUR_OFFSET, (info->fix.smem_len >> 3) + (yoff << 1), par); aty_st_le32(CUR_HORZ_VERT_OFF, - ((u32) (64 - info->cursor.image.height + yoff) << 16) | xoff, + ((u32) (64 - cursor->image.height + yoff) << 16) | xoff, par); aty_st_le32(CUR_HORZ_VERT_POSN, ((u32) y << 16) | x, par); } @@ -137,10 +124,8 @@ int atyfb_cursor(struct fb_info *info, s if (cursor->set & FB_CUR_SETCMAP) { u32 fg_idx, bg_idx, fg, bg; - info->cursor.image.fg_color = cursor->image.fg_color; - info->cursor.image.bg_color = cursor->image.bg_color; - fg_idx = info->cursor.image.fg_color; - bg_idx = info->cursor.image.bg_color; + fg_idx = cursor->image.fg_color; + bg_idx = cursor->image.bg_color; fg = (info->cmap.red[fg_idx] << 24) | (info->cmap.green[fg_idx] << 16) | @@ -155,12 +140,12 @@ int atyfb_cursor(struct fb_info *info, s aty_st_le32(CUR_CLR1, fg, par); } - if (cursor->set & FB_CUR_SETSHAPE) { + if (cursor->set & (FB_CUR_SETSHAPE | FB_CUR_SETIMAGE)) { u8 *src = (u8 *)cursor->image.data; - u8 *msk = (u8 *)info->cursor.mask; + u8 *msk = (u8 *)cursor->mask; u8 *dst = (u8 *)info->sprite.addr; - unsigned int width = (info->cursor.image.width + 7) >> 3; - unsigned int height = info->cursor.image.height; + unsigned int width = (cursor->image.width + 7) >> 3; + unsigned int height = cursor->image.height; unsigned int align = info->sprite.scan_align; unsigned int i, j, offset; @@ -175,7 +160,7 @@ int atyfb_cursor(struct fb_info *info, s for (j = 0; j < width; j++) { b = *src++; m = *msk++; - switch (info->cursor.rop) { + switch (cursor->rop) { case ROP_XOR: // Upper 4 bits of mask data fb_writeb(cursor_mask_lookup[m >> 4 ] | _