Commit 06b324fc authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Lee Jones

mfd: axp20x: Skip of_device_id table when !CONFIG_OF

The driver can match either via ACPI or OF.  Its of_device_id table is
referenced via of_match_ptr() so it will be unused for !CONFIG_OF
builds:

  drivers/mfd/axp20x-i2c.c:60:34: warning: ‘axp20x_i2c_of_match’ defined but not used [-Wunused-const-variable=]
Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Acked-by: default avatarChen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 7b64f245
...@@ -57,6 +57,7 @@ static int axp20x_i2c_remove(struct i2c_client *i2c) ...@@ -57,6 +57,7 @@ static int axp20x_i2c_remove(struct i2c_client *i2c)
return axp20x_device_remove(axp20x); return axp20x_device_remove(axp20x);
} }
#ifdef CONFIG_OF
static const struct of_device_id axp20x_i2c_of_match[] = { static const struct of_device_id axp20x_i2c_of_match[] = {
{ .compatible = "x-powers,axp152", .data = (void *)AXP152_ID }, { .compatible = "x-powers,axp152", .data = (void *)AXP152_ID },
{ .compatible = "x-powers,axp202", .data = (void *)AXP202_ID }, { .compatible = "x-powers,axp202", .data = (void *)AXP202_ID },
...@@ -68,6 +69,7 @@ static const struct of_device_id axp20x_i2c_of_match[] = { ...@@ -68,6 +69,7 @@ static const struct of_device_id axp20x_i2c_of_match[] = {
{ }, { },
}; };
MODULE_DEVICE_TABLE(of, axp20x_i2c_of_match); MODULE_DEVICE_TABLE(of, axp20x_i2c_of_match);
#endif
static const struct i2c_device_id axp20x_i2c_id[] = { static const struct i2c_device_id axp20x_i2c_id[] = {
{ "axp152", 0 }, { "axp152", 0 },
......
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