diff options
author | Luis R. Rodriguez <mcgrof@kernel.org> | 2017-11-20 10:23:55 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-29 11:18:43 +0100 |
commit | 942e743b73d0effc65895e4361b04534e24106cb (patch) | |
tree | 120a6be438389126fb40d29667776f684c9af1b8 /drivers/base | |
parent | 33a5b18de2f5cac6de9b86e137cce2bbf02560d5 (diff) | |
download | op-kernel-dev-942e743b73d0effc65895e4361b04534e24106cb.zip op-kernel-dev-942e743b73d0effc65895e4361b04534e24106cb.tar.gz |
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.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index dcc1281..4f64410 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 |