Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp566670imj; Thu, 7 Feb 2019 08:30:30 -0800 (PST) X-Google-Smtp-Source: AHgI3IYqa9b0q6+uq+qQwEFjorX3opBu4oXJKGkNB6rFqmx74RCXe7HJKoFNfsRzS6neabGMht9v X-Received: by 2002:a63:235c:: with SMTP id u28mr330261pgm.400.1549557030223; Thu, 07 Feb 2019 08:30:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549557030; cv=none; d=google.com; s=arc-20160816; b=oqX+epSti6+ejBIvWVJi5EwFcPXhtm/gUEzeFgnfA7AbvONemHwxZfEmC/85dmf1qK VJMT/ppmJWMyfZt7q/s/IB0scbT46eHJ9hFCPYFU5gnpe89TIg/zjEMypoBVYQPvgJis SR1DdqB3rWcYDGRUYDWFTXAWHU30rurR09gO3sIbx43rh54LDQtzPpaPqDsKzYGkQjQ8 1xhy6mxzPfzLt28uenKS5bo9m8OYOX6KcIQTAQYN1q+Dn8Mrba7KXuG/dxYtjr9/NilY NrZa6IEXuCQTo8T0xvJuWM594n9t8pdl5Ra4E2OogMkxT+ujmLhcKGu6gr0PTAcL/cme 542Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=lAec53olVTTBv87H7XI4Yv9aV7pvWBH8uaDFDL2ZV7w=; b=BvGuOZeoaVSkHNQAmyI69zfQ9y0f7stardZZ3CmcyqO4cg0hMVU6jgLnhfzTYsIicp 9t27XFe7mV8gGe7zE+shbCuE2JaLc5LdgeXLDC60nQ01gFjCl0Dut8/tGnBHjNbdzrw/ PKhK3XJTYIY8WP7XkswaDvO9CkEcdwV5jQXeDW2t7+gGWRur6R9E7QsWhqoys+KGA3VN h68k9xOVgaoWI/cvhacOBtizvHv09fJB5fG+PncDepM7vR671hxd8iYmk8mltQir6xTv af0NYQbvZDwG+nN2DL7A4yd5ENu0Gcr9ESKgF90bexl3FBqgmYIoHQDVxJRD0Wq/6WFX r4Cw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j127si3674370pgc.444.2019.02.07.08.30.14; Thu, 07 Feb 2019 08:30:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727141AbfBGQ3g (ORCPT + 99 others); Thu, 7 Feb 2019 11:29:36 -0500 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:56435 "EHLO relay8-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726924AbfBGQ3P (ORCPT ); Thu, 7 Feb 2019 11:29:15 -0500 X-Originating-IP: 90.88.22.177 Received: from localhost (aaubervilliers-681-1-80-177.w90-88.abo.wanadoo.fr [90.88.22.177]) (Authenticated sender: thomas.petazzoni@bootlin.com) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 4BC2D1BF208; Thu, 7 Feb 2019 16:29:12 +0000 (UTC) From: Thomas Petazzoni To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Mark Rutland , Frank Rowand Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Jan=20Kundr=C3=A1t?= , Thomas Petazzoni Subject: [PATCH v2 3/5] gpio: use new gpio_set_config() helper in more places Date: Thu, 7 Feb 2019 17:28:57 +0100 Message-Id: <20190207162859.26252-4-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190207162859.26252-1-thomas.petazzoni@bootlin.com> References: <20190207162859.26252-1-thomas.petazzoni@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As suggested by Linus Walleij, let's use the new gpio_set_config() helper in gpiod_set_debounce() and gpiod_set_transitory(). Signed-off-by: Thomas Petazzoni --- drivers/gpio/gpiolib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index cf8a4402fef1..9762a836fec9 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -2762,7 +2762,7 @@ int gpiod_set_debounce(struct gpio_desc *desc, unsigned debounce) } config = pinconf_to_config_packed(PIN_CONFIG_INPUT_DEBOUNCE, debounce); - return chip->set_config(chip, gpio_chip_hwgpio(desc), config); + return gpio_set_config(chip, gpio_chip_hwgpio(desc), config); } EXPORT_SYMBOL_GPL(gpiod_set_debounce); @@ -2799,7 +2799,7 @@ int gpiod_set_transitory(struct gpio_desc *desc, bool transitory) packed = pinconf_to_config_packed(PIN_CONFIG_PERSIST_STATE, !transitory); gpio = gpio_chip_hwgpio(desc); - rc = chip->set_config(chip, gpio, packed); + rc = gpio_set_config(chip, gpio, packed); if (rc == -ENOTSUPP) { dev_dbg(&desc->gdev->dev, "Persistence not supported for GPIO %d\n", gpio); -- 2.20.1