From patchwork Tue Sep 5 18:53:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 13374949 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D14FCCA0FF7 for ; Tue, 5 Sep 2023 18:54:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AYuTJ9ILo6yOgaiUCmAPEUStBYTo9zu8d2vuJ1nD8mw=; b=36avQntYMGNIu1 lKkoZSTmau8hxk1nYNEf40YQc7H2rK3UNR3NORY3qc1rJfYUnWURut9+cyLE2lRfvq2keHsHRN+36 6zV37cwwNElVjJ/4LIgT0IQ33YLxVCFaS2HaLBz6jlLlL7bCCgSSVrxNUr+Pd9cn4BKsQNrXIuhMw YQzexpEsNiNzFiphVEOtFiIroTMWrNmzxFMNh2QVxOP25/2DlaE6zKiF0+0wkJdaggP+gpE1cBMJL 87Z/1kqnncvNtEERTUafEBaYtr7Nyd4e51cnvXCdUW3rS0+gWyGJCiX1hateQVHeKCWD3Oy/JLPSa pm0SKeS72TiAcGwB6Tlw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qdbBc-006Yq6-2X; Tue, 05 Sep 2023 18:54:04 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qdbBR-006YcO-0O for linux-arm-kernel@lists.infradead.org; Tue, 05 Sep 2023 18:53:54 +0000 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-401b393df02so28812815e9.1 for ; Tue, 05 Sep 2023 11:53:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1693940032; x=1694544832; darn=lists.infradead.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=UrAFFOP3UXm+2vTLeazN1us+BKa1tnA/xN1dYjhLvHM=; b=OqQxaj6Xq+yaBbEa5HkGXMEpS52ajIjT+bUq/+rz0KtKupN0npG9wCWl+kxVsTre9l Cw8ml6EvB9qimSWu2XzvHZF9dN1QgGYL1A1Ozba/x6DuOxUa/3Dv3G9aw61DZ44YUO/I XXqE5RDCDwuQbwRtFTo0O456OLta416kivNBKvuxL3DmYfEnInQoc9+eeBOtXOtgi4nS f47qHvOYusS9GnsSyvQHKuX7d7Pbz/VSXW3T3nTv6Sa1FDabOFVzI2GRZY9EMcMR99wr k0BZTBp7Y9XGq85L6v/JQ60vMjkqG5z+7NgC+aRPG1xoa/EQ0qdbXEzB6X6Ugk286a3J CraA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693940032; x=1694544832; 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=UrAFFOP3UXm+2vTLeazN1us+BKa1tnA/xN1dYjhLvHM=; b=fOTT9EoPwnuiVcgZ4LFzQ7Qtnc4KmspTtaikDulRxc5D6uUXfdrao9ZCrInh36mp7d Z9eswKvPee6nj3QBc+d7nMx+TKthJnoIcTqV0rXZY3hSyTJWF6QdUBZZcFAX/BBqoSaj jQ275nVqWx87wQ7/GlN/UQVezT89s6V/4MpBW2yp4QyIfTQSj+2f3bNS9TsC6UMJWEVj 7ZnqUxdmMzEAwXXcsG+dbh897f9Uc7W5eMKUT2jSIklunRtHho1u3nn2I2/u7w0GJpbN Q0xna6RVdSV35ZcsLKx8MkqkuHwjAJMat59zeMQapV3FW070vVNGax0gCbRXcz1KCSsZ Gr2A== X-Gm-Message-State: AOJu0Yz5qTe/4Eu3dx2l5D05zXlDHS3MJ0oeBDH1fuMAbW3gy1rWOF3d U9N9ukDxlPuB0vqJkfsXOG3gAA== X-Google-Smtp-Source: AGHT+IG5rvnvzkhR7zSqbm37o4SyQS5DF2Q3QExpMFHirbdRnNeCry1xvOOt3d5Fk7gOho9h35WBqA== X-Received: by 2002:a05:600c:11ce:b0:3fe:2011:a7ce with SMTP id b14-20020a05600c11ce00b003fe2011a7cemr453840wmi.6.1693940031710; Tue, 05 Sep 2023 11:53:51 -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.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Sep 2023 11:53:51 -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 21/21] gpiolib: remove gpiochip_find() Date: Tue, 5 Sep 2023 20:53:09 +0200 Message-Id: <20230905185309.131295-22-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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230905_115353_184023_65F3AF13 X-CRM114-Status: GOOD ( 13.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Bartosz Golaszewski With all users of gpiochip_find() converted to using gpio_device_find(), we can now remove this function from the kernel. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij --- drivers/gpio/gpiolib.c | 22 ---------------------- include/linux/gpio/driver.h | 3 --- 2 files changed, 25 deletions(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 90e8c3d8b6f6..bd700fb4871e 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1081,28 +1081,6 @@ void gpiochip_remove(struct gpio_chip *gc) } EXPORT_SYMBOL_GPL(gpiochip_remove); -/* - * FIXME: This will be removed soon. - * - * This function is depracated, don't use. - */ -struct gpio_chip *gpiochip_find(void *data, - int (*match)(struct gpio_chip *gc, - void *data)) -{ - struct gpio_device *gdev; - struct gpio_chip *gc = NULL; - - gdev = gpio_device_find(data, match); - if (gdev) { - gc = gdev->chip; - gpio_device_put(gdev); - } - - return gc; -} -EXPORT_SYMBOL_GPL(gpiochip_find); - /** * gpio_device_find() - find a specific GPIO device * @data: data to pass to match function diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index bb9ec741bfda..7d2bf464478a 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -603,9 +603,6 @@ int devm_gpiochip_add_data_with_key(struct device *dev, struct gpio_chip *gc, void *data, struct lock_class_key *lock_key, struct lock_class_key *request_key); -struct gpio_chip *gpiochip_find(void *data, - int (*match)(struct gpio_chip *gc, void *data)); - struct gpio_device *gpio_device_find(void *data, int (*match)(struct gpio_chip *gc, void *data));