Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp1593018imn; Sun, 31 Jul 2022 13:26:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tmyRh54u8/piKRUWT7PS2VhR6D5vtCSLogCr5OoY+RLvv1GKAVNURWAesxladmnLkaP23k X-Received: by 2002:a05:6402:3687:b0:43c:e5d3:d50d with SMTP id ej7-20020a056402368700b0043ce5d3d50dmr13075934edb.174.1659299162744; Sun, 31 Jul 2022 13:26:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659299162; cv=none; d=google.com; s=arc-20160816; b=x3ktQ64kubDoX/15PBSpsHXTZRmII0TPxbMAFS5gpBIfcXbAiHTsBHK51Ho4HHv4m7 AnwAXJdZp3gAHYsaoPZISrZKhZLojOW72sSd0oNoRhXbwrZc5uXMyr6ZTdf0N6I46iR3 4XyZXU5dUljYzCnSkbESab8jWqAe1nQigXLi6UzhAeyFjLHwfHd5J/b0YWYuZ1/5clro ih0z41wmgx+rXm+EbN2Ex98tXDoppnL9hUFPj1ILAK6+q60D9qYDZvTkFVGJID9AZAsl NC6Tc8N6l39mh1ilJbKWuV9dn8+ZkWQHMED0qUw+Kfy7YYwOHtaLq90MWvC4Fg1E/Jfw V+4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9EPtzM2VX8qE7Typ+7YnGpOtLV102ZQqVEW1d/bvSUQ=; b=QZRL9GO55x0wkGx3G0dG24bVvCki5WdU9J8Bs1mHF+Jq7vBeXtmd+0rDMNMfexjret IdUtYB7nA5rf8WFaC56Nen6iAQ+49lpOeNu0IJ5qChWf7bZILOosYg5pVS758n7cq+vs GsCv8m7j8dt3JQkEb9e2vjd7j02P3dCJgMtduD0uNECRofHtOYwcKV2cMTn8DkUWQqAG afBiaTtpzrMKBM3RfEJ5RtgenZZAogC0taVzkU6wZwKSDxyMmO6lxWkFQoDh1ScxLhDQ tWx2TX6mR7tbg+N1eY8bRm8ZU/0+YqhtAOrYibCaZKQJWQzNJ5po/2yPjOM6AuhJr70c M2HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XfMCj9sg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s7-20020a1709060c0700b00726d6cb0258si4758041ejf.263.2022.07.31.13.25.37; Sun, 31 Jul 2022 13:26:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XfMCj9sg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238421AbiGaUNr (ORCPT + 99 others); Sun, 31 Jul 2022 16:13:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230351AbiGaUND (ORCPT ); Sun, 31 Jul 2022 16:13:03 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F9EDEE07 for ; Sun, 31 Jul 2022 13:13:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659298382; x=1690834382; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mSjwg+d6IVWVm+Xe0h2TaAOWoxuqXJl5bodxlLMEj4I=; b=XfMCj9sg7t8Ua/VMQcIcOlaF+YhgnJMvupIwtiHWyACaCMQculzF1U9q q+h3/qN4VSgI4IP6bGIte/pVjyJ1SxQIPjsXPer+vnZS6vdLP5RKON7U2 ZsSGgcv9ce93IIvz+aCYbdRjUZgPt1fhjKc4slzv0mnGmY/noHZ+595nf q4VPYXvR+7vz+cnSGfWlUIrRLfTAd1Q89j6D+BSJd2k2/slk+1GtNyQrE qBSsbmUFV7TTo3lPAsKGSNYNUw2E3EE43Np6XgvUNn151iKuz9Hjdq1qb eerykAYhFHXeM17P9sCB7PZhMfR1rFJor4gJWckb8IeFNijHF2RIApEXi w==; X-IronPort-AV: E=McAfee;i="6400,9594,10425"; a="314841144" X-IronPort-AV: E=Sophos;i="5.93,206,1654585200"; d="scan'208";a="314841144" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jul 2022 13:13:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,206,1654585200"; d="scan'208";a="601824036" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga002.jf.intel.com with ESMTP; 31 Jul 2022 13:13:00 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 7BFFD1DF; Sun, 31 Jul 2022 23:13:08 +0300 (EEST) From: Andy Shevchenko To: Lee Jones , Andy Shevchenko , Hans de Goede , linux-kernel@vger.kernel.org Cc: Lee Jones , Andy Shevchenko Subject: [PATCH v2 07/10] mfd: intel_soc_pmic_crc: Drop redundant ACPI_PTR() and ifdeffery Date: Sun, 31 Jul 2022 23:12:55 +0300 Message-Id: <20220731201258.11262-7-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220731201258.11262-1-andriy.shevchenko@linux.intel.com> References: <20220731201258.11262-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The driver depends on ACPI, ACPI_PTR() resolution is always the same. Otherwise a compiler may produce a warning. That said, the rule of thumb either ugly ifdeffery with ACPI_PTR or none should be used in a driver. Signed-off-by: Andy Shevchenko Tested-by: Hans de Goede Acked-for-MFD-by: Lee Jones --- v2: added tags and rebased on top of new patch 1 drivers/mfd/Kconfig | 4 ++-- drivers/mfd/intel_soc_pmic_crc.c | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index abb58ab1a1a4..60196bdc8a1d 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -589,8 +589,8 @@ config LPC_SCH config INTEL_SOC_PMIC bool "Support for Crystal Cove PMIC" - depends on ACPI && HAS_IOMEM && I2C=y && GPIOLIB && COMMON_CLK - depends on X86 || COMPILE_TEST + depends on HAS_IOMEM && I2C=y && GPIOLIB && COMMON_CLK + depends on (X86 && ACPI) || COMPILE_TEST depends on I2C_DESIGNWARE_PLATFORM=y select MFD_CORE select REGMAP_I2C diff --git a/drivers/mfd/intel_soc_pmic_crc.c b/drivers/mfd/intel_soc_pmic_crc.c index d68ed5b35fd9..17fcb10930f6 100644 --- a/drivers/mfd/intel_soc_pmic_crc.c +++ b/drivers/mfd/intel_soc_pmic_crc.c @@ -8,9 +8,9 @@ * Author: Zhu, Lejun */ -#include #include #include +#include #include #include #include @@ -259,19 +259,17 @@ static const struct i2c_device_id intel_soc_pmic_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, intel_soc_pmic_i2c_id); -#if defined(CONFIG_ACPI) static const struct acpi_device_id intel_soc_pmic_acpi_match[] = { { "INT33FD" }, { }, }; MODULE_DEVICE_TABLE(acpi, intel_soc_pmic_acpi_match); -#endif static struct i2c_driver intel_soc_pmic_i2c_driver = { .driver = { .name = "intel_soc_pmic_i2c", .pm = pm_sleep_ptr(&crystal_cove_pm_ops), - .acpi_match_table = ACPI_PTR(intel_soc_pmic_acpi_match), + .acpi_match_table = intel_soc_pmic_acpi_match, }, .probe = intel_soc_pmic_i2c_probe, .remove = intel_soc_pmic_i2c_remove, -- 2.35.1