public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ming Lei <ming.lei@canonical.com>, Takashi Iwai <tiwai@suse.de>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH] driver core: firmware loader: fix build error
Date: Tue, 04 Jun 2013 13:53:02 +0200	[thread overview]
Message-ID: <1563703.RysIHVehbx@wuerfel> (raw)

Patch af5bc11e9 "driver core: firmware loader: kill FW_ACTION_NOHOTPLUG
requests before suspend" caused a regression for the case where
CONFIG_FW_LOADER_USER_HELPER is not enabled, because it adds
references to code that is not available in that configuration:

drivers/base/firmware_class.c: In function 'kill_requests_without_uevent':
drivers/base/firmware_class.c:1424:49: error: 'struct firmware_buf' has no member named 'pending_list'
  list_for_each_entry_safe(buf, next, &pending_fw_head, pending_list) {
drivers/base/firmware_class.c:1426:5: error: implicit declaration of function 'fw_load_abort' [-Werror=implicit-function-declaration]

This fixes the build error by making the new code conditional
as well. Found using ARM ape6evm_defconfig on today's linux-next.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Ming Lei <ming.lei@canonical.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index c415043..6cca468 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -1417,6 +1417,7 @@ static void __device_uncache_fw_images(void)
 /* kill pending requests without uevent to avoid blocking suspend */
 static void kill_requests_without_uevent(void)
 {
+#ifdef CONFIG_FW_LOADER_USER_HELPER
 	struct firmware_buf *buf;
 	struct firmware_buf *next;
 
@@ -1426,6 +1427,7 @@ static void kill_requests_without_uevent(void)
 			 fw_load_abort(buf);
 	}
 	mutex_unlock(&fw_lock);
+#endif
 }
 
 /**


             reply	other threads:[~2013-06-04 11:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-04 11:53 Arnd Bergmann [this message]
2013-06-04 13:44 ` [PATCH] driver core: firmware loader: fix build error 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=1563703.RysIHVehbx@wuerfel \
    --to=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@canonical.com \
    --cc=tiwai@suse.de \
    /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