Skip to content

Commit

Permalink
mfd: axp20x-i2c: Do not define 'struct acpi_device_id' when !CONFIG_ACPI
Browse files Browse the repository at this point in the history
Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI,
struct axp20x_i2c_acpi_match becomes defined by unused.

This squashes the current W=1 kernel builds warning:

 drivers/mfd/axp20x-i2c.c:82:36: warning: ‘axp20x_i2c_acpi_match’ defined but not used [-Wunused-const-variable=]

Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Carlo Caione <carlo@caione.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
  • Loading branch information
Lee Jones committed Jul 7, 2020
1 parent ec46855 commit 21b2998
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/mfd/axp20x-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ static const struct i2c_device_id axp20x_i2c_id[] = {
};
MODULE_DEVICE_TABLE(i2c, axp20x_i2c_id);

#ifdef CONFIG_ACPI
static const struct acpi_device_id axp20x_i2c_acpi_match[] = {
{
.id = "INT33F4",
Expand All @@ -87,6 +88,7 @@ static const struct acpi_device_id axp20x_i2c_acpi_match[] = {
{ },
};
MODULE_DEVICE_TABLE(acpi, axp20x_i2c_acpi_match);
#endif

static struct i2c_driver axp20x_i2c_driver = {
.driver = {
Expand Down

0 comments on commit 21b2998

Please sign in to comment.