From: Solomon Peachy <pizza@shaftnet.org>
To: linux-kernel@vger.kernel.org
Cc: Solomon Peachy <pizza@shaftnet.org>, stable@vger.kernel.org
Subject: [PATCH] [firmware_class] Fix compile with no builtin firmware
Date: Tue, 20 Nov 2012 09:45:14 -0500 [thread overview]
Message-ID: <1353422714-18327-1-git-send-email-pizza@shaftnet.org> (raw)
When compiling the firmware loader, the builtin firmware functions were
erroneously compiled as they were wrapped with CONFIG_FW_LOADER instead
of CONFIG_FIRMWARE_IN_KERNEL. This is normally harmless, except when
there was actually no firmware to compile into the kernel, causing the
build to fail with a linking error:
drivers/built-in.o: In function `release_firmware':
(.text+0x192e2): undefined reference to `__end_builtin_fw'
drivers/built-in.o: In function `release_firmware':
(.text+0x19304): undefined reference to `__end_builtin_fw'
drivers/built-in.o: In function `_request_firmware':
firmware_class.c:(.text+0x1986c): undefined reference to `__end_builtin_fw'
firmware_class.c:(.text+0x19886): undefined reference to `__end_builtin_fw'
firmware_class.c:(.text+0x19a98): undefined reference to `__end_builtin_fw'
drivers/built-in.o: In function `release_firmware':
(.text+0x192dc): undefined reference to `__start_builtin_fw'
drivers/built-in.o: In function `_request_firmware':
firmware_class.c:(.text+0x19860): undefined reference to `__start_builtin_fw'
firmware_class.c:(.text+0x19a8a): undefined reference to `__start_builtin_fw'
This trivial patch fixes this oversight.
Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
CC: stable@vger.kernel.org
---
drivers/base/firmware_class.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 8945f4e..3474e7f 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -38,7 +38,7 @@ MODULE_LICENSE("GPL");
/* Builtin firmware support */
-#ifdef CONFIG_FW_LOADER
+#ifdef CONFIG_FIRMWARE_IN_KERNEL
extern struct builtin_fw __start_builtin_fw[];
extern struct builtin_fw __end_builtin_fw[];
--
1.7.11.7
next reply other threads:[~2012-11-20 14:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-20 14:45 Solomon Peachy [this message]
2012-11-20 16:01 ` Ming Lei
2012-11-20 16:10 ` Solomon Peachy
2012-11-20 16:33 ` Greg KH
2012-11-20 18:12 ` Solomon Peachy
2012-11-21 1:35 ` Ming Lei
2012-11-21 14:01 ` Solomon Peachy
2012-11-22 1:45 ` Ming Lei
2012-11-22 2:15 ` Solomon Peachy
2012-11-22 2:42 ` Ming Lei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1353422714-18327-1-git-send-email-pizza@shaftnet.org \
--to=pizza@shaftnet.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®