Commit 09c4e702 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Lee Jones

mfd: intel_soc_pmic_crc: Drop redundant ACPI_PTR() and ifdeffery

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarLee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220801114211.36267-7-andriy.shevchenko@linux.intel.com
parent e1efbc8e
...@@ -589,8 +589,8 @@ config LPC_SCH ...@@ -589,8 +589,8 @@ config LPC_SCH
config INTEL_SOC_PMIC config INTEL_SOC_PMIC
bool "Support for Crystal Cove PMIC" bool "Support for Crystal Cove PMIC"
depends on ACPI && HAS_IOMEM && I2C=y && GPIOLIB && COMMON_CLK depends on HAS_IOMEM && I2C=y && GPIOLIB && COMMON_CLK
depends on X86 || COMPILE_TEST depends on (X86 && ACPI) || COMPILE_TEST
depends on I2C_DESIGNWARE_PLATFORM=y depends on I2C_DESIGNWARE_PLATFORM=y
select MFD_CORE select MFD_CORE
select REGMAP_I2C select REGMAP_I2C
......
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
* Author: Zhu, Lejun <lejun.zhu@linux.intel.com> * Author: Zhu, Lejun <lejun.zhu@linux.intel.com>
*/ */
#include <linux/acpi.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/mfd/core.h> #include <linux/mfd/core.h>
#include <linux/mfd/intel_soc_pmic.h> #include <linux/mfd/intel_soc_pmic.h>
...@@ -259,19 +259,17 @@ static const struct i2c_device_id intel_soc_pmic_i2c_id[] = { ...@@ -259,19 +259,17 @@ static const struct i2c_device_id intel_soc_pmic_i2c_id[] = {
}; };
MODULE_DEVICE_TABLE(i2c, 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[] = { static const struct acpi_device_id intel_soc_pmic_acpi_match[] = {
{ "INT33FD" }, { "INT33FD" },
{ }, { },
}; };
MODULE_DEVICE_TABLE(acpi, intel_soc_pmic_acpi_match); MODULE_DEVICE_TABLE(acpi, intel_soc_pmic_acpi_match);
#endif
static struct i2c_driver intel_soc_pmic_i2c_driver = { static struct i2c_driver intel_soc_pmic_i2c_driver = {
.driver = { .driver = {
.name = "intel_soc_pmic_i2c", .name = "intel_soc_pmic_i2c",
.pm = pm_sleep_ptr(&crystal_cove_pm_ops), .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, .probe = intel_soc_pmic_i2c_probe,
.remove = intel_soc_pmic_i2c_remove, .remove = intel_soc_pmic_i2c_remove,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment