From patchwork Wed Mar 28 23:53:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwendal Grignou X-Patchwork-Id: 10314291 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3A73460467 for ; Wed, 28 Mar 2018 23:54:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2967B2A021 for ; Wed, 28 Mar 2018 23:54:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1DB9F2A026; Wed, 28 Mar 2018 23:54:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 016A12A021 for ; Wed, 28 Mar 2018 23:54:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750866AbeC1XyC (ORCPT ); Wed, 28 Mar 2018 19:54:02 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:42267 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750820AbeC1XyB (ORCPT ); Wed, 28 Mar 2018 19:54:01 -0400 Received: by mail-pf0-f193.google.com with SMTP id a16so1937227pfn.9 for ; Wed, 28 Mar 2018 16:54:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=S/DfB2i3XmsbsfnRNtnOm1a9bS33aHNOkcGrH3IOrB0=; b=FTPhqduyzbXl3NeurThNBcjKMDwjkkZqHHJnBMrv8YYC0GZ2QdTuRVzb861KBgi5bY JuZQJFdwme1e2mTaaDmbJChlp05Y/RE6zxzstDDLiu9F9uN+ZDnqTmtMS75/crWNhNrR Q+5yiTN8E3+O4IIYhb1xFZ6NcZlzwtleJn5noGNtXwHM4XH9hvfJOgeUjFh1/pap/0m2 /uxG0osDo9ozjJJ0UQhfwRfrDzPi71I4ONonIUb0MMuwNXxtCcVhXHxOFqPS4+aCIVrG 4GLWtGEQUaQr+GXQfMOdu4mIZrQ3QufoYQkSeid3oO5kmuVW914afb/hce8rDJUOlc40 GEpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=S/DfB2i3XmsbsfnRNtnOm1a9bS33aHNOkcGrH3IOrB0=; b=LEnW/x7FmCV7Z6whb1z5t2KLENr9m35awGxwwU+cl7e856uuoZQWnRKnMwsY4Y+aL2 tSMQcqaYTbLiqZI0s3Bh8k+HmMwvcaAEpVpuESIBxsZaMNq55eU/Nd+GkCKJJ9InbVY6 ebMTG2AEb3MLa+kj33ThboayFZIllf+AqOlJJQ6CUv9tFsq173Z3X2OL4rqp0kX7w8ZO 3n4DTrLlj2Gk2yi4913ImyX2KdlkJAjdt5TgaBtt1UbUtNR3bGKVnYml2GeglTA78DRC ZK7r6r8o37IHSqp6zcE4sSQfvBTX7Vnou75hzClIo8Ornno4G9AnSFGpWSpSYXcsDB96 8wuA== X-Gm-Message-State: AElRT7EbyRm4uFQwx06itZ5vEWi9hqLBKX9EhrR97f1Iaqtje5oPUpOV jqTWRt4kYvv+y5VUfSgADjm8RaAOCKc= X-Google-Smtp-Source: AIpwx4+nf87fJxzSXhWpkpNmsHiTiX6KGCZE4lVMyLXN2qrD4zQTtdatdHXJk1deQSeXQ+1JkKVI+g== X-Received: by 10.98.226.23 with SMTP id a23mr4457821pfi.157.1522281240287; Wed, 28 Mar 2018 16:54:00 -0700 (PDT) Received: from gwendal.mtv.corp.google.com ([172.22.102.126]) by smtp.gmail.com with ESMTPSA id z78sm9421724pfd.23.2018.03.28.16.53.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Mar 2018 16:53:59 -0700 (PDT) From: Gwendal Grignou To: jic23@kernel.org Cc: linux-iio@vger.kernel.org, enric.balletbo@collabora.com Subject: [PATCH v2] iio: cros_ec: Move cros_ec_sensors_core.h in /include Date: Wed, 28 Mar 2018 16:53:49 -0700 Message-Id: <20180328235349.111656-1-gwendal@chromium.org> X-Mailer: git-send-email 2.17.0.rc1.321.gba9d0f2565-goog In-Reply-To: <20180317200003.595e88d5@archlinux> References: <20180317200003.595e88d5@archlinux> Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- Changes in v2: - Include linux/platform_device.h in cros_ec_sensors_core.h 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 7d30c59da3e2..8e3f99a8b30c 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 416cae5ebbd0..ea3268bd92f4 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 acfad4aeb27a..15bd105b08f3 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 8bc2ca3c2e2e..e6b6190ba8af 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,10 @@ #ifndef __CROS_EC_SENSORS_CORE_H #define __CROS_EC_SENSORS_CORE_H +#include #include +#include +#include enum { CROS_EC_SENSOR_X,