From 2454f8d15cf75781a2714e99badbfbc2f5a7dacb Mon Sep 17 00:00:00 2001 From: Markus Pargmann Date: Mon, 3 Nov 2014 19:12:06 +0100 Subject: regulator: gpio: Use gpio_is_valid Use gpio_is_valid instead of an explicit comparison with 0. Signed-off-by: Markus Pargmann Signed-off-by: Mark Brown --- drivers/regulator/gpio-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/regulator/gpio-regulator.c') diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c index 5da0125fac6a..86546c1c32c4 100644 --- a/drivers/regulator/gpio-regulator.c +++ b/drivers/regulator/gpio-regulator.c @@ -322,7 +322,7 @@ static int gpio_regulator_probe(struct platform_device *pdev) cfg.driver_data = drvdata; cfg.of_node = np; - if (config->enable_gpio >= 0) { + if (gpio_is_valid(config->enable_gpio)) { cfg.ena_gpio = config->enable_gpio; cfg.ena_gpio_initialized = true; } -- cgit v1.2.3