Skip to content

Commit

Permalink
fix special kernel 5.15.71 build issue
Browse files Browse the repository at this point in the history
Signed-off-by: zouxiaoh <[email protected]>
  • Loading branch information
zouxiaoh committed Dec 2, 2022
1 parent 863f557 commit 426fc5b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion drivers/media/pci/intel/ipu-isys.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ static int isys_fwnode_parse(struct device *dev,
return 0;
}

#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) && LINUX_VERSION_CODE != KERNEL_VERSION(5, 15, 255)
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) && LINUX_VERSION_CODE != KERNEL_VERSION(5, 15, 71)
static int isys_notifier_init(struct ipu_isys *isys)
{
struct ipu_device *isp = isys->adev->isp;
Expand Down
18 changes: 9 additions & 9 deletions drivers/media/pci/intel/ipu-psys.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,8 @@ static int ipu_dma_buf_begin_cpu_access(struct dma_buf *dma_buf,
return -ENOTTY;
}

#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) || LINUX_VERSION_CODE == KERNEL_VERSION(5, 15, 70) \
|| LINUX_VERSION_CODE == KERNEL_VERSION(5, 15, 255)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) || LINUX_VERSION_CODE == KERNEL_VERSION(5, 15, 255) \
|| LINUX_VERSION_CODE == KERNEL_VERSION(5, 15, 71)
static int ipu_dma_buf_vmap(struct dma_buf *dmabuf, struct iosys_map *map)
{
struct dma_buf_attachment *attach;
Expand Down Expand Up @@ -499,8 +499,8 @@ static void *ipu_dma_buf_vmap(struct dma_buf *dmabuf)
}
#endif

#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) || LINUX_VERSION_CODE == KERNEL_VERSION(5, 15, 70) \
|| LINUX_VERSION_CODE == KERNEL_VERSION(5, 15, 255)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) || LINUX_VERSION_CODE == KERNEL_VERSION(5, 15, 255) \
|| LINUX_VERSION_CODE == KERNEL_VERSION(5, 15, 71)
static void ipu_dma_buf_vunmap(struct dma_buf *dmabuf, struct iosys_map *map)
{
struct dma_buf_attachment *attach;
Expand Down Expand Up @@ -619,8 +619,8 @@ static inline void ipu_psys_kbuf_unmap(struct ipu_psys_kbuffer *kbuf)
return;

kbuf->valid = false;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) || LINUX_VERSION_CODE == KERNEL_VERSION(5, 15, 70) \
|| LINUX_VERSION_CODE == KERNEL_VERSION(5, 15, 255)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) || LINUX_VERSION_CODE == KERNEL_VERSION(5, 15, 255) \
|| LINUX_VERSION_CODE == KERNEL_VERSION(5, 15, 71)
if (kbuf->kaddr) {
struct iosys_map dmap;

Expand Down Expand Up @@ -765,8 +765,8 @@ int ipu_psys_mapbuf_locked(int fd, struct ipu_psys_fh *fh,
{
struct ipu_psys *psys = fh->psys;
struct dma_buf *dbuf;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) || LINUX_VERSION_CODE == KERNEL_VERSION(5, 15, 70) \
|| LINUX_VERSION_CODE == KERNEL_VERSION(5, 15, 255)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) || LINUX_VERSION_CODE == KERNEL_VERSION(5, 15, 255) \
|| LINUX_VERSION_CODE == KERNEL_VERSION(5, 15, 71)
struct iosys_map dmap;
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0) && LINUX_VERSION_CODE != KERNEL_VERSION(5, 10, 46)
struct dma_buf_map dmap;
Expand Down Expand Up @@ -1821,6 +1821,6 @@ MODULE_AUTHOR("Zaikuo Wang <[email protected]>");
MODULE_AUTHOR("Yunliang Ding <[email protected]>");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Intel ipu processing system driver");
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0) || LINUX_VERSION_CODE == KERNEL_VERSION(5, 15, 255)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0) || LINUX_VERSION_CODE == KERNEL_VERSION(5, 15, 71)
MODULE_IMPORT_NS(DMA_BUF);
#endif

0 comments on commit 426fc5b

Please sign in to comment.