aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel
diff options
context:
space:
mode:
authorAnsuel Smith <ansuelsmth@gmail.com>2021-07-19 17:58:00 +0200
committerPetr Štetiar <ynezz@true.cz>2021-07-19 19:10:18 +0200
commit853e8465a7af2a13fa2ebf0354cce091ab63d44b (patch)
treeb2d7f6d1895b3d42671203afd1ac2689588b7788 /package/kernel
parent32adbfc789f6113fa6a297de71d36df32fcb8324 (diff)
downloadupstream-853e8465a7af2a13fa2ebf0354cce091ab63d44b.tar.gz
upstream-853e8465a7af2a13fa2ebf0354cce091ab63d44b.tar.bz2
upstream-853e8465a7af2a13fa2ebf0354cce091ab63d44b.zip
ath10k: fix compilation error with CONFIG_OF not available
of_platform_device_create require CONFIG_OF selected. Add an ifdef and register to the of platform only if of is available. Fixes: 985954ccbd11 ("kernel: add ath10k support for of_get_mac_address") Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Diffstat (limited to 'package/kernel')
-rw-r--r--package/kernel/ath10k-ct/patches/203-ath10k-Try-to-get-mac-address-from-dts.patch4
-rw-r--r--package/kernel/mac80211/patches/ath/984-ath10k-Try-to-get-mac-address-from-dts.patch4
2 files changed, 6 insertions, 2 deletions
diff --git a/package/kernel/ath10k-ct/patches/203-ath10k-Try-to-get-mac-address-from-dts.patch b/package/kernel/ath10k-ct/patches/203-ath10k-Try-to-get-mac-address-from-dts.patch
index dbaef20b98..b5c53baf67 100644
--- a/package/kernel/ath10k-ct/patches/203-ath10k-Try-to-get-mac-address-from-dts.patch
+++ b/package/kernel/ath10k-ct/patches/203-ath10k-Try-to-get-mac-address-from-dts.patch
@@ -30,15 +30,17 @@ index 5f4e12196..9ed7b9883 100644
#include <linux/property.h>
#include <linux/dmi.h>
#include <linux/ctype.h>
-@@ -2961,8 +2963,12 @@ EXPORT_SYMBOL(ath10k_core_stop);
+@@ -2961,8 +2963,14 @@ EXPORT_SYMBOL(ath10k_core_stop);
static int ath10k_core_probe_fw(struct ath10k *ar)
{
struct bmi_target_info target_info;
+ const char *mac;
int ret = 0;
++#ifdef CONFIG_OF
+ /* register the platform to be found by the of api */
+ of_platform_device_create(ar->dev->of_node, NULL, NULL);
++#endif
+
ret = ath10k_hif_power_up(ar, ATH10K_FIRMWARE_MODE_NORMAL);
if (ret) {
diff --git a/package/kernel/mac80211/patches/ath/984-ath10k-Try-to-get-mac-address-from-dts.patch b/package/kernel/mac80211/patches/ath/984-ath10k-Try-to-get-mac-address-from-dts.patch
index 94eac3fa4a..d0eb43fdea 100644
--- a/package/kernel/mac80211/patches/ath/984-ath10k-Try-to-get-mac-address-from-dts.patch
+++ b/package/kernel/mac80211/patches/ath/984-ath10k-Try-to-get-mac-address-from-dts.patch
@@ -30,15 +30,17 @@ index 5f4e12196..9ed7b9883 100644
#include <linux/property.h>
#include <linux/dmi.h>
#include <linux/ctype.h>
-@@ -2961,8 +2963,12 @@ EXPORT_SYMBOL(ath10k_core_stop);
+@@ -2961,8 +2963,14 @@ EXPORT_SYMBOL(ath10k_core_stop);
static int ath10k_core_probe_fw(struct ath10k *ar)
{
struct bmi_target_info target_info;
+ const char *mac;
int ret = 0;
++#ifdef CONFIG_OF
+ /* register the platform to be found by the of api */
+ of_platform_device_create(ar->dev->of_node, NULL, NULL);
++#endif
+
ret = ath10k_hif_power_up(ar, ATH10K_FIRMWARE_MODE_NORMAL);
if (ret) {