mfd: tps65217: 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. This patch also makes use of probe_new function in place of the probe function so as to avoid passing i2c_device_id. Signed-off-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
@@ -228,11 +228,6 @@ static int tps65217_regulator_probe(struct platform_device *pdev)
|
||||
int i, ret;
|
||||
unsigned int val;
|
||||
|
||||
if (tps65217_chip_id(tps) != TPS65217) {
|
||||
dev_err(&pdev->dev, "Invalid tps chip version\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* Allocate memory for strobes */
|
||||
tps->strobes = devm_kzalloc(&pdev->dev, sizeof(u8) *
|
||||
TPS65217_NUM_REGULATOR, GFP_KERNEL);
|
||||
|
Reference in New Issue
Block a user