mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
iio: light: isl29018: drop ACPI_PTR() and CONFIG_ACPI guards
The complexity of config guards needed for ACPI_PTR() is not worthwhile for the small amount of saved data. This example was doing it correctly but I am proposing dropping this so as to reduce chance of cut and paste where it is done wrong. Also drop now unneeded linux/acpi.h include and added linux/mod_devicetable.h for struct acpi_device_id definition. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20241024191200.229894-22-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
ba1ff204e7
commit
40a2764c95
|
|
@ -8,17 +8,18 @@
|
|||
* Copyright (c) 2010, NVIDIA Corporation.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include <linux/iio/iio.h>
|
||||
#include <linux/iio/sysfs.h>
|
||||
#include <linux/acpi.h>
|
||||
|
||||
#define ISL29018_CONV_TIME_MS 100
|
||||
|
||||
|
|
@ -819,15 +820,13 @@ static int isl29018_resume(struct device *dev)
|
|||
static DEFINE_SIMPLE_DEV_PM_OPS(isl29018_pm_ops, isl29018_suspend,
|
||||
isl29018_resume);
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
static const struct acpi_device_id isl29018_acpi_match[] = {
|
||||
{"ISL29018", isl29018},
|
||||
{"ISL29023", isl29023},
|
||||
{"ISL29035", isl29035},
|
||||
{},
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(acpi, isl29018_acpi_match);
|
||||
#endif
|
||||
|
||||
static const struct i2c_device_id isl29018_id[] = {
|
||||
{"isl29018", isl29018},
|
||||
|
|
@ -841,14 +840,14 @@ static const struct of_device_id isl29018_of_match[] = {
|
|||
{ .compatible = "isil,isl29018", },
|
||||
{ .compatible = "isil,isl29023", },
|
||||
{ .compatible = "isil,isl29035", },
|
||||
{ },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, isl29018_of_match);
|
||||
|
||||
static struct i2c_driver isl29018_driver = {
|
||||
.driver = {
|
||||
.name = "isl29018",
|
||||
.acpi_match_table = ACPI_PTR(isl29018_acpi_match),
|
||||
.acpi_match_table = isl29018_acpi_match,
|
||||
.pm = pm_sleep_ptr(&isl29018_pm_ops),
|
||||
.of_match_table = isl29018_of_match,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user