From patchwork Tue Sep 5 18:53:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13374981 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C0F9CA1001 for ; Tue, 5 Sep 2023 19:10:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239204AbjIETK4 (ORCPT ); Tue, 5 Sep 2023 15:10:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241830AbjIETKz (ORCPT ); Tue, 5 Sep 2023 15:10:55 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB4D510DE for ; Tue, 5 Sep 2023 12:10:27 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-52683b68c2fso4074055a12.0 for ; Tue, 05 Sep 2023 12:10:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1693940967; x=1694545767; 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=v8EoAIqFLJCxUpfLhsvBV4jgy9F1vQzmq/NZ2XWmhPM=; b=aK6JgJIApyhH/Lymt3OexQU1ZUBEZC4yAf5+tQEtvBIXDE4O6zKd8Gkt4rmhK/ZGZ9 u3O+0Hk072I73pYoUTlQOFMi3Op3wb0y71CbyMSo0NgtDr28dsEbU4WtbtcShPAF+dCJ KshA72YcLhtBA/siAEFFIXp5Bl7O4cOu2Wz9iGCiLw7geUZZPzYKjn23HCrxpT63cI7w q+NREC810VV56n8OQU7cZpN3REKB0SJ3v5+ScXuf33BiaPdIz1pulM4jDbB06QQTIvKn Tq3t7V9yVsLaYCslLQ5gX29OUPcIYbrcFNH7ialbTk8hs+GO25pYSBiDH46NOiNrKTxE wIkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693940967; x=1694545767; 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=v8EoAIqFLJCxUpfLhsvBV4jgy9F1vQzmq/NZ2XWmhPM=; b=YgSs7BAoHElVzIVLp+6UMHYJSStpaZHydtoXmf61O6SCsPtikRMiCcpYoC/7GNqYMr Np3QQezpaIcONNX0oyej/xtMEjSMUWhaBm/l6sCoRiNU+U89FtoNakM/SiqrgCQmbyqi +GQ74eatgpA0BPh7WHolW2JK1GKuxccGGj4QF5iVIUn0M5fJsJW6O8K89rzxrocpynZv N/nPlCvsKTOtUazzI1aedReo2Xw93C36ZMJEXRt8vzj4gs4e/KJilkaOX1unkeNmS0vK tpdsWj5NW++0a53LT8104iinlt8Awl5yB5tA1Aj3p2z1GcYQ/lo6wsiSqz0jetSVqr0H /kKg== X-Gm-Message-State: AOJu0YzptPQE7lmLddS1J6rn43Swx4SV30BI0vrP1pX8cEMljnrY+PfZ I0Y6FwrnQtmqdp7xuuf+0NmiDRkPu54N+FvCyE0= X-Google-Smtp-Source: AGHT+IGdmweLsvxMkviAD6X4Rb7LNMdeCjqz2Ypd3y+SG6ZL6d4+T9L7pYZxfgxQTgv+RGIUJmtJEw== X-Received: by 2002:a05:600c:2809:b0:3fe:dcd0:2e10 with SMTP id m9-20020a05600c280900b003fedcd02e10mr472155wmb.17.1693940027944; Tue, 05 Sep 2023 11:53:47 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:7a54:5dbc:6d09:48b7]) by smtp.gmail.com with ESMTPSA id 17-20020a05600c249100b003fbc30825fbsm17550010wms.39.2023.09.05.11.53.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Sep 2023 11:53:47 -0700 (PDT) From: Bartosz Golaszewski To: Aaro Koskinen , Janusz Krzysztofik , Tony Lindgren , Russell King , Mika Westerberg , Andy Shevchenko , Linus Walleij , Bartosz Golaszewski , Dipen Patel , Thierry Reding , Jonathan Hunter , Hans de Goede , Mark Gross Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, timestamp@lists.linux.dev, linux-tegra@vger.kernel.org, platform-driver-x86@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 18/21] gpio: acpi: replace gpiochip_find() with gpio_device_find() Date: Tue, 5 Sep 2023 20:53:06 +0200 Message-Id: <20230905185309.131295-19-brgl@bgdev.pl> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230905185309.131295-1-brgl@bgdev.pl> References: <20230905185309.131295-1-brgl@bgdev.pl> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Bartosz Golaszewski We're porting all users of gpiochip_find() to using gpio_device_find(). Update the ACPI GPIO code. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij --- drivers/gpio/gpiolib-acpi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index 5633e39396bc..15d3350123d9 100644 --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c @@ -143,7 +143,7 @@ static int acpi_gpiochip_find(struct gpio_chip *gc, void *data) */ static struct gpio_desc *acpi_get_gpiod(char *path, unsigned int pin) { - struct gpio_chip *chip; + struct gpio_device *gdev __free(gpio_device_put) = NULL; acpi_handle handle; acpi_status status; @@ -151,11 +151,11 @@ static struct gpio_desc *acpi_get_gpiod(char *path, unsigned int pin) if (ACPI_FAILURE(status)) return ERR_PTR(-ENODEV); - chip = gpiochip_find(handle, acpi_gpiochip_find); - if (!chip) + gdev = gpio_device_find(handle, acpi_gpiochip_find); + if (!gdev) return ERR_PTR(-EPROBE_DEFER); - return gpiochip_get_desc(chip, pin); + return gpiochip_get_desc(gdev->chip, pin); } /**