From: Dan Murphy <dmurphy@ti.com>
To: <jacek.anaszewski@gmail.com>, <pavel@ucw.cz>
Cc: <linux-leds@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Dan Murphy <dmurphy@ti.com>
Subject: [PATCH 2/5] leds: flash: Convert non extended registration to inline
Date: Tue, 1 Oct 2019 13:04:36 -0500 [thread overview]
Message-ID: <20191001180439.8312-2-dmurphy@ti.com> (raw)
In-Reply-To: <20191001180439.8312-1-dmurphy@ti.com>
Convert the #define non-extended registration API to an
inline function.
Signed-off-by: Dan Murphy <dmurphy@ti.com>
---
include/linux/led-class-flash.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/linux/led-class-flash.h b/include/linux/led-class-flash.h
index 1e824963af17..7ff287a9e2a2 100644
--- a/include/linux/led-class-flash.h
+++ b/include/linux/led-class-flash.h
@@ -98,8 +98,11 @@ extern int led_classdev_flash_register_ext(struct device *parent,
struct led_classdev_flash *fled_cdev,
struct led_init_data *init_data);
-#define led_classdev_flash_register(parent, fled_cdev) \
- led_classdev_flash_register_ext(parent, fled_cdev, NULL)
+static inline int led_classdev_flash_register(struct device *parent,
+ struct led_classdev_flash *fled_cdev)
+{
+ return led_classdev_flash_register_ext(parent, fled_cdev, NULL);
+}
/**
* led_classdev_flash_unregister - unregisters an object of led_classdev class
--
2.22.0.214.g8dca754b1e
next prev parent reply other threads:[~2019-10-01 18:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-01 18:04 [PATCH 1/5] leds: Kconfig: Be consistent with the usage of "LED" Dan Murphy
2019-10-01 18:04 ` Dan Murphy [this message]
2019-10-01 18:04 ` [PATCH 3/5] leds: flash: Remove extern from the header file Dan Murphy
2019-10-01 20:57 ` Jacek Anaszewski
2019-10-02 11:56 ` Dan Murphy
2019-10-02 19:53 ` Jacek Anaszewski
2019-10-01 18:04 ` [PATCH 4/5] leds: flash: Add devm_* functions to the flash class Dan Murphy
2019-10-01 21:06 ` Jacek Anaszewski
2019-10-01 21:10 ` Jacek Anaszewski
2019-10-02 12:04 ` Dan Murphy
2019-10-02 19:55 ` Jacek Anaszewski
2019-10-01 18:04 ` [PATCH 5/5] leds: lm3601x: Convert class registration to device managed Dan Murphy
2019-10-01 19:39 ` Jacek Anaszewski
2019-10-01 20:11 ` Dan Murphy
2019-10-01 21:16 ` [PATCH 1/5] leds: Kconfig: Be consistent with the usage of "LED" Jacek Anaszewski
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=20191001180439.8312-2-dmurphy@ti.com \
--to=dmurphy@ti.com \
--cc=jacek.anaszewski@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
/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;
as well as URLs for NNTP newsgroup(s).