From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Subject: [PATCH gpio-for-next 05/10] media: i2c/adp1653: set enable gpio to output Date: Mon, 6 Jul 2015 11:09:45 +0200 Message-ID: <1436173790-29963-5-git-send-email-u.kleine-koenig@pengutronix.de> References: <20150706090759.GS11824@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <20150706090759.GS11824@pengutronix.de> Sender: linux-media-owner@vger.kernel.org To: Linus Walleij , Alexandre Courbot Cc: linux-gpio@vger.kernel.org, kernel@pengutronix.de, Pavel Machek , Sakari Ailus , Mauro Carvalho Chehab , linux-media@vger.kernel.org List-Id: linux-gpio@vger.kernel.org Without setting the direction of a gpio to output a call to gpiod_set_value doesn't have a defined outcome. =46urthermore this is one caller less that stops us making the flags argument to gpiod_get*() mandatory. Acked-by: Sakari Ailus Acked-by: Pavel Machek Signed-off-by: Uwe Kleine-K=C3=B6nig --- drivers/media/i2c/adp1653.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/adp1653.c b/drivers/media/i2c/adp1653.c index c70ababce954..5dd39775d6ca 100644 --- a/drivers/media/i2c/adp1653.c +++ b/drivers/media/i2c/adp1653.c @@ -465,7 +465,7 @@ static int adp1653_of_init(struct i2c_client *clien= t, =20 of_node_put(child); =20 - pd->enable_gpio =3D devm_gpiod_get(&client->dev, "enable"); + pd->enable_gpio =3D devm_gpiod_get(&client->dev, "enable", GPIOD_OUT_= LOW); if (!pd->enable_gpio) { dev_err(&client->dev, "Error getting GPIO\n"); return -EINVAL; --=20 2.1.4