summaryrefslogtreecommitdiffstats
path: root/include/linux/firmware.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-06-04 17:48:15 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-08 15:24:39 -0700
commit5a1379e8748a5cfa3eb068f812d61bde849ef76c (patch)
treeefc293b5fb2e124d485eb329a37685a20b14150b /include/linux/firmware.h
parent3c3b177a9369b26890ced004867fb32708e8ef5b (diff)
downloadlinux-5a1379e8748a5cfa3eb068f812d61bde849ef76c.tar.gz
linux-5a1379e8748a5cfa3eb068f812d61bde849ef76c.tar.bz2
linux-5a1379e8748a5cfa3eb068f812d61bde849ef76c.zip
firmware loader: allow disabling of udev as firmware loader
[The patch was originally proposed by Tom Gundersen, and rewritten afterwards by me; most of changelogs below borrowed from Tom's original patch -- tiwai] Currently (at least) the dell-rbu driver selects FW_LOADER_USER_HELPER, which means that distros can't really stop loading firmware through udev without breaking other users (though some have). Ideally we would remove/disable the udev firmware helper in both the kernel and in udev, but if we were to disable it in udev and not the kernel, the result would be (seemingly) hung kernels as no one would be around to cancel firmware requests. This patch allows udev firmware loading to be disabled while still allowing non-udev firmware loading, as done by the dell-rbu driver, to continue working. This is achieved by only using the fallback mechanism when the uevent is suppressed. The patch renames the user-selectable Kconfig from FW_LOADER_USER_HELPER to FW_LOADER_USER_HELPER_FALLBACK, and the former is reverse-selected by the latter or the drivers that need userhelper like dell-rbu. Also, the "default y" is removed together with this change, since it's been deprecated in udev upstream, thus rather better to disable it nowadays. Tested with FW_LOADER_USER_HELPER=n LATTICE_ECP3_CONFIG=y DELL_RBU=y and udev without the firmware loading support, but I don't have the hardware to test the lattice/dell drivers, so additional testing would be appreciated. Reviewed-by: Tom Gundersen <teg@jklm.no> Cc: Ming Lei <ming.lei@canonical.com> Cc: Abhay Salunke <Abhay_Salunke@dell.com> Cc: Stefan Roese <sr@denx.de> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Kay Sievers <kay@vrfy.org> Tested-by: Balaji Singh <B_B_Singh@DELL.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/firmware.h')
-rw-r--r--include/linux/firmware.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/firmware.h b/include/linux/firmware.h
index 59529330efd6..67e5b801af0c 100644
--- a/include/linux/firmware.h
+++ b/include/linux/firmware.h
@@ -68,7 +68,7 @@ static inline void release_firmware(const struct firmware *fw)
#endif
-#ifdef CONFIG_FW_LOADER_USER_HELPER
+#ifdef CONFIG_FW_LOADER_USER_HELPER_FALLBACK
int request_firmware_direct(const struct firmware **fw, const char *name,
struct device *device);
#else