lkml.org 
[lkml]   [2016]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] fpga-manager: Replaced macro with static inline function
Date
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
---
include/linux/fpga/fpga-mgr.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/linux/fpga/fpga-mgr.h b/include/linux/fpga/fpga-mgr.h
index 0940bf4..8064f1b 100644
--- a/include/linux/fpga/fpga-mgr.h
+++ b/include/linux/fpga/fpga-mgr.h
@@ -107,7 +107,10 @@ struct fpga_manager {
void *priv;
};

-#define to_fpga_manager(d) container_of(d, struct fpga_manager, dev)
+static inline struct fpga_manager *to_fpga_manager(struct device *d)
+{
+ return container_of(d, struct fpga_manager, dev);
+}

int fpga_mgr_buf_load(struct fpga_manager *mgr, u32 flags,
const char *buf, size_t count);
--
2.4.3
\
 
 \ /
  Last update: 2016-03-01 19:21    [W:0.046 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site