Skip to content

Commit 8673e94

Browse files
andy-shevEnric Balletbo i Serra
authored andcommitted
platform/chrome: wilco_ec: Platform data shouldn't include kernel.h
Replace with appropriate types.h. Also there is no need to include device.h, but mutex.h. For the pointers to unknown structures use forward declarations. In the *.c files we need to include all headers that provide APIs being used in the module. Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]>
1 parent 2b63eb9 commit 8673e94

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

drivers/platform/chrome/wilco_ec/properties.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
* Copyright 2019 Google LLC
44
*/
55

6+
#include <linux/errno.h>
7+
#include <linux/export.h>
68
#include <linux/platform_data/wilco-ec.h>
79
#include <linux/string.h>
10+
#include <linux/types.h>
811
#include <asm/unaligned.h>
912

1013
/* Operation code; what the EC should do with the property */

drivers/platform/chrome/wilco_ec/sysfs.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@
88
* See Documentation/ABI/testing/sysfs-platform-wilco-ec for more information.
99
*/
1010

11+
#include <linux/device.h>
12+
#include <linux/kernel.h>
1113
#include <linux/platform_data/wilco-ec.h>
14+
#include <linux/string.h>
1215
#include <linux/sysfs.h>
16+
#include <linux/types.h>
1317

1418
#define CMD_KB_CMOS 0x7C
1519
#define SUB_CMD_KB_CMOS_AUTO_ON 0x03

include/linux/platform_data/wilco-ec.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,19 @@
88
#ifndef WILCO_EC_H
99
#define WILCO_EC_H
1010

11-
#include <linux/device.h>
12-
#include <linux/kernel.h>
11+
#include <linux/mutex.h>
12+
#include <linux/types.h>
1313

1414
/* Message flags for using the mailbox() interface */
1515
#define WILCO_EC_FLAG_NO_RESPONSE BIT(0) /* EC does not respond */
1616

1717
/* Normal commands have a maximum 32 bytes of data */
1818
#define EC_MAILBOX_DATA_SIZE 32
1919

20+
struct device;
21+
struct resource;
22+
struct platform_device;
23+
2024
/**
2125
* struct wilco_ec_device - Wilco Embedded Controller handle.
2226
* @dev: Device handle.

0 commit comments

Comments
 (0)