diff options
| author | Ming Lei <ming.lei@canonical.com> | 2013-06-25 21:28:17 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-26 00:04:22 -0400 |
| commit | 6a2c123427ffece4174db0792c3009e7df770d9a (patch) | |
| tree | ae04cf59437d44f6d8b72f810b0fd534735f99a7 | |
| parent | 4bb1667255a86360721291fe59991d033bbc2f2a (diff) | |
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: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/base/firmware_class.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 2b91b1151373..a439602ea919 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c | |||
| @@ -218,18 +218,6 @@ static int fw_lookup_and_allocate_buf(const char *fw_name, | |||
| 218 | return tmp ? 0 : -ENOMEM; | 218 | return tmp ? 0 : -ENOMEM; |
| 219 | } | 219 | } |
| 220 | 220 | ||
| 221 | static struct firmware_buf *fw_lookup_buf(const char *fw_name) | ||
| 222 | { | ||
| 223 | struct firmware_buf *tmp; | ||
| 224 | struct firmware_cache *fwc = &fw_cache; | ||
| 225 | |||
| 226 | spin_lock(&fwc->lock); | ||
| 227 | tmp = __fw_lookup_buf(fw_name); | ||
| 228 | spin_unlock(&fwc->lock); | ||
| 229 | |||
| 230 | return tmp; | ||
| 231 | } | ||
| 232 | |||
| 233 | static void __fw_free_buf(struct kref *ref) | 221 | static void __fw_free_buf(struct kref *ref) |
| 234 | { | 222 | { |
| 235 | struct firmware_buf *buf = to_fwbuf(ref); | 223 | struct firmware_buf *buf = to_fwbuf(ref); |
| @@ -1280,6 +1268,18 @@ static int cache_firmware(const char *fw_name) | |||
| 1280 | return ret; | 1268 | return ret; |
| 1281 | } | 1269 | } |
| 1282 | 1270 | ||
| 1271 | static struct firmware_buf *fw_lookup_buf(const char *fw_name) | ||
| 1272 | { | ||
| 1273 | struct firmware_buf *tmp; | ||
| 1274 | struct firmware_cache *fwc = &fw_cache; | ||
| 1275 | |||
| 1276 | spin_lock(&fwc->lock); | ||
| 1277 | tmp = __fw_lookup_buf(fw_name); | ||
| 1278 | spin_unlock(&fwc->lock); | ||
| 1279 | |||
| 1280 | return tmp; | ||
| 1281 | } | ||
| 1282 | |||
| 1283 | /** | 1283 | /** |
| 1284 | * uncache_firmware - remove one cached firmware image | 1284 | * uncache_firmware - remove one cached firmware image |
| 1285 | * @fw_name: the firmware image name | 1285 | * @fw_name: the firmware image name |
