This is a note to let you know that I've just added the patch titled Subject: firmware: provide stubs for the FW_LOADER=n case to my gregkh-2.6 tree. Its filename is firmware-provide-stubs-for-the-fw_loader-n-case.patch This tree can be found at http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/ >From James.Bottomley@xxxxxxxxxxxxxxxxxxxxx Fri Mar 7 08:30:11 2008 From: James Bottomley <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> Date: Fri, 07 Mar 2008 08:57:54 -0600 Subject: firmware: provide stubs for the FW_LOADER=n case To: Greg KH <greg@xxxxxxxxx> Cc: Randy Dunlap <randy.dunlap@xxxxxxxxxx>, "Darrick J. Wong" <djwong@xxxxxxxxxx>, linux-next@xxxxxxxxxxxxxxx, scsi <linux-scsi@xxxxxxxxxxxxxxx> Message-ID: <1204901874.2889.3.camel@xxxxxxxxxxxxxxxxxxxxx> libsas has a case where it uses the firmware loader to provide services, but doesn't want to select it all the time. This currently causes a compile failure in libsas if FW_LOADER=n. Fix this by providing error stubs for the firmware loader API in the FW_LOADER=n case. Signed-off-by: James Bottomley <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> Cc: Randy Dunlap <randy.dunlap@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx> --- include/linux/firmware.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) --- a/include/linux/firmware.h +++ b/include/linux/firmware.h @@ -10,7 +10,10 @@ struct firmware { size_t size; u8 *data; }; + struct device; + +#if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE) int request_firmware(const struct firmware **fw, const char *name, struct device *device); int request_firmware_nowait( @@ -19,4 +22,24 @@ int request_firmware_nowait( void (*cont)(const struct firmware *fw, void *context)); void release_firmware(const struct firmware *fw); +#else +static inline int request_firmware(const struct firmware **fw, + const char *name, + struct device *device) +{ + return -EINVAL; +} +static inline int request_firmware_nowait( + struct module *module, int uevent, + const char *name, struct device *device, void *context, + void (*cont)(const struct firmware *fw, void *context)) +{ + return -EINVAL; +} + +static inline void release_firmware(const struct firmware *fw) +{ +} +#endif + #endif Patches currently in gregkh-2.6 which might be from James.Bottomley@xxxxxxxxxxxxxxxxxxxxx are pci/pci-remove-parisc-consumer-of-the-pci-global_list.patch usb/usb-enable-usb-persist-by-default.patch driver-core/firmware-provide-stubs-for-the-fw_loader-n-case.patch -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html