Commit fb7f4055 authored by Mike Rapoport's avatar Mike Rapoport Committed by Greg Kroah-Hartman

staging: sm750fb: replace lynx_cursor methods with function calls

The methods in lynx_cursor always use the same implementation and there is
no point to use redirection rather than direct function call.
Signed-off-by: default avatarMike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fe821aad
...@@ -129,16 +129,16 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor) ...@@ -129,16 +129,16 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor)
return -ENXIO; return -ENXIO;
} }
cursor->disable(cursor); hw_cursor_disable(cursor);
if (fbcursor->set & FB_CUR_SETSIZE) if (fbcursor->set & FB_CUR_SETSIZE)
cursor->setSize(cursor, hw_cursor_setSize(cursor,
fbcursor->image.width, fbcursor->image.width,
fbcursor->image.height); fbcursor->image.height);
if (fbcursor->set & FB_CUR_SETPOS) if (fbcursor->set & FB_CUR_SETPOS)
cursor->setPos(cursor, hw_cursor_setPos(cursor,
fbcursor->image.dx - info->var.xoffset, fbcursor->image.dx - info->var.xoffset,
fbcursor->image.dy - info->var.yoffset); fbcursor->image.dy - info->var.yoffset);
if (fbcursor->set & FB_CUR_SETCMAP) { if (fbcursor->set & FB_CUR_SETCMAP) {
/* get the 16bit color of kernel means */ /* get the 16bit color of kernel means */
...@@ -152,18 +152,18 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor) ...@@ -152,18 +152,18 @@ static int lynxfb_ops_cursor(struct fb_info *info, struct fb_cursor *fbcursor)
((info->cmap.green[fbcursor->image.bg_color] & 0xfc00) >> 5) | ((info->cmap.green[fbcursor->image.bg_color] & 0xfc00) >> 5) |
((info->cmap.blue[fbcursor->image.bg_color] & 0xf800) >> 11); ((info->cmap.blue[fbcursor->image.bg_color] & 0xf800) >> 11);
cursor->setColor(cursor, fg, bg); hw_cursor_setColor(cursor, fg, bg);
} }
if (fbcursor->set & (FB_CUR_SETSHAPE | FB_CUR_SETIMAGE)) { if (fbcursor->set & (FB_CUR_SETSHAPE | FB_CUR_SETIMAGE)) {
cursor->setData(cursor, hw_cursor_setData(cursor,
fbcursor->rop, fbcursor->rop,
fbcursor->image.data, fbcursor->image.data,
fbcursor->mask); fbcursor->mask);
} }
if (fbcursor->enable) if (fbcursor->enable)
cursor->enable(cursor); hw_cursor_enable(cursor);
return 0; return 0;
} }
...@@ -791,19 +791,13 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index) ...@@ -791,19 +791,13 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
pr_info("crtc->cursor.mmio = %p\n", crtc->cursor.mmio); pr_info("crtc->cursor.mmio = %p\n", crtc->cursor.mmio);
crtc->cursor.maxH = crtc->cursor.maxW = 64; crtc->cursor.maxH = crtc->cursor.maxW = 64;
crtc->cursor.size = crtc->cursor.maxH * crtc->cursor.maxW * 2 / 8; crtc->cursor.size = crtc->cursor.maxH * crtc->cursor.maxW * 2 / 8;
crtc->cursor.disable = hw_cursor_disable;
crtc->cursor.enable = hw_cursor_enable;
crtc->cursor.setColor = hw_cursor_setColor;
crtc->cursor.setPos = hw_cursor_setPos;
crtc->cursor.setSize = hw_cursor_setSize;
crtc->cursor.setData = hw_cursor_setData;
crtc->cursor.vstart = share->pvMem + crtc->cursor.offset; crtc->cursor.vstart = share->pvMem + crtc->cursor.offset;
crtc->cursor.share = share; crtc->cursor.share = share;
memset_io(crtc->cursor.vstart, 0, crtc->cursor.size); memset_io(crtc->cursor.vstart, 0, crtc->cursor.size);
if (!g_hwcursor) { if (!g_hwcursor) {
lynxfb_ops.fb_cursor = NULL; lynxfb_ops.fb_cursor = NULL;
crtc->cursor.disable(&crtc->cursor); hw_cursor_disable(&crtc->cursor);
} }
/* set info->fbops, must be set before fb_find_mode */ /* set info->fbops, must be set before fb_find_mode */
......
...@@ -79,13 +79,6 @@ struct lynx_cursor { ...@@ -79,13 +79,6 @@ struct lynx_cursor {
volatile char __iomem *mmio; volatile char __iomem *mmio;
/* the lynx_share of this adaptor */ /* the lynx_share of this adaptor */
struct lynx_share *share; struct lynx_share *share;
/* proc_routines */
void (*enable)(struct lynx_cursor *);
void (*disable)(struct lynx_cursor *);
void (*setSize)(struct lynx_cursor *, int, int);
void (*setPos)(struct lynx_cursor *, int, int);
void (*setColor)(struct lynx_cursor *, u32, u32);
void (*setData)(struct lynx_cursor *, u16, const u8*, const u8*);
}; };
struct lynxfb_crtc { struct lynxfb_crtc {
......
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