Commit b2b3adc9 authored by Keerthy's avatar Keerthy Committed by Lee Jones

mfd: tps65218: Introduce dependency on CONFIG_OF

Currently the driver boots only via device tree hence add a
dependency on CONFIG_OF. This leaves with a bunch of unused code
so clean that up.
Signed-off-by: default avatarKeerthy <j-keerthy@ti.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 8f76af65
...@@ -1413,7 +1413,7 @@ config MFD_TI_LP87565 ...@@ -1413,7 +1413,7 @@ config MFD_TI_LP87565
config MFD_TPS65218 config MFD_TPS65218
tristate "TI TPS65218 Power Management chips" tristate "TI TPS65218 Power Management chips"
depends on I2C depends on I2C && OF
select MFD_CORE select MFD_CORE
select REGMAP_I2C select REGMAP_I2C
select REGMAP_IRQ select REGMAP_IRQ
......
...@@ -215,17 +215,9 @@ static int tps65218_probe(struct i2c_client *client, ...@@ -215,17 +215,9 @@ static int tps65218_probe(struct i2c_client *client,
const struct i2c_device_id *ids) const struct i2c_device_id *ids)
{ {
struct tps65218 *tps; struct tps65218 *tps;
const struct of_device_id *match;
int ret; int ret;
unsigned int chipid; unsigned int chipid;
match = of_match_device(of_tps65218_match_table, &client->dev);
if (!match) {
dev_err(&client->dev,
"Failed to find matching dt id\n");
return -EINVAL;
}
tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL); tps = devm_kzalloc(&client->dev, sizeof(*tps), GFP_KERNEL);
if (!tps) if (!tps)
return -ENOMEM; return -ENOMEM;
......
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