From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: linux-input@vger.kernel.org, Fabio Estevam <fabio.estevam@freescale.com>
Subject: Re: [PATCH] Input: ads7846 - Use IS_ENABLED() macro
Date: Sun, 1 Dec 2013 22:12:39 -0800 [thread overview]
Message-ID: <20131202061239.GA21404@core.coreip.homeip.net> (raw)
In-Reply-To: <1385951651-19605-1-git-send-email-festevam@gmail.com>
On Mon, Dec 02, 2013 at 12:34:11AM -0200, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Using the IS_ENABLED() macro can make the code shorter and simpler
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Applied, thank you.
> ---
> drivers/input/touchscreen/ads7846.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
> index ea19536..5695786 100644
> --- a/drivers/input/touchscreen/ads7846.c
> +++ b/drivers/input/touchscreen/ads7846.c
> @@ -101,7 +101,7 @@ struct ads7846 {
> struct spi_device *spi;
> struct regulator *reg;
>
> -#if defined(CONFIG_HWMON) || defined(CONFIG_HWMON_MODULE)
> +#if IS_ENABLED(CONFIG_HWMON)
> struct attribute_group *attr_group;
> struct device *hwmon;
> #endif
> @@ -421,7 +421,7 @@ static int ads7845_read12_ser(struct device *dev, unsigned command)
> return status;
> }
>
> -#if defined(CONFIG_HWMON) || defined(CONFIG_HWMON_MODULE)
> +#if IS_ENABLED(CONFIG_HWMON)
>
> #define SHOW(name, var, adjust) static ssize_t \
> name ## _show(struct device *dev, struct device_attribute *attr, char *buf) \
> --
> 1.8.1.2
>
--
Dmitry
prev parent reply other threads:[~2013-12-02 6:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-02 2:34 [PATCH] Input: ads7846 - Use IS_ENABLED() macro Fabio Estevam
2013-12-02 6:12 ` Dmitry Torokhov [this message]
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=20131202061239.GA21404@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=fabio.estevam@freescale.com \
--cc=festevam@gmail.com \
--cc=linux-input@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;
as well as URLs for NNTP newsgroup(s).