]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
mfd: tps65218: Introduce dependency on CONFIG_OF
authorKeerthy <j-keerthy@ti.com>
Wed, 13 Sep 2017 12:17:10 +0000 (17:47 +0530)
committerLee Jones <lee.jones@linaro.org>
Fri, 13 Oct 2017 09:42:59 +0000 (10:42 +0100)
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: Keerthy <j-keerthy@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/Kconfig
drivers/mfd/tps65218.c

index c5bc48a4d7a0db12e4e0d99af84c617fb106fde4..5fecee6d972c07a87ba127b9cdf82508be19dc50 100644 (file)
@@ -1413,7 +1413,7 @@ config MFD_TI_LP87565
 
 config MFD_TPS65218
        tristate "TI TPS65218 Power Management chips"
-       depends on I2C
+       depends on I2C && OF
        select MFD_CORE
        select REGMAP_I2C
        select REGMAP_IRQ
index 13834a0d28172fe5334f0385571fafb34cc21248..910f569ff77c1b7313c4c03c6d3a57b92f6c73b4 100644 (file)
@@ -215,17 +215,9 @@ static int tps65218_probe(struct i2c_client *client,
                                const struct i2c_device_id *ids)
 {
        struct tps65218 *tps;
-       const struct of_device_id *match;
        int ret;
        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);
        if (!tps)
                return -ENOMEM;