From 84d6642e4d1609562abb421341c9a90c023247a1 Mon Sep 17 00:00:00 2001 From: Dominik Sliwa Date: Tue, 4 Jul 2017 11:53:51 +0200 Subject: backports:fix compilation with toradex kernels Signed-off-by: Dominik Sliwa --- compat/backport-3.18.c | 2 ++ compat/compat-3.5.c | 3 +++ compat/compat-3.6.c | 2 ++ compat/compat-3.8.c | 3 +++ compat/drivers-base-devcoredump.c | 2 ++ 5 files changed, 12 insertions(+) (limited to 'compat') diff --git a/compat/backport-3.18.c b/compat/backport-3.18.c index dbef343..00c097e 100644 --- a/compat/backport-3.18.c +++ b/compat/backport-3.18.c @@ -178,9 +178,11 @@ void skb_complete_wifi_ack(struct sk_buff *skb, bool acked) struct sock_exterr_skb *serr; int err; +#if LINUX_VERSION_IS_GEQ(3,3,0) #if LINUX_VERSION_IS_GEQ(3,3,0) skb->wifi_acked_valid = 1; skb->wifi_acked = acked; +#endif #endif serr = SKB_EXT_ERR(skb); diff --git a/compat/compat-3.5.c b/compat/compat-3.5.c index de31228..8146803 100644 --- a/compat/compat-3.5.c +++ b/compat/compat-3.5.c @@ -67,6 +67,8 @@ EXPORT_SYMBOL_GPL(overflowuid); EXPORT_SYMBOL_GPL(overflowgid); #endif +#if 0 +/* backported to all of our kernels */ #if IS_ENABLED(CONFIG_PTP_1588_CLOCK) int ptp_clock_index(struct ptp_clock *ptp) { @@ -74,6 +76,7 @@ int ptp_clock_index(struct ptp_clock *ptp) } EXPORT_SYMBOL(ptp_clock_index); #endif /* CONFIG_PTP_1588_CLOCK */ +#endif #ifdef CONFIG_GPIOLIB static void devm_gpio_release(struct device *dev, void *res) 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.8.c b/compat/compat-3.8.c index ff9cd49..a457fdf 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); +#if 0 +/* backported to our kernel */ /** * 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/drivers-base-devcoredump.c b/compat/drivers-base-devcoredump.c index 0c7b7d3..27be55a 100644 --- a/compat/drivers-base-devcoredump.c +++ b/compat/drivers-base-devcoredump.c @@ -184,7 +184,9 @@ static struct class devcd_class = { #if LINUX_VERSION_IS_GEQ(3,11,0) .dev_groups = devcd_dev_groups, #endif +#if LINUX_VERSION_IS_GEQ(4,10,0) .class_groups = devcd_class_groups, +#endif }; static ssize_t devcd_readv(char *buffer, loff_t offset, size_t count, -- cgit v1.2.3