From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Lee Jones <lee.jones@linaro.org>,
Hans de Goede <hdegoede@redhat.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-kernel@vger.kernel.org
Cc: Andy Shevchenko <andy@kernel.org>
Subject: [PATCH v1 6/9] mfd: intel_soc_pmic_crc: Drop redundant ACPI_PTR() and ifdeffery
Date: Thu, 16 Jun 2022 21:25:21 +0300 [thread overview]
Message-ID: <20220616182524.7956-6-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20220616182524.7956-1-andriy.shevchenko@linux.intel.com>
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 <andriy.shevchenko@linux.intel.com>
---
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 3b59456f5545..2bbfeeac6f8e 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -588,8 +588,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 c034e226a0bb..f1e5fdd846b3 100644
--- a/drivers/mfd/intel_soc_pmic_crc.c
+++ b/drivers/mfd/intel_soc_pmic_crc.c
@@ -8,9 +8,9 @@
* Author: Zhu, Lejun <lejun.zhu@linux.intel.com>
*/
-#include <linux/acpi.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
+#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/mfd/core.h>
#include <linux/mfd/intel_soc_pmic.h>
@@ -254,19 +254,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
next prev parent reply other threads:[~2022-06-16 18:25 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-16 18:25 [PATCH v1 1/9] mfd: intel_soc_pmic_crc: Merge Intel PMIC core to crc Andy Shevchenko
2022-06-16 18:25 ` [PATCH v1 2/9] mfd: intel_soc_pmic: Move non-Intel Makefile entries to their own group Andy Shevchenko
2022-06-27 13:23 ` Lee Jones
2022-06-16 18:25 ` [PATCH v1 3/9] mfd: intel_soc_pmic_crc: Use devm_regmap_add_irq_chip() Andy Shevchenko
2022-06-27 13:24 ` Lee Jones
2022-06-16 18:25 ` [PATCH v1 4/9] mfd: intel_soc_pmic_crc: Convert to use i2c_get/set_clientdata() Andy Shevchenko
2022-06-27 13:26 ` Lee Jones
2022-06-16 18:25 ` [PATCH v1 5/9] mfd: intel_soc_pmic_crc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc Andy Shevchenko
2022-06-27 13:26 ` Lee Jones
2022-06-27 13:39 ` Lee Jones
2022-06-16 18:25 ` Andy Shevchenko [this message]
2022-06-27 13:27 ` [PATCH v1 6/9] mfd: intel_soc_pmic_crc: Drop redundant ACPI_PTR() and ifdeffery Lee Jones
2022-06-27 13:39 ` Lee Jones
2022-06-16 18:25 ` [PATCH v1 7/9] mfd: intel_soc_pmic_crc: Convert driver to use ->probe_new() Andy Shevchenko
2022-06-27 13:43 ` Lee Jones
2022-06-16 18:25 ` [PATCH v1 8/9] mfd: intel_soc_pmic_crc: Replace intel_soc_pmic with crystal_cove Andy Shevchenko
2022-06-27 13:45 ` Lee Jones
2022-06-16 18:25 ` [PATCH v1 9/9] mfd: intel_soc_pmic_crc: Update the copyright year Andy Shevchenko
2022-06-27 13:46 ` Lee Jones
2022-06-28 9:48 ` Andy Shevchenko
2022-06-20 8:51 ` [PATCH v1 1/9] mfd: intel_soc_pmic_crc: Merge Intel PMIC core to crc Hans de Goede
2022-06-20 9:42 ` Andy Shevchenko
2022-06-20 10:00 ` Hans de Goede
2022-06-20 10:44 ` Andy Shevchenko
2022-06-20 9:04 ` Hans de Goede
2022-06-20 9:42 ` Andy Shevchenko
2022-06-28 23:06 ` Andy Shevchenko
2022-06-29 13:18 ` Hans de Goede
2022-06-29 13:19 ` Hans de Goede
2022-06-29 16:03 ` Andy Shevchenko
2022-06-27 13:08 ` Lee Jones
2022-06-28 9:50 ` Andy Shevchenko
2022-06-29 14:35 ` Lee Jones
2022-06-29 15:41 ` Andy Shevchenko
2022-06-30 8:01 ` Lee Jones
2022-06-30 8:07 ` Andy Shevchenko
2022-06-30 8:36 ` Hans de Goede
2022-06-30 8:45 ` Lee Jones
2022-07-15 19:54 ` Andy Shevchenko
2022-07-18 8:12 ` Lee Jones
2022-07-18 8:12 ` Lee Jones
2022-07-18 12:19 ` Andy Shevchenko
2022-07-18 15:17 ` Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220616182524.7956-6-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=andy@kernel.org \
--cc=hdegoede@redhat.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox