[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1412776028-15655-4-git-send-email-mpa@pengutronix.de>
Date: Wed, 8 Oct 2014 15:47:07 +0200
From: Markus Pargmann <mpa@...gutronix.de>
To: Mark Brown <broonie@...nel.org>
Cc: Liam Girdwood <lgirdwood@...il.com>,
Krzysztof Kozłowski <k.kozlowski@...sung.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
kernel@...gutronix.de, Markus Pargmann <mpa@...gutronix.de>
Subject: [PATCH v2 3/4] regulator: fixed: Use gpio_is_valid
Use gpio_is_valid instead of an explicit comparison with 0.
Signed-off-by: Markus Pargmann <mpa@...gutronix.de>
---
drivers/regulator/fixed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index 441a3e90e266..696f53cc1927 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -157,7 +157,7 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)
drvdata->desc.fixed_uV = config->microvolts;
- if (config->gpio >= 0) {
+ if (gpio_is_valid(config->gpio)) {
cfg.ena_gpio = config->gpio;
cfg.ena_gpio_initialized = true;
}
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists