lkml.org 
[lkml]   [2014]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 3/4] regulator: fixed: Use gpio_is_valid
Date
Use gpio_is_valid instead of an explicit comparison with 0.

Signed-off-by: Markus Pargmann <mpa@pengutronix.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


\
 
 \ /
  Last update: 2014-10-08 16:22    [W:0.127 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site