Commit 6a2c1234 authored by Ming Lei's avatar Ming Lei Committed by Greg Kroah-Hartman

firmware loader: fix another compile warning with PM_SLEEP unset

This patch fixes another compiling warning with PM_SLEEP unset:

drivers/base/firmware_class.c:221:29: warning: 'fw_lookup_buf' defined
but not used [-Wunused-function]

This time I do build kernel with both PM_SLEEP set and unset, and no
warning found any more with the patch.
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarMing Lei <ming.lei@canonical.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4bb16672
...@@ -218,18 +218,6 @@ static int fw_lookup_and_allocate_buf(const char *fw_name, ...@@ -218,18 +218,6 @@ static int fw_lookup_and_allocate_buf(const char *fw_name,
return tmp ? 0 : -ENOMEM; return tmp ? 0 : -ENOMEM;
} }
static struct firmware_buf *fw_lookup_buf(const char *fw_name)
{
struct firmware_buf *tmp;
struct firmware_cache *fwc = &fw_cache;
spin_lock(&fwc->lock);
tmp = __fw_lookup_buf(fw_name);
spin_unlock(&fwc->lock);
return tmp;
}
static void __fw_free_buf(struct kref *ref) static void __fw_free_buf(struct kref *ref)
{ {
struct firmware_buf *buf = to_fwbuf(ref); struct firmware_buf *buf = to_fwbuf(ref);
...@@ -1280,6 +1268,18 @@ static int cache_firmware(const char *fw_name) ...@@ -1280,6 +1268,18 @@ static int cache_firmware(const char *fw_name)
return ret; return ret;
} }
static struct firmware_buf *fw_lookup_buf(const char *fw_name)
{
struct firmware_buf *tmp;
struct firmware_cache *fwc = &fw_cache;
spin_lock(&fwc->lock);
tmp = __fw_lookup_buf(fw_name);
spin_unlock(&fwc->lock);
return tmp;
}
/** /**
* uncache_firmware - remove one cached firmware image * uncache_firmware - remove one cached firmware image
* @fw_name: the firmware image name * @fw_name: the firmware image name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment