All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Woithe <jwoithe@just42.net>
To: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: linux-kernel@vger.kernel.org, Darren Hart <dvhart@infradead.org>,
	platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH] fujitsu-laptop: Use IS_ENABLED() instead of checking for built-in or module
Date: Thu, 28 Apr 2016 09:13:09 +0930	[thread overview]
Message-ID: <20160427234309.GB9930@marvin.atrad.com.au> (raw)
In-Reply-To: <1461709697-4152-1-git-send-email-javier@osg.samsung.com>

On Tue, Apr 26, 2016 at 06:28:17PM -0400, Javier Martinez Canillas wrote:
> The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either
> built-in or as a module, use that macro instead of open coding the same.
> 
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

Acked-by: Jonathan Woithe <jwoithe@just42.net>

> ---
> 
>  drivers/platform/x86/fujitsu-laptop.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
> index 1cb39d00d014..ce41bc34288d 100644
> --- a/drivers/platform/x86/fujitsu-laptop.c
> +++ b/drivers/platform/x86/fujitsu-laptop.c
> @@ -69,7 +69,7 @@
>  #include <linux/kfifo.h>
>  #include <linux/platform_device.h>
>  #include <linux/slab.h>
> -#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
> +#if IS_ENABLED(CONFIG_LEDS_CLASS)
>  #include <linux/leds.h>
>  #endif
>  #include <acpi/video.h>
> @@ -100,7 +100,7 @@
>  /* FUNC interface - responses */
>  #define UNSUPPORTED_CMD 0x80000000
>  
> -#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
> +#if IS_ENABLED(CONFIG_LEDS_CLASS)
>  /* FUNC interface - LED control */
>  #define FUNC_LED_OFF	0x1
>  #define FUNC_LED_ON	0x30001
> @@ -182,7 +182,7 @@ static struct fujitsu_hotkey_t *fujitsu_hotkey;
>  
>  static void acpi_fujitsu_hotkey_notify(struct acpi_device *device, u32 event);
>  
> -#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
> +#if IS_ENABLED(CONFIG_LEDS_CLASS)
>  static enum led_brightness logolamp_get(struct led_classdev *cdev);
>  static void logolamp_set(struct led_classdev *cdev,
>  			       enum led_brightness brightness);
> @@ -261,7 +261,7 @@ static int call_fext_func(int cmd, int arg0, int arg1, int arg2)
>  	return value;
>  }
>  
> -#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
> +#if IS_ENABLED(CONFIG_LEDS_CLASS)
>  /* LED class callbacks */
>  
>  static void logolamp_set(struct led_classdev *cdev,
> @@ -903,7 +903,7 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device)
>  	/* Suspect this is a keymap of the application panel, print it */
>  	pr_info("BTNI: [0x%x]\n", call_fext_func(FUNC_BUTTONS, 0x0, 0x0, 0x0));
>  
> -#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
> +#if IS_ENABLED(CONFIG_LEDS_CLASS)
>  	if (call_fext_func(FUNC_LEDS, 0x0, 0x0, 0x0) & LOGOLAMP_POWERON) {
>  		result = led_classdev_register(&fujitsu->pf_device->dev,
>  						&logolamp_led);
> @@ -963,7 +963,7 @@ static int acpi_fujitsu_hotkey_remove(struct acpi_device *device)
>  	struct fujitsu_hotkey_t *fujitsu_hotkey = acpi_driver_data(device);
>  	struct input_dev *input = fujitsu_hotkey->input;
>  
> -#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
> +#if IS_ENABLED(CONFIG_LEDS_CLASS)
>  	if (fujitsu_hotkey->logolamp_registered)
>  		led_classdev_unregister(&logolamp_led);
>  
> -- 
> 2.5.5

  reply	other threads:[~2016-04-27 23:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-26 22:28 [PATCH] fujitsu-laptop: Use IS_ENABLED() instead of checking for built-in or module Javier Martinez Canillas
2016-04-27 23:43 ` Jonathan Woithe [this message]
2016-05-05 20:53   ` Darren Hart

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=20160427234309.GB9930@marvin.atrad.com.au \
    --to=jwoithe@just42.net \
    --cc=dvhart@infradead.org \
    --cc=javier@osg.samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.