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

power: supply: bq24190_charger: drop of_match_ptr() from device ID table

The driver can match only via the DT table so the table should be always
used and the of_match_ptr() does not have any sense (this also allows ACPI
matching via PRP0001, even though it might be not relevant here). This
fixes compile warning (!CONFIG_OF):

drivers/power/supply/bq24190_charger.c:1972:34: warning: ‘bq24190_of_match’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>

authored by

Andy Shevchenko and committed by
Sebastian Reichel
df6f3f7e 30e677a2

+2 -9
+2 -9
drivers/power/supply/bq24190_charger.c
··· 5 5 * Author: Mark A. Greer <mgreer@animalcreek.com> 6 6 */ 7 7 8 + #include <linux/mod_devicetable.h> 8 9 #include <linux/module.h> 9 10 #include <linux/interrupt.h> 10 11 #include <linux/delay.h> 11 - #include <linux/of_irq.h> 12 - #include <linux/of_device.h> 13 12 #include <linux/pm_runtime.h> 14 13 #include <linux/power_supply.h> 15 14 #include <linux/power/bq24190_charger.h> ··· 1958 1959 }; 1959 1960 MODULE_DEVICE_TABLE(i2c, bq24190_i2c_ids); 1960 1961 1961 - #ifdef CONFIG_OF 1962 1962 static const struct of_device_id bq24190_of_match[] = { 1963 1963 { .compatible = "ti,bq24190", }, 1964 1964 { .compatible = "ti,bq24192", }, ··· 1966 1968 { }, 1967 1969 }; 1968 1970 MODULE_DEVICE_TABLE(of, bq24190_of_match); 1969 - #else 1970 - static const struct of_device_id bq24190_of_match[] = { 1971 - { }, 1972 - }; 1973 - #endif 1974 1971 1975 1972 static struct i2c_driver bq24190_driver = { 1976 1973 .probe = bq24190_probe, ··· 1974 1981 .driver = { 1975 1982 .name = "bq24190-charger", 1976 1983 .pm = &bq24190_pm_ops, 1977 - .of_match_table = of_match_ptr(bq24190_of_match), 1984 + .of_match_table = bq24190_of_match, 1978 1985 }, 1979 1986 }; 1980 1987 module_i2c_driver(bq24190_driver);