iio: pressure: hp206c: 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: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20231231183514.566609-23-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
042ffa6daf
commit
51feb3e358
@ -11,12 +11,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
#include <linux/mod_devicetable.h>
|
||||||
#include <linux/i2c.h>
|
#include <linux/i2c.h>
|
||||||
#include <linux/iio/iio.h>
|
#include <linux/iio/iio.h>
|
||||||
#include <linux/iio/sysfs.h>
|
#include <linux/iio/sysfs.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/util_macros.h>
|
#include <linux/util_macros.h>
|
||||||
#include <linux/acpi.h>
|
|
||||||
|
|
||||||
#include <asm/unaligned.h>
|
#include <asm/unaligned.h>
|
||||||
|
|
||||||
@ -400,20 +400,18 @@ static const struct i2c_device_id hp206c_id[] = {
|
|||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(i2c, hp206c_id);
|
MODULE_DEVICE_TABLE(i2c, hp206c_id);
|
||||||
|
|
||||||
#ifdef CONFIG_ACPI
|
|
||||||
static const struct acpi_device_id hp206c_acpi_match[] = {
|
static const struct acpi_device_id hp206c_acpi_match[] = {
|
||||||
{"HOP206C", 0},
|
{"HOP206C", 0},
|
||||||
{ },
|
{ },
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(acpi, hp206c_acpi_match);
|
MODULE_DEVICE_TABLE(acpi, hp206c_acpi_match);
|
||||||
#endif
|
|
||||||
|
|
||||||
static struct i2c_driver hp206c_driver = {
|
static struct i2c_driver hp206c_driver = {
|
||||||
.probe = hp206c_probe,
|
.probe = hp206c_probe,
|
||||||
.id_table = hp206c_id,
|
.id_table = hp206c_id,
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "hp206c",
|
.name = "hp206c",
|
||||||
.acpi_match_table = ACPI_PTR(hp206c_acpi_match),
|
.acpi_match_table = hp206c_acpi_match,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user