Skip to content

Commit

Permalink
Adjust to kernel 5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
displaylink-dkurek committed Mar 4, 2020
1 parent bb3038c commit 34d92e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions module/evdi_fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,11 @@ void evdi_fbdev_unplug(struct drm_device *dev)
struct fb_info *info;

info = efbdev->helper.fbdev;
#if KERNEL_VERSION(5, 6, 0) <= LINUX_VERSION_CODE
unregister_framebuffer(info);
#else
unlink_framebuffer(info);
#endif
}
}
#endif /* CONFIG_FB */
Expand Down
4 changes: 3 additions & 1 deletion module/evdi_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ static void evdi_unmap_dma_buf(
{
}

#if KERNEL_VERSION(5, 6, 0) > LINUX_VERSION_CODE
static void *evdi_dmabuf_kmap(__always_unused struct dma_buf *dma_buf,
__always_unused unsigned long page_num)
{
Expand All @@ -475,6 +476,7 @@ static void evdi_dmabuf_kunmap(
__always_unused void *addr)
{
}
#endif

#if KERNEL_VERSION(4, 19, 0) > LINUX_VERSION_CODE
static void *evdi_dmabuf_kmap_atomic(__always_unused struct dma_buf *dma_buf,
Expand Down Expand Up @@ -513,7 +515,7 @@ static struct dma_buf_ops evdi_dmabuf_ops = {
.map_atomic = evdi_dmabuf_kmap_atomic,
.unmap = evdi_dmabuf_kunmap,
.unmap_atomic = evdi_dmabuf_kunmap_atomic,
#else
#elif KERNEL_VERSION(5, 6, 0) > LINUX_VERSION_CODE
.map = evdi_dmabuf_kmap,
.unmap = evdi_dmabuf_kunmap,
#endif
Expand Down

0 comments on commit 34d92e8

Please sign in to comment.