Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Krzysztof Kozlowski and committed by
Lee Jones
06b324fc 7b64f245

+2
+2
drivers/mfd/axp20x-i2c.c
··· 57 57 return axp20x_device_remove(axp20x); 58 58 } 59 59 60 + #ifdef CONFIG_OF 60 61 static const struct of_device_id axp20x_i2c_of_match[] = { 61 62 { .compatible = "x-powers,axp152", .data = (void *)AXP152_ID }, 62 63 { .compatible = "x-powers,axp202", .data = (void *)AXP202_ID }, ··· 69 68 { }, 70 69 }; 71 70 MODULE_DEVICE_TABLE(of, axp20x_i2c_of_match); 71 + #endif 72 72 73 73 static const struct i2c_device_id axp20x_i2c_id[] = { 74 74 { "axp152", 0 },