summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/udlfb.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2018-07-25 15:41:55 +0200
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2018-07-25 15:41:55 +0200
commit2c29cfc3eaf11779176bf41475cfca49bccba11c (patch)
tree8006c93072ddf1325ba670c60f007007d9d223dd /drivers/video/fbdev/udlfb.c
parent564f1807379298dfdb12ed0d5b25fcb89c238527 (diff)
downloadlinux-2c29cfc3eaf11779176bf41475cfca49bccba11c.tar.bz2
udlfb: make a local copy of fb_ops
The defio subsystem overwrites the method fb_osp->mmap. That method is stored in module's static data - and that means that if we have multiple diplaylink adapters, they will over write each other's method. In order to avoid interference between multiple adapters, we copy the fb_ops structure to a device-local memory. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Diffstat (limited to 'drivers/video/fbdev/udlfb.c')
-rw-r--r--drivers/video/fbdev/udlfb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c
index fa63a2e359d6..770c1c8cfbd0 100644
--- a/drivers/video/fbdev/udlfb.c
+++ b/drivers/video/fbdev/udlfb.c
@@ -1665,7 +1665,8 @@ static void dlfb_init_framebuffer_work(struct work_struct *work)
dlfb->info = info;
info->par = dlfb;
info->pseudo_palette = dlfb->pseudo_palette;
- info->fbops = &dlfb_ops;
+ dlfb->ops = dlfb_ops;
+ info->fbops = &dlfb->ops;
retval = fb_alloc_cmap(&info->cmap, 256, 0);
if (retval < 0) {