gasket-driver/_service:download_files:a87c105c14e826dafd4b25c36fa7c7c657a7ad03.patch
Chris Bradbury cfbc2aae74 Accepting request 1086620 from home:chrBrd:branches:hardware
Add patch to enable successful builds for Leap 15.5.

The dma-buf symbols used by this driver were moved into their own `DMA_BUF`
module namespace in kernel 5.16. Consequently, the upstream source conditionally
imports the `DMA_BUF` module namespace if the kernel version is >= 5.16.

However, the `DMA_BUF` module namespace changes have been backported to the
5.14 kernel used in Leap 15.5, causing unpatched source builds to fail.

This change incorporates a patch that removes the conditional check in the
upstream source, importing the `DMA_BUF` module namespace regardless of kernel
version, and applies that patch when `sle_version` is equal to "150500"
(ie. is Leap 15.5 or greater).

The patch is taken from the PR at:
https://github.com/google/gasket-driver/pull/10

OBS-URL: https://build.opensuse.org/request/show/1086620
OBS-URL: https://build.opensuse.org/package/show/hardware/gasket-driver?expand=0&rev=3
2023-05-11 19:51:02 +00:00

24 lines
648 B
Diff

From a87c105c14e826dafd4b25c36fa7c7c657a7ad03 Mon Sep 17 00:00:00 2001
From: hibby50 <hibby50@gmail.com>
Date: Thu, 20 Apr 2023 14:16:06 -0400
Subject: [PATCH] import DMA_BUF regardless of kernel version
---
src/gasket_page_table.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/gasket_page_table.c b/src/gasket_page_table.c
index e81ab2b..0e768e0 100644
--- a/src/gasket_page_table.c
+++ b/src/gasket_page_table.c
@@ -53,9 +53,7 @@
#include <linux/version.h>
#include <linux/vmalloc.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,16,0)
MODULE_IMPORT_NS(DMA_BUF);
-#endif
#include "gasket_constants.h"
#include "gasket_core.h"