All of lore.kernel.org
 help / color / mirror / Atom feed
From: <gregkh@suse.de>
To: James.Bottomley@HansenPartnership.com, djwong@us.ibm.com,
	greg@kroah.com, gregkh@suse.de, linux-scsi@vger.kernel.org,
	randy.dunlap@oracle.com
Subject: patch firmware-provide-stubs-for-the-fw_loader-n-case.patch added to gregkh-2.6 tree
Date: Fri, 07 Mar 2008 09:08:40 -0800	[thread overview]
Message-ID: <1204909720886@kroah.org> (raw)
In-Reply-To: <1204901874.2889.3.camel@localhost.localdomain>


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@HansenPartnership.com  Fri Mar  7 08:30:11 2008
From: James Bottomley <James.Bottomley@HansenPartnership.com>
Date: Fri, 07 Mar 2008 08:57:54 -0600
Subject: firmware: provide stubs for the FW_LOADER=n case
To: Greg KH <greg@kroah.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>, "Darrick J. Wong" <djwong@us.ibm.com>, linux-next@vger.kernel.org, scsi <linux-scsi@vger.kernel.org>
Message-ID: <1204901874.2889.3.camel@localhost.localdomain>


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@HansenPartnership.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 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@HansenPartnership.com 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

      reply	other threads:[~2008-03-07 17:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-06 17:09 next-2008-0306 scsi/libsas build failure Randy Dunlap
2008-03-06 18:16 ` Greg KH
2008-03-06 18:22   ` Randy Dunlap
2008-03-06 21:01     ` Darrick J. Wong
2008-03-06 21:02     ` [PATCH] libsas: Check that the firmware loader is present in sas_request_addr Darrick J. Wong
2008-03-06 21:17       ` James Bottomley
2008-03-06 21:20         ` Randy Dunlap
2008-03-06 22:04         ` Randy Dunlap
2008-03-06 22:16           ` James Bottomley
2008-03-07  4:54             ` Greg KH
2008-03-07 14:57               ` [PATCH] firmware: provide stubs for the FW_LOADER=n case James Bottomley
2008-03-07 17:08                 ` gregkh [this message]

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=1204909720886@kroah.org \
    --to=gregkh@suse.de \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=djwong@us.ibm.com \
    --cc=greg@kroah.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.