Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp92408ybv; Wed, 5 Feb 2020 01:49:44 -0800 (PST) X-Google-Smtp-Source: APXvYqxLKZf6MINgBUmnb3oR51ffVUUsZQkWI8IXmJL8pIt12ZnfcIA0TvN6Wnv+1bDGr+6C7QDW X-Received: by 2002:aca:c7ca:: with SMTP id x193mr2272473oif.70.1580896184860; Wed, 05 Feb 2020 01:49:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580896184; cv=none; d=google.com; s=arc-20160816; b=zQs8FrALzcWf1TUKB9GRg17s81oLiyOmBH+Yf0jwxslwWGFUk50PKzkruuVHlG6Xte b3vDmwvo4vMBFnk/0Q9UbVqxPx/6GJrQ2adm+VkZKqS6NP+t40Mi4ySjLk4M4M7SC72+ t8+xruVbnzE2IHKkvAhJR4RX8VQTvVFYNaG5LquVVGJhX2lXNcDVfP6I6Gf9MvXuIskH oKdLS8W24LwO41zjNTcZtkmwROl4EgrrDH6orq1DvvD8ixGMOc3WbRjLQQsZfIMFcH8K jzMdxvuLAcAURQNdQp7d1HFP8QGIzYUMeE45iI9PnfC68ro0crQfBN4cTvMQCVUOpZfg ERJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=k6jOdutuFsV6dvWErqDuhG/Gn13nzaz3kC8SKL3w4aA=; b=a7A+Z7dbVecL87mE2AVwNPMcLrQggrlaDq4BXUcbkIRjmkd9IvKEAw54ff1prEDDbB 98lwaTaP2tK2//MO5/82JiRJO/f1V/L/fpUDlDsdccYB7+Obd8zaIyawq0gQqEyFvuMU K0CfrDfarR9w3Siu7HaC8Q6F+MoAo8F+pSJgwldu7UpVgd00MYBQdQC2I90XyHDPoyEj FODvrndQSK77Z0ZcGwtRTOObgGl3UhNNfYnBMNdEYCqjfAaCTdFLdmV/U7tZWm03dsCx A/T0p6pki4MCkSim5qqNmG92T2sV9F04BxILotuU7aeFGo/PV+QsXIkDQb5BjxrQw7pd xjJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q5si6101228otc.104.2020.02.05.01.49.33; Wed, 05 Feb 2020 01:49:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728211AbgBEJsd (ORCPT + 99 others); Wed, 5 Feb 2020 04:48:33 -0500 Received: from mga09.intel.com ([134.134.136.24]:53956 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728012AbgBEJsc (ORCPT ); Wed, 5 Feb 2020 04:48:32 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Feb 2020 01:48:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,405,1574150400"; d="scan'208";a="431808778" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga006.fm.intel.com with ESMTP; 05 Feb 2020 01:48:30 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 5157B17C; Wed, 5 Feb 2020 11:48:29 +0200 (EET) From: Andy Shevchenko To: Enric Balletbo i Serra , Nick Crews , linux-kernel@vger.kernel.org, Daniel Campello Cc: Andy Shevchenko Subject: [PATCH v2] platform/chrome: wilco_ec: Platform data shan't include kernel.h Date: Wed, 5 Feb 2020 11:48:28 +0200 Message-Id: <20200205094828.77940-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- v2: update *.c files (kbuild test robot) drivers/platform/chrome/wilco_ec/properties.c | 3 +++ drivers/platform/chrome/wilco_ec/sysfs.c | 4 ++++ include/linux/platform_data/wilco-ec.h | 8 ++++++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/platform/chrome/wilco_ec/properties.c b/drivers/platform/chrome/wilco_ec/properties.c index e69682c95ea2..a0cbd8bd2851 100644 --- a/drivers/platform/chrome/wilco_ec/properties.c +++ b/drivers/platform/chrome/wilco_ec/properties.c @@ -3,8 +3,11 @@ * Copyright 2019 Google LLC */ +#include +#include #include #include +#include #include /* Operation code; what the EC should do with the property */ diff --git a/drivers/platform/chrome/wilco_ec/sysfs.c b/drivers/platform/chrome/wilco_ec/sysfs.c index f0d174b6bb21..3c587b4054a5 100644 --- a/drivers/platform/chrome/wilco_ec/sysfs.c +++ b/drivers/platform/chrome/wilco_ec/sysfs.c @@ -8,8 +8,12 @@ * See Documentation/ABI/testing/sysfs-platform-wilco-ec for more information. */ +#include +#include #include +#include #include +#include #define CMD_KB_CMOS 0x7C #define SUB_CMD_KB_CMOS_AUTO_ON 0x03 diff --git a/include/linux/platform_data/wilco-ec.h b/include/linux/platform_data/wilco-ec.h index afede15a95bf..25f46a939637 100644 --- a/include/linux/platform_data/wilco-ec.h +++ b/include/linux/platform_data/wilco-ec.h @@ -8,8 +8,8 @@ #ifndef WILCO_EC_H #define WILCO_EC_H -#include -#include +#include +#include /* Message flags for using the mailbox() interface */ #define WILCO_EC_FLAG_NO_RESPONSE BIT(0) /* EC does not respond */ @@ -17,6 +17,10 @@ /* Normal commands have a maximum 32 bytes of data */ #define EC_MAILBOX_DATA_SIZE 32 +struct device; +struct resource; +struct platform_device; + /** * struct wilco_ec_device - Wilco Embedded Controller handle. * @dev: Device handle. -- 2.24.1