From: Madhumitha Prabakaran <madhumithabiw@gmail.com>
To: johan@kernel.org, elder@kernel.org, gregkh@linuxfoundation.org,
greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Cc: Madhumitha Prabakaran <madhumithabiw@gmail.com>
Subject: [PATCH] Staging: greybus: Cleanup in header file control.h
Date: Fri, 5 Apr 2019 15:14:37 -0500 [thread overview]
Message-ID: <20190405201437.3689-1-madhumithabiw@gmail.com> (raw)
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@gmail.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
next reply other threads:[~2019-04-05 20:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-05 20:14 Madhumitha Prabakaran [this message]
2019-04-15 13:10 ` [PATCH] Staging: greybus: Cleanup in header file control.h Johan Hovold
2019-04-15 13:33 ` Dan Carpenter
2019-04-15 14:12 ` Johan Hovold
2019-04-15 14:40 ` Dan Carpenter
2019-04-15 15:03 ` Johan Hovold
2019-04-15 16:04 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190405201437.3689-1-madhumithabiw@gmail.com \
--to=madhumithabiw@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox