[openwrt/openwrt] kernel: fallback-sprom: create separate header files
LEDE Commits
lede-commits at lists.infradead.org
Sun Dec 8 04:32:49 PST 2024
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/22d2aa65e87130a597e9f9c970bfece4232dba72
commit 22d2aa65e87130a597e9f9c970bfece4232dba72
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Sun Dec 1 19:17:13 2024 +0100
kernel: fallback-sprom: create separate header files
Create a separate header files fallback-sprom.h
for BCMA and SSB Fallback SPROM Driver
to add function prototypes to fallback-sprom.c as well.
This prevents missing function prototype errors.
Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/17138
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
.../generic/files/drivers/bcma/fallback-sprom.c | 1 +
.../generic/files/drivers/bcma/fallback-sprom.h | 7 ++++
.../generic/files/drivers/ssb/fallback-sprom.c | 1 +
.../generic/files/drivers/ssb/fallback-sprom.h | 7 ++++
.../hack-6.6/810-bcma-ssb-fallback-sprom.patch | 41 ++++++++++------------
5 files changed, 34 insertions(+), 23 deletions(-)
diff --git a/target/linux/generic/files/drivers/bcma/fallback-sprom.c b/target/linux/generic/files/drivers/bcma/fallback-sprom.c
index db583fca9c..6932c3c8f5 100644
--- a/target/linux/generic/files/drivers/bcma/fallback-sprom.c
+++ b/target/linux/generic/files/drivers/bcma/fallback-sprom.c
@@ -16,6 +16,7 @@
#include <linux/mtd/mtd.h>
#include <linux/of_net.h>
#include <linux/of_platform.h>
+#include "fallback-sprom.h"
#define BCMA_FBS_MAX_SIZE 468
diff --git a/target/linux/generic/files/drivers/bcma/fallback-sprom.h b/target/linux/generic/files/drivers/bcma/fallback-sprom.h
new file mode 100644
index 0000000000..363663413d
--- /dev/null
+++ b/target/linux/generic/files/drivers/bcma/fallback-sprom.h
@@ -0,0 +1,7 @@
+#ifndef _FALLBACK_SPROM_H
+#define _FALLBACK_SPROM_H
+
+int __init bcma_fbs_register(void);
+int bcma_get_fallback_sprom(struct bcma_bus *dev, struct ssb_sprom *out);
+
+#endif /* _FALLBACK_SPROM_H */
diff --git a/target/linux/generic/files/drivers/ssb/fallback-sprom.c b/target/linux/generic/files/drivers/ssb/fallback-sprom.c
index b8a4dcedcf..9c2511febe 100644
--- a/target/linux/generic/files/drivers/ssb/fallback-sprom.c
+++ b/target/linux/generic/files/drivers/ssb/fallback-sprom.c
@@ -16,6 +16,7 @@
#include <linux/of_net.h>
#include <linux/of_platform.h>
#include <linux/ssb/ssb.h>
+#include "fallback-sprom.h"
#define SSB_FBS_MAX_SIZE 440
diff --git a/target/linux/generic/files/drivers/ssb/fallback-sprom.h b/target/linux/generic/files/drivers/ssb/fallback-sprom.h
new file mode 100644
index 0000000000..3966a18b86
--- /dev/null
+++ b/target/linux/generic/files/drivers/ssb/fallback-sprom.h
@@ -0,0 +1,7 @@
+#ifndef _FALLBACK_SPROM_H
+#define _FALLBACK_SPROM_H
+
+int __init ssb_fbs_register(void);
+int ssb_get_fallback_sprom(struct ssb_bus *dev, struct ssb_sprom *out);
+
+#endif /* _FALLBACK_SPROM_H */
diff --git a/target/linux/generic/hack-6.6/810-bcma-ssb-fallback-sprom.patch b/target/linux/generic/hack-6.6/810-bcma-ssb-fallback-sprom.patch
index a011cf8ffa..08085d957a 100644
--- a/target/linux/generic/hack-6.6/810-bcma-ssb-fallback-sprom.patch
+++ b/target/linux/generic/hack-6.6/810-bcma-ssb-fallback-sprom.patch
@@ -6,15 +6,15 @@ Subject: [PATCH] ssb_sprom: add generic kernel support for Broadcom Fallback SP
---
drivers/bcma/Kconfig | 4 ++++
drivers/bcma/Makefile | 1 +
- drivers/bcma/bcma_private.h | 4 ++++
+ drivers/bcma/bcma_private.h | 1 +
drivers/bcma/main.c | 8 ++++++++
drivers/bcma/sprom.c | 23 ++++++++++++++---------
drivers/ssb/Kconfig | 5 +++++
drivers/ssb/Makefile | 1 +
drivers/ssb/main.c | 8 ++++++++
drivers/ssb/sprom.c | 12 +++++++++++-
- drivers/ssb/ssb_private.h | 4 ++++
- 10 files changed, 60 insertions(+), 10 deletions(-)
+ drivers/ssb/ssb_private.h | 2 +-
+ 10 files changed, 54 insertions(+), 11 deletions(-)
--- a/drivers/bcma/Kconfig
+++ b/drivers/bcma/Kconfig
@@ -41,17 +41,14 @@ Subject: [PATCH] ssb_sprom: add generic kernel support for Broadcom Fallback SP
obj-$(CONFIG_BCMA) += bcma.o
--- a/drivers/bcma/bcma_private.h
+++ b/drivers/bcma/bcma_private.h
-@@ -38,6 +38,10 @@ int bcma_bus_resume(struct bcma_bus *bus
- void bcma_detect_chip(struct bcma_bus *bus);
- int bcma_bus_scan(struct bcma_bus *bus);
+@@ -8,6 +8,7 @@
-+/* fallback-sprom.c */
-+int __init bcma_fbs_register(void);
-+int bcma_get_fallback_sprom(struct bcma_bus *dev, struct ssb_sprom *out);
-+
- /* sprom.c */
- int bcma_sprom_get(struct bcma_bus *bus);
+ #include <linux/bcma/bcma.h>
+ #include <linux/delay.h>
++#include "fallback-sprom.h"
+ #define bcma_err(bus, fmt, ...) \
+ dev_err((bus)->dev, "bus%d: " fmt, (bus)->num, ##__VA_ARGS__)
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -671,6 +671,14 @@ static int __init bcma_modinit(void)
@@ -174,14 +171,12 @@ Subject: [PATCH] ssb_sprom: add generic kernel support for Broadcom Fallback SP
/* https://bcm-v4.sipsolutions.net/802.11/IsSpromAvailable */
--- a/drivers/ssb/ssb_private.h
+++ b/drivers/ssb/ssb_private.h
-@@ -143,6 +143,10 @@ extern int ssb_bus_scan(struct ssb_bus *
- extern void ssb_iounmap(struct ssb_bus *ssb);
-
-
-+/* fallback-sprom.c */
-+int __init ssb_fbs_register(void);
-+int ssb_get_fallback_sprom(struct ssb_bus *dev, struct ssb_sprom *out);
-+
- /* sprom.c */
- extern
- ssize_t ssb_attr_sprom_show(struct ssb_bus *bus, char *buf,
+@@ -8,7 +8,7 @@
+ #include <linux/ssb/ssb.h>
+ #include <linux/types.h>
+ #include <linux/bcm47xx_wdt.h>
+-
++#include "fallback-sprom.h"
+
+ /* pci.c */
+ #ifdef CONFIG_SSB_PCIHOST
More information about the lede-commits
mailing list