diff options
author | Jani Nikula <jani.nikula@intel.com> | 2019-11-29 12:29:35 +0200 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2019-12-03 11:11:24 +0200 |
commit | 80b2976efa865941831459b50ca333701e2a7d29 (patch) | |
tree | 5d6d17cd2b0d828bfa31ae4de4013ce9636a1bf9 /drivers | |
parent | f1844af349c730b159dd78cc76da2978c49fafd0 (diff) | |
download | linux-80b2976efa865941831459b50ca333701e2a7d29.tar.bz2 |
video: fbdev: vesafb: 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: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/9e34c1d9a81690cbd75af7969fc4baf60a64b13f.1575022735.git.jani.nikula@intel.com
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/fbdev/vesafb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/video/fbdev/vesafb.c b/drivers/video/fbdev/vesafb.c index d9c08f6c2155..a1fe24ea869b 100644 --- a/drivers/video/fbdev/vesafb.c +++ b/drivers/video/fbdev/vesafb.c @@ -447,15 +447,15 @@ static int vesafb_probe(struct platform_device *dev) vesafb_fix.smem_start, info->screen_base, size_remap/1024, size_total/1024); + if (!ypan) + vesafb_ops.fb_pan_display = NULL; + info->fbops = &vesafb_ops; info->var = vesafb_defined; info->fix = vesafb_fix; info->flags = FBINFO_FLAG_DEFAULT | FBINFO_MISC_FIRMWARE | (ypan ? FBINFO_HWACCEL_YPAN : 0); - if (!ypan) - info->fbops->fb_pan_display = NULL; - if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) { err = -ENOMEM; goto err; |