HID: i2c-hid: acpi: Drop redundant ACPI_PTR()
PATCH 1/1 HID: i2c-hid: acpi: Drop redundant ACPI_PTR()
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 <[email protected]>
--- drivers/hid/i2c-hid/i2c-hid-acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/i2c-hid/i2c-hid-acpi.c +1 -1
@@ -131,7 +131,7 @@ static struct i2c_driver i2c_hid_acpi_driver = { .name = "i2c_hid_acpi", .pm = &i2c_hid_core_pm, .probe_type = PROBE_PREFER_ASYNCHRONOUS, - .acpi_match_table = ACPI_PTR(i2c_hid_acpi_match), + .acpi_match_table = i2c_hid_acpi_match, }, .probe = i2c_hid_acpi_probe,
Signature · 1 line
2.30.0
Quoted 6 lines · Andy Shevchenko
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_PTRor none should be used in a driver.
Oh, I see more improvements can be done, so, I will send this and the rest as v2 altogether.
--
With Best Regards,
Andy Shevchenko