From 5a0b8cb46624cc17fda676d6ae44fb72504f0ad9 Mon Sep 17 00:00:00 2001 From: Gwendal Grignou Date: Tue, 13 Mar 2018 14:23:28 -0700 Subject: [PATCH] iio: cros_ec: Move cros_ec_sensors_core.h in /include Similar to other common iio frameworks, move cros_ec_sensors_core.h from drivers/iio/common/cros_ec_sensors/ to include/linux/iio/common. Signed-off-by: Gwendal Grignou Signed-off-by: Jonathan Cameron --- drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c | 3 +-- drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c | 3 +-- drivers/iio/light/cros_ec_light_prox.c | 3 +-- drivers/iio/pressure/cros_ec_baro.c | 3 +-- .../linux/iio/common}/cros_ec_sensors_core.h | 3 +++ 5 files changed, 7 insertions(+), 8 deletions(-) rename {drivers/iio/common/cros_ec_sensors => include/linux/iio/common}/cros_ec_sensors_core.h (98%) diff --git a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c b/drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c index 705cb3e72663..89cb0066a6e0 100644 --- a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c +++ b/drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -31,8 +32,6 @@ #include #include -#include "cros_ec_sensors_core.h" - #define CROS_EC_SENSORS_MAX_CHANNELS 4 /* State data for ec_sensors iio driver. */ diff --git a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c b/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c index a620eb5ce202..07863a6226e4 100644 --- a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c +++ b/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -27,8 +28,6 @@ #include #include -#include "cros_ec_sensors_core.h" - static char *cros_ec_loc[] = { [MOTIONSENSE_LOC_BASE] = "base", [MOTIONSENSE_LOC_LID] = "lid", diff --git a/drivers/iio/light/cros_ec_light_prox.c b/drivers/iio/light/cros_ec_light_prox.c index 8e8a0e7f78d1..fd1609e975ab 100644 --- a/drivers/iio/light/cros_ec_light_prox.c +++ b/drivers/iio/light/cros_ec_light_prox.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -29,8 +30,6 @@ #include #include -#include "../common/cros_ec_sensors/cros_ec_sensors_core.h" - /* * We only represent one entry for light or proximity. EC is merging different * light sensors to return the what the eye would see. For proximity, we diff --git a/drivers/iio/pressure/cros_ec_baro.c b/drivers/iio/pressure/cros_ec_baro.c index 4599fde4dd25..87c07af9181f 100644 --- a/drivers/iio/pressure/cros_ec_baro.c +++ b/drivers/iio/pressure/cros_ec_baro.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -28,8 +29,6 @@ #include #include -#include "../common/cros_ec_sensors/cros_ec_sensors_core.h" - /* * One channel for pressure, the other for timestamp. */ diff --git a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.h b/include/linux/iio/common/cros_ec_sensors_core.h similarity index 98% rename from drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.h rename to include/linux/iio/common/cros_ec_sensors_core.h index 2edf68dc7336..ce16445411ac 100644 --- a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.h +++ b/include/linux/iio/common/cros_ec_sensors_core.h @@ -16,7 +16,9 @@ #ifndef __CROS_EC_SENSORS_CORE_H #define __CROS_EC_SENSORS_CORE_H +#include #include +#include enum { CROS_EC_SENSOR_X, @@ -103,6 +105,7 @@ int cros_ec_sensors_read_lpc(struct iio_dev *indio_dev, unsigned long scan_mask, int cros_ec_sensors_read_cmd(struct iio_dev *indio_dev, unsigned long scan_mask, s16 *data); +struct platform_device; /** * cros_ec_sensors_core_init() - basic initialization of the core structure * @pdev: platform device created for the sensors