summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2021-06-24 10:52:11 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-06-25 09:27:07 +0200
commitc59a74452296765e4d4806b0e6b7ba3b7957e283 (patch)
treefd0f79f020157f25a4e08cc98cf5873224a128a0 /include
parent982f9063b4290d5d44f230cde09f130a9318d3b5 (diff)
downloadbarebox-c59a74452296765e4d4806b0e6b7ba3b7957e283.tar.gz
barebox-c59a74452296765e4d4806b0e6b7ba3b7957e283.tar.xz
firmware: consolidate ifdefs
Instead of having multiple #ifdef CONFIG_FIRMWARE in a single file move the code together inside a single #ifdef. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.barebox.org/20210624085223.14616-7-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/firmware.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/include/firmware.h b/include/firmware.h
index d37098688c..39e84b9ac7 100644
--- a/include/firmware.h
+++ b/include/firmware.h
@@ -29,24 +29,21 @@ int firmwaremgr_register(struct firmware_handler *);
struct firmware_mgr *firmwaremgr_find(const char *);
#ifdef CONFIG_FIRMWARE
struct firmware_mgr *firmwaremgr_find_by_node(struct device_node *np);
+int firmwaremgr_load_file(struct firmware_mgr *, const char *path);
#else
static inline struct firmware_mgr *firmwaremgr_find_by_node(struct device_node *np)
{
return NULL;
}
-#endif
-void firmwaremgr_list_handlers(void);
-
-#ifdef CONFIG_FIRMWARE
-int firmwaremgr_load_file(struct firmware_mgr *, const char *path);
-#else
static inline int firmwaremgr_load_file(struct firmware_mgr *mgr, const char *path)
{
return -ENOSYS;
}
#endif
+void firmwaremgr_list_handlers(void);
+
#define get_builtin_firmware(name, start, size) \
{ \
extern char _fw_##name##_start[]; \