summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@kernel.org>2017-11-20 19:23:55 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-11-29 11:18:43 +0100
commit942e743b73d0effc65895e4361b04534e24106cb (patch)
tree120a6be438389126fb40d29667776f684c9af1b8 /drivers/base
parentfirmware: rename sysfs state checks with sysfs prefix (diff)
downloadlinux-942e743b73d0effc65895e4361b04534e24106cb.tar.xz
linux-942e743b73d0effc65895e4361b04534e24106cb.zip
firmware: use static inline for to_fw_priv()
This lets us type check the callers. Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/firmware_class.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index dcc1281789e4..4f64410fe7e6 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -125,7 +125,10 @@ struct fw_name_devm {
const char *name;
};
-#define to_fw_priv(d) container_of(d, struct fw_priv, ref)
+static inline struct fw_priv *to_fw_priv(struct kref *ref)
+{
+ return container_of(ref, struct fw_priv, ref);
+}
#define FW_LOADER_NO_CACHE 0
#define FW_LOADER_START_CACHE 1