lkml.org 
[lkml]   [2018]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 1/2] platform/x86: intel-vbtn: Remove redundant inclusions
On Wed, Jan 31, 2018 at 07:54:06PM +0200, Andy Shevchenko wrote:
> Some headers are not needed since the driver can be built as module.
> Remove them.

Removing init because it's included by module.h, and removing acpi_bus.h
because it's included by acpi.h - but not because it can be built as a
module - right? Just checking, the wording in the commit msg seemed odd
to me.

These removals seem appropriate to me, but so we have it recorded here -
in general, including headers that you explicitly make use of is good
practice, and not depending on others to include them. But in this case,
the implicit includes are reasonable expectations as they are tightly
coupled with the parent include.


Reviewed-by: Darren Hart (VMware) <dvhart@infradead.org>


>
> While here, sort headers alphabetically.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/platform/x86/intel-vbtn.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel-vbtn.c
> index 101c100a3929..69bc39f8d61d 100644
> --- a/drivers/platform/x86/intel-vbtn.c
> +++ b/drivers/platform/x86/intel-vbtn.c
> @@ -16,15 +16,13 @@
> *
> */
>
> +#include <linux/acpi.h>
> +#include <linux/input.h>
> +#include <linux/input/sparse-keymap.h>
> #include <linux/kernel.h>
> #include <linux/module.h>
> -#include <linux/init.h>
> -#include <linux/input.h>
> #include <linux/platform_device.h>
> -#include <linux/input/sparse-keymap.h>
> -#include <linux/acpi.h>
> #include <linux/suspend.h>
> -#include <acpi/acpi_bus.h>
>
> /* When NOT in tablet mode, VGBS returns with the flag 0x40 */
> #define TABLET_MODE_FLAG 0x40
> --
> 2.15.1
>
>

--
Darren Hart
VMware Open Source Technology Center

\
 
 \ /
  Last update: 2018-01-31 19:51    [W:0.110 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site