提交 f4e97477 编写于 作者: J Jani Nikula

video: fbdev: atyfb: modify the static fb_ops directly

Avoid modifying the fb_ops via info->fbops to let us make the pointer
const in the future.

Cc: linux-fbdev@vger.kernel.org
Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: NJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/7dfbf1d47203157f5eb9a6f447f0095765d0b5e6.1575390740.git.jani.nikula@intel.com
上级 284562e1
...@@ -341,7 +341,7 @@ extern const u8 aty_postdividers[8]; ...@@ -341,7 +341,7 @@ extern const u8 aty_postdividers[8];
* Hardware cursor support * Hardware cursor support
*/ */
extern int aty_init_cursor(struct fb_info *info); extern int aty_init_cursor(struct fb_info *info, struct fb_ops *atyfb_ops);
/* /*
* Hardware acceleration * Hardware acceleration
......
...@@ -1316,10 +1316,10 @@ static int atyfb_set_par(struct fb_info *info) ...@@ -1316,10 +1316,10 @@ static int atyfb_set_par(struct fb_info *info)
par->accel_flags = var->accel_flags; /* hack */ par->accel_flags = var->accel_flags; /* hack */
if (var->accel_flags) { if (var->accel_flags) {
info->fbops->fb_sync = atyfb_sync; atyfb_ops.fb_sync = atyfb_sync;
info->flags &= ~FBINFO_HWACCEL_DISABLED; info->flags &= ~FBINFO_HWACCEL_DISABLED;
} else { } else {
info->fbops->fb_sync = NULL; atyfb_ops.fb_sync = NULL;
info->flags |= FBINFO_HWACCEL_DISABLED; info->flags |= FBINFO_HWACCEL_DISABLED;
} }
...@@ -2702,7 +2702,7 @@ static int aty_init(struct fb_info *info) ...@@ -2702,7 +2702,7 @@ static int aty_init(struct fb_info *info)
#ifdef CONFIG_FB_ATY_CT #ifdef CONFIG_FB_ATY_CT
if (!noaccel && M64_HAS(INTEGRATED)) if (!noaccel && M64_HAS(INTEGRATED))
aty_init_cursor(info); aty_init_cursor(info, &atyfb_ops);
#endif /* CONFIG_FB_ATY_CT */ #endif /* CONFIG_FB_ATY_CT */
info->var = var; info->var = var;
......
...@@ -194,7 +194,7 @@ static int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor) ...@@ -194,7 +194,7 @@ static int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
return 0; return 0;
} }
int aty_init_cursor(struct fb_info *info) int aty_init_cursor(struct fb_info *info, struct fb_ops *atyfb_ops)
{ {
unsigned long addr; unsigned long addr;
...@@ -219,7 +219,7 @@ int aty_init_cursor(struct fb_info *info) ...@@ -219,7 +219,7 @@ int aty_init_cursor(struct fb_info *info)
info->sprite.buf_align = 16; /* and 64 lines tall. */ info->sprite.buf_align = 16; /* and 64 lines tall. */
info->sprite.flags = FB_PIXMAP_IO; info->sprite.flags = FB_PIXMAP_IO;
info->fbops->fb_cursor = atyfb_cursor; atyfb_ops->fb_cursor = atyfb_cursor;
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册