diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2018-09-23 19:45:33 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2018-09-24 09:28:51 +0200 |
commit | 26c7795a6feddcadbfdc9debab2db1015ba4c732 (patch) | |
tree | 29c82c34334a42d20aa002679595b213562405fc | |
parent | 3998113bb027edb146d9413aef78b048059e8c00 (diff) |
patches: remove .coredump from struct driver for kernel < 4.16
Kernel 4.16 added a new .coredump member to the driver structure which
can be implemented by drivers. Remove this member on older kernel
versions as they do not support this feature.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | patches/0088-coredump.cocci | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/patches/0088-coredump.cocci b/patches/0088-coredump.cocci new file mode 100644 index 00000000..329e0315 --- /dev/null +++ b/patches/0088-coredump.cocci @@ -0,0 +1,93 @@ +@r1@ +identifier drv, fn; +@@ +static struct pci_driver drv = { + .driver = { ++#if LINUX_VERSION_IS_GEQ(4,16,0) + .coredump = fn, ++#endif + ... + }, + ... +}; + +@r11 depends on r1@ +identifier r1.fn; +@@ ++#if LINUX_VERSION_IS_GEQ(4,16,0) +fn(...) +{ + ... +} ++#endif + + +@r2@ +identifier drv, fn; +@@ + static struct pci_driver drv = { ++#if LINUX_VERSION_IS_GEQ(4,16,0) + .driver.coredump = fn, ++#endif + ... + }; + +@r21 depends on r2@ +identifier r2.fn; +@@ ++#if LINUX_VERSION_IS_GEQ(4,16,0) +fn(...) +{ + ... +} ++#endif + + +@r3@ +identifier drv, fn; +@@ +static struct usb_driver drv = { + .drvwrap.driver = { ++#if LINUX_VERSION_IS_GEQ(4,16,0) + .coredump = fn, ++#endif + ... + }, + ... +}; + + +@r31 depends on r3@ +identifier r3.fn; +@@ ++#if LINUX_VERSION_IS_GEQ(4,16,0) +fn(...) +{ + ... +} ++#endif + + +@r4@ +identifier driver, fn; +@@ + static struct sdio_driver driver = { + .drv = { ++#if LINUX_VERSION_IS_GEQ(4,16,0) + .coredump = fn, ++#endif + ... + }, + ... +}; + + +@r41 depends on r4@ +identifier r4.fn; +@@ ++#if LINUX_VERSION_IS_GEQ(4,16,0) +fn(...) +{ + ... +} ++#endif |