[PATCH v2 09/23] firmware: use static inline for to_fw_priv()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This lets us type check the callers.

Signed-off-by: Luis R. Rodriguez <mcgrof@xxxxxxxxxx>
---
 drivers/base/firmware_class.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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
-- 
2.15.0




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux