Skip to content

Commit df6f3f7

Browse files
andy-shevsre
authored andcommitted
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 <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 30e677a commit df6f3f7

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

drivers/power/supply/bq24190_charger.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
* Author: Mark A. Greer <[email protected]>
66
*/
77

8+
#include <linux/mod_devicetable.h>
89
#include <linux/module.h>
910
#include <linux/interrupt.h>
1011
#include <linux/delay.h>
11-
#include <linux/of_irq.h>
12-
#include <linux/of_device.h>
1312
#include <linux/pm_runtime.h>
1413
#include <linux/power_supply.h>
1514
#include <linux/power/bq24190_charger.h>
@@ -1959,7 +1958,6 @@ static const struct i2c_device_id bq24190_i2c_ids[] = {
19591958
};
19601959
MODULE_DEVICE_TABLE(i2c, bq24190_i2c_ids);
19611960

1962-
#ifdef CONFIG_OF
19631961
static const struct of_device_id bq24190_of_match[] = {
19641962
{ .compatible = "ti,bq24190", },
19651963
{ .compatible = "ti,bq24192", },
@@ -1968,11 +1966,6 @@ static const struct of_device_id bq24190_of_match[] = {
19681966
{ },
19691967
};
19701968
MODULE_DEVICE_TABLE(of, bq24190_of_match);
1971-
#else
1972-
static const struct of_device_id bq24190_of_match[] = {
1973-
{ },
1974-
};
1975-
#endif
19761969

19771970
static struct i2c_driver bq24190_driver = {
19781971
.probe = bq24190_probe,
@@ -1981,7 +1974,7 @@ static struct i2c_driver bq24190_driver = {
19811974
.driver = {
19821975
.name = "bq24190-charger",
19831976
.pm = &bq24190_pm_ops,
1984-
.of_match_table = of_match_ptr(bq24190_of_match),
1977+
.of_match_table = bq24190_of_match,
19851978
},
19861979
};
19871980
module_i2c_driver(bq24190_driver);

0 commit comments

Comments
 (0)