summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorDominik Sliwa <dominik.sliwa@toradex.com>2017-11-21 16:35:43 +0000
committerDominik Sliwa <dominik.sliwa@toradex.com>2018-09-18 13:01:26 +0200
commitd6a47bfb72f495a72637fbe635220f6af0f4cb6f (patch)
tree599ca63f39f31243e55a7a62df8c98fd40e308de /compat
parenta5867d9e1f9f8096480104d80f9a8088dbde9209 (diff)
backports:Backports for tegra 3.1 and 3.10 kernels
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Diffstat (limited to 'compat')
-rw-r--r--compat/backport-4.12.c2
-rw-r--r--compat/compat-3.5.c4
-rw-r--r--compat/compat-3.6.c2
-rw-r--r--compat/compat-3.7.c3
-rw-r--r--compat/compat-3.8.c3
-rw-r--r--compat/verification/x509_public_key.c3
6 files changed, 15 insertions, 2 deletions
diff --git a/compat/backport-4.12.c b/compat/backport-4.12.c
index 4b89682..2c0053f 100644
--- a/compat/backport-4.12.c
+++ b/compat/backport-4.12.c
@@ -109,8 +109,10 @@ static void extack_netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh,
skb = nlmsg_new(payload + tlvlen, GFP_KERNEL);
if (!skb) {
+#if LINUX_VERSION_IS_GEQ(3,10,0)
NETLINK_CB(in_skb).sk->sk_err = ENOBUFS;
NETLINK_CB(in_skb).sk->sk_error_report(NETLINK_CB(in_skb).sk);
+#endif
return;
}
diff --git a/compat/compat-3.5.c b/compat/compat-3.5.c
index de31228..721ec0e 100644
--- a/compat/compat-3.5.c
+++ b/compat/compat-3.5.c
@@ -67,7 +67,9 @@ EXPORT_SYMBOL_GPL(overflowuid);
EXPORT_SYMBOL_GPL(overflowgid);
#endif
-#if IS_ENABLED(CONFIG_PTP_1588_CLOCK)
+/* #if IS_ENABLED(CONFIG_PTP_1588_CLOCK) */
+/* backported to all of our kernels */
+#if 0
int ptp_clock_index(struct ptp_clock *ptp)
{
return ptp->index;
diff --git a/compat/compat-3.6.c b/compat/compat-3.6.c
index ef36485..9e593f5 100644
--- a/compat/compat-3.6.c
+++ b/compat/compat-3.6.c
@@ -14,6 +14,7 @@
/* whoopsie ! */
#ifndef CONFIG_COMMON_CLK
+#ifndef CONFIG_ARCH_TEGRA
int clk_enable(struct clk *clk)
{
return 0;
@@ -25,3 +26,4 @@ void clk_disable(struct clk *clk)
}
EXPORT_SYMBOL_GPL(clk_disable);
#endif
+#endif
diff --git a/compat/compat-3.7.c b/compat/compat-3.7.c
index a70709c..528d7ec 100644
--- a/compat/compat-3.7.c
+++ b/compat/compat-3.7.c
@@ -49,10 +49,11 @@ static inline u16 pcie_flags_reg(struct pci_dev *dev)
}
#define pci_pcie_type LINUX_BACKPORT(pci_pcie_type)
-static inline int pci_pcie_type(struct pci_dev *dev)
+int pci_pcie_type(struct pci_dev *dev)
{
return (pcie_flags_reg(dev) & PCI_EXP_FLAGS_TYPE) >> 4;
}
+EXPORT_SYMBOL_GPL(pci_pcie_type);
#define pcie_cap_version LINUX_BACKPORT(pcie_cap_version)
static inline int pcie_cap_version(struct pci_dev *dev)
diff --git a/compat/compat-3.8.c b/compat/compat-3.8.c
index ff9cd49..21686cc 100644
--- a/compat/compat-3.8.c
+++ b/compat/compat-3.8.c
@@ -356,6 +356,8 @@ bool hid_ignore(struct hid_device *hdev)
}
EXPORT_SYMBOL_GPL(hid_ignore);
+/* backported to our kernel */
+#if 0
/**
* prandom_bytes - get the requested number of pseudo-random bytes
* @buf: where to copy the pseudo-random bytes to
@@ -386,6 +388,7 @@ void prandom_bytes(void *buf, int bytes)
}
}
EXPORT_SYMBOL_GPL(prandom_bytes);
+#endif
#ifdef CONFIG_OF
/**
diff --git a/compat/verification/x509_public_key.c b/compat/verification/x509_public_key.c
index 4c67487..2f513c1 100644
--- a/compat/verification/x509_public_key.c
+++ b/compat/verification/x509_public_key.c
@@ -10,6 +10,9 @@
*/
#define pr_fmt(fmt) "X.509: "fmt
+#if LINUX_VERSION_IS_LESS(3,17,0)
+#include <linux/err.h>
+#endif
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>