[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190405201437.3689-1-madhumithabiw@gmail.com>
Date: Fri, 5 Apr 2019 15:14:37 -0500
From: Madhumitha Prabakaran <madhumithabiw@...il.com>
To: johan@...nel.org, elder@...nel.org, gregkh@...uxfoundation.org,
greybus-dev@...ts.linaro.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Cc: Madhumitha Prabakaran <madhumithabiw@...il.com>
Subject: [PATCH] Staging: greybus: Cleanup in header file control.h
Fix a blank line after function/struct/union/enum
declarations. Also, convert to_gb_control() macro into an inline
function in order to maintain Linux kernel coding style based
on which the inline function is preferable over the macro.
Signed-off-by: Madhumitha Prabakaran <madhumithabiw@...il.com>
---
drivers/staging/greybus/control.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/greybus/control.h b/drivers/staging/greybus/control.h
index 3a29ec05f631..a681ef74e7fe 100644
--- a/drivers/staging/greybus/control.h
+++ b/drivers/staging/greybus/control.h
@@ -24,7 +24,11 @@ struct gb_control {
char *vendor_string;
char *product_string;
};
-#define to_gb_control(d) container_of(d, struct gb_control, dev)
+
+static inline struct gb_control *to_gb_control(struct device *d)
+{
+ return container_of(d, struct gb_control, dev);
+}
struct gb_control *gb_control_create(struct gb_interface *intf);
int gb_control_enable(struct gb_control *control);
--
2.17.1
Powered by blists - more mailing lists