Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3107186rdg; Tue, 17 Oct 2023 05:05:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGRd2x2gABmRZ8QRVsPQlusDa2EEz9xqKC0amopPzIJux/HToB0PZlz48sUeGivtL1atyMi X-Received: by 2002:a17:903:22c5:b0:1c4:5e9e:7865 with SMTP id y5-20020a17090322c500b001c45e9e7865mr2418455plg.0.1697544331246; Tue, 17 Oct 2023 05:05:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697544331; cv=none; d=google.com; s=arc-20160816; b=UMUvBJVqC1QajYHAXoQj1EVEjeqSA/meorPgN9B0wXO0iffQxE+ZwfBpvDIStWcou+ 8jUO5cUyy2Lzn+S/lY9Tk2BU2+O+jBXbFFe0TNwKr3HUovKo0NfE67jx90HDXB7O62cX BOA2p5jflGhd/11geKxPHUdGL5tZcQTwp8ZlgAPvbo8nUmzFXgBYYR8wBc3AL3g45wXb ZoZqvIu/k8qr/YJu1Y4fpGwAP16GUQWBfsOhCxZANUeHDduK1eEyhaj59RO4lekxhBoO EoQDrS+H94aGCiQsVAjfGB5SC0fZz5ULzYUW03r8np1NCTPQ+v35FyegQpbeagup7ARn gxSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eqSvTTUiCAxcdVsqPtP3QRiyb3qISoSChjkUUgG3668=; fh=kOxmq+prcfKKX/dgMaMxTb6TRjzyc//QKXZBiaS/a94=; b=LeU1pDJ3ly9Dkq6eDKZEsnJg8fpkwMkGgI4AfQvdDqo0P4w4+QfV9KLKTaiGRN9lMy DVrYcC+2hBQy+R+svpRwe0LEefVa1EtudoOJCvCduo7o21Xf0AoSK6Q3sghwu6g1p5Gk S7dmSkYHxHHzh5eNfx/J6OokmSyv88FLbeIufg38NTPaRZ5MunOO37sF6jXlVhNyOJzK Sz4rzm9h7m2/2qugRFkvt7djRTKJlfkW3b+P30H4A/CLHIz/cSHOmUtW0rup9/7+cInr JASNlM8O1PZrczd9PEFcGBnpEreS20vyz2LER3CoCRfCYEej+xBJZzSVZOJ92B36f2cs lzQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=SueKBiqm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id j7-20020a17090276c700b001ca86f952f6si1536029plt.493.2023.10.17.05.05.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 05:05:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=SueKBiqm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id EB614801CBCD; Tue, 17 Oct 2023 05:05:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234920AbjJQMFK (ORCPT + 99 others); Tue, 17 Oct 2023 08:05:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234752AbjJQME6 (ORCPT ); Tue, 17 Oct 2023 08:04:58 -0400 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA47AF2 for ; Tue, 17 Oct 2023 05:04:53 -0700 (PDT) Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2c501bd6ff1so61887061fa.3 for ; Tue, 17 Oct 2023 05:04:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1697544292; x=1698149092; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eqSvTTUiCAxcdVsqPtP3QRiyb3qISoSChjkUUgG3668=; b=SueKBiqmIZUOBtnSpA7PCqgvsexnr/Z/EBBwRZ+sWrWr2fCH1iFKOWhJVE5U7KMUvO x5IcHqS1rUl8vEWKSWEyFvFDLjJpH4sNngHggnHs6X8r8XFbuk6580J07czQKupfKP3G 2s7NIT1sc56DPfK80KZ+3kDnHNfcFJiLsukLGKILsSiTpCcNz7s+dMsp/YAglMufGRED Vaw8HbIbKAVznIqXfM60agbxJ7PFluJwEqLr3ZUlZKgIbmBMqkZ+0IIjdxKGJ+Sb/Lfj O4xPDOdd1SNJtxRu2BjzN1SGCH2dVaKWkrUUEJJypSp34PLxuf9IRzfNsYKncKcWYFPa AjqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697544292; x=1698149092; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eqSvTTUiCAxcdVsqPtP3QRiyb3qISoSChjkUUgG3668=; b=d0sxYCKQ+4f07+JAPc76t69e6zwjB1Upu00ZQxrMv3FSPFODf9p89SJ73FfXZQCE7D jiv9DVhvacxuyo07zg0qAZ7F/GJHQKayK5jUpQNqpHBp/JZ/roAcPfFsJNuVvTsvSIUr eBS1WC9+5W6IqHZCUbHwDFCWP+WeSobiS/XNDDqx7sXBtxSS7tu5ES0wmnBw+QlBjMP5 HWVs6FH+6l6ZI83HvTe2iwI/fAqb8o8j+F3imsqY/9U4rn9Ch764bl+qLT0BkjyIes// gUTklCWP5Jb96uCsYs7J/eIcIHa5G94L0vRbWJhe9emkHiQ+gO3dBo7pCE1c6wSBwR3u 9pBQ== X-Gm-Message-State: AOJu0YyYrf2w5blWAJvzVzw57QY8sONN5D1Ld9eb+NGQuf4XA+feFrhB PC0t9EnAni+JK8yyYDdL9jbXlnwT5CbKkxQ6rLg= X-Received: by 2002:a05:651c:b29:b0:2c5:380:2a10 with SMTP id b41-20020a05651c0b2900b002c503802a10mr1919281ljr.25.1697544292084; Tue, 17 Oct 2023 05:04:52 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:f1ee:b000:ce90:ed14]) by smtp.gmail.com with ESMTPSA id a2-20020a05600c224200b00405442edc69sm1353859wmm.14.2023.10.17.05.04.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 05:04:51 -0700 (PDT) From: Bartosz Golaszewski To: Linus Walleij , Andy Shevchenko Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v3 04/73] gpio: cdev: use pinctrl_gpio_can_use_line_new() Date: Tue, 17 Oct 2023 14:03:22 +0200 Message-Id: <20231017120431.68847-5-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231017120431.68847-1-brgl@bgdev.pl> References: <20231017120431.68847-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 17 Oct 2023 05:05:17 -0700 (PDT) From: Bartosz Golaszewski Use the improved variant of pinctrl_gpio_can_use_line() which takes a pointer to the gpio_chip and a controller-relative offset. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- drivers/gpio/gpiolib-cdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c index 31fc71a612c2..54ee075410db 100644 --- a/drivers/gpio/gpiolib-cdev.c +++ b/drivers/gpio/gpiolib-cdev.c @@ -2287,8 +2287,7 @@ static void gpio_desc_to_lineinfo(struct gpio_desc *desc, * FIXME: find a non-racy way to retrieve this information. Maybe a * lock common to both frameworks? */ - ok_for_pinctrl = - pinctrl_gpio_can_use_line(gc->base + info->offset); + ok_for_pinctrl = pinctrl_gpio_can_use_line_new(gc, info->offset); spin_lock_irqsave(&gpio_lock, flags); -- 2.39.2