Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3346314rdh; Thu, 28 Sep 2023 09:03:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHvocgBF+9+PDJGgq0mOq9qGBHE+vQVqgXeFG/JjHiXBqqjmA3PE4B1C6Ph3MBsyLiBtAfo X-Received: by 2002:a05:6358:72a4:b0:14d:b8d3:97e5 with SMTP id w36-20020a05635872a400b0014db8d397e5mr931003rwf.20.1695917001894; Thu, 28 Sep 2023 09:03:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695917001; cv=none; d=google.com; s=arc-20160816; b=BnxgNHyvpx2hRD8Adhsin2j6r2+67+IpLY6P37vAWmq8bYOyX9PAiDec+rfefo3oVe Ly18FHLJT234MdWWxF/zcT8kR42SOA6FzS4fqb3r/lQ5DqhuwcWJgSdUAuHtOkbRJeJC xU8quBEzVsdbRdQlGoiwNwZW97Og8xYzFzbc/bB68ltkDquQbisslBQNBfNZH/7n7jr3 8bppsO7cbjezZ5sd6jTNuuu0iVn1/IcvGwp58k14rgSMpjECk7XiBSGYx2usc0eC87kh 82sk+q/l5S9c4vhvNzssT5DmdiHDdAF8PIl9fvUivL43cIQmKzL/HC4osPzNMFb5uPCN 364w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=ACdKckhs2IGUtv5AveDwU/IL9fYWvBeI2aPkdMd1dhI=; fh=+J1tU8mYRS0tAzYCer2u4MwX4DmdoEjH6cAcxs8XMyc=; b=NL1YGlDjVGZKLGhJL5WjzKWGbgYVAQDxAwd9J7J0p1uCaVwWpAqbV9D1+cmd4/hg+A uUpqIZ1Qi2c4jcprwfdOHA03BsUTm3bW/p0CQ3nMcayT7EaGsppTIOdwU6p/6FyVTuZT Kcq9/FXHEKEfK/7CPAfrSdRe9mXMIeZRCzWlp/Ihr764bk0MLznSOvOcAldK06V3j/Bp nJGOHa60Ex8bEmO2DUjJXsOuThFvrN9JL0peLMakql3PKT24WuxiQGFd9L1Wx0iPxqCw Kw83CkT3drzQNUkS9BdTkz6v7cYOwLscpevMgrNTdvM+VKt9AuSl2yNfYTGrgW64oXb4 BtQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DSQY5BTL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id d4-20020a655884000000b0056534e3aeeasi18612633pgu.474.2023.09.28.09.03.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 09:03:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DSQY5BTL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 698E1805A590; Thu, 28 Sep 2023 05:46:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232527AbjI1Mqj (ORCPT + 99 others); Thu, 28 Sep 2023 08:46:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232514AbjI1Mqh (ORCPT ); Thu, 28 Sep 2023 08:46:37 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E002D1B0 for ; Thu, 28 Sep 2023 05:45:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695905157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ACdKckhs2IGUtv5AveDwU/IL9fYWvBeI2aPkdMd1dhI=; b=DSQY5BTLdfcwI5qb2dk3MHNeyooYqDVH4RTZU8vN8xeMwpDYGhkkq3WYbMYqxKn1hApip3 zycOWVWi97P/U4PpzlKtcefyTCRQJI0XXDIDjfH0Ls9OzSQSE8GqFvgXQfN89+1pLOqDbC mh6/OXbc1tzyFR8jztJrfbw1dcDKoQQ= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-518-wFRXiqBZP6iloEPlFgOSug-1; Thu, 28 Sep 2023 08:45:55 -0400 X-MC-Unique: wFRXiqBZP6iloEPlFgOSug-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-9a9d7a801a3so1128204866b.2 for ; Thu, 28 Sep 2023 05:45:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695905154; x=1696509954; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ACdKckhs2IGUtv5AveDwU/IL9fYWvBeI2aPkdMd1dhI=; b=UErEfsWGtQMgzhCvBmSSB/MUIcxSE1bqSlAJuGM9DWRAkIfOPaXAKgH5Y9hCa44H0D rQQFNzPyxaTvrEUSTxy0ZLIsWeR4FtkaOH7Q7rpGpKdci7lq7AfSQQyfWPYXE8Wlyb6t HDtinJfPFpNz6bCPqeqpdfdmeC4J2AZxfA6IuCs6bagwAk0mXExUXYfkqVVRQSjdViOa Jf1IYJndqyvozzS3jpUeFuPAzL+DZEs7TBot+2OhWhQOqAm8uHHww1eyn9DOXG4tKFeV ecr/lgXNniD4b/eNOPggR7v9XXW0aJVNxXD0+SGpZwlzQ2hVCFGuGU/hk7WDDxncfJ8f 3dQg== X-Gm-Message-State: AOJu0Yyo7JZj2bW80Aa1dBChpAbAtW8M+l2A/KkzDgSvz5FS9qRes+uy wD+wvw2rhOJF+HrXsUqFQ9yKUbQw0NBRadtbchZg3twlwY44LmWq+wjTcrDab9gAPwocOwy3lES vcN33SulpP+KRh/Pyzr0N4bCk X-Received: by 2002:a17:906:3150:b0:9ae:696c:2c43 with SMTP id e16-20020a170906315000b009ae696c2c43mr1183240eje.28.1695905154402; Thu, 28 Sep 2023 05:45:54 -0700 (PDT) X-Received: by 2002:a17:906:3150:b0:9ae:696c:2c43 with SMTP id e16-20020a170906315000b009ae696c2c43mr1183223eje.28.1695905154189; Thu, 28 Sep 2023 05:45:54 -0700 (PDT) Received: from [192.168.1.217] ([109.36.138.103]) by smtp.gmail.com with ESMTPSA id lw13-20020a170906bccd00b0098884f86e41sm10683387ejb.123.2023.09.28.05.45.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 Sep 2023 05:45:53 -0700 (PDT) Message-ID: <93be52fc-fa87-423f-dde2-1b0b758ab632@redhat.com> Date: Thu, 28 Sep 2023 14:45:51 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: [PATCH v2 5/5] gpio: acpi: remove acpi_get_and_request_gpiod() Content-Language: en-US From: Hans de Goede To: Bartosz Golaszewski , Mika Westerberg , Andy Shevchenko , Linus Walleij , Daniel Scally , Mark Gross Cc: linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, Bartosz Golaszewski References: <20230926145943.42814-1-brgl@bgdev.pl> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email 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 (morse.vger.email [0.0.0.0]); Thu, 28 Sep 2023 05:46:50 -0700 (PDT) With no more users, we can remove acpi_get_and_request_gpiod(). Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20230926145943.42814-5-brgl@bgdev.pl Signed-off-by: Hans de Goede --- drivers/gpio/gpiolib-acpi.c | 28 ---------------------------- include/linux/gpio/consumer.h | 8 -------- 2 files changed, 36 deletions(-) diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index 17a86bdd9609..89ff93f3b579 100644 --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c @@ -158,34 +158,6 @@ static struct gpio_desc *acpi_get_gpiod(char *path, unsigned int pin) return gpiochip_get_desc(chip, pin); } -/** - * acpi_get_and_request_gpiod - Translate ACPI GPIO pin to GPIO descriptor and - * hold a refcount to the GPIO device. - * @path: ACPI GPIO controller full path name, (e.g. "\\_SB.GPO1") - * @pin: ACPI GPIO pin number (0-based, controller-relative) - * @label: Label to pass to gpiod_request() - * - * This function is a simple pass-through to acpi_get_gpiod(), except that - * as it is intended for use outside of the GPIO layer (in a similar fashion to - * gpiod_get_index() for example) it also holds a reference to the GPIO device. - */ -struct gpio_desc *acpi_get_and_request_gpiod(char *path, unsigned int pin, char *label) -{ - struct gpio_desc *gpio; - int ret; - - gpio = acpi_get_gpiod(path, pin); - if (IS_ERR(gpio)) - return gpio; - - ret = gpiod_request(gpio, label); - if (ret) - return ERR_PTR(ret); - - return gpio; -} -EXPORT_SYMBOL_GPL(acpi_get_and_request_gpiod); - static irqreturn_t acpi_gpio_irq_handler(int irq, void *data) { struct acpi_gpio_event *event = data; diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h index 1c4385a00f88..9d1f598b8971 100644 --- a/include/linux/gpio/consumer.h +++ b/include/linux/gpio/consumer.h @@ -614,8 +614,6 @@ void acpi_dev_remove_driver_gpios(struct acpi_device *adev); int devm_acpi_dev_add_driver_gpios(struct device *dev, const struct acpi_gpio_mapping *gpios); -struct gpio_desc *acpi_get_and_request_gpiod(char *path, unsigned int pin, char *label); - #else /* CONFIG_GPIOLIB && CONFIG_ACPI */ #include @@ -633,12 +631,6 @@ static inline int devm_acpi_dev_add_driver_gpios(struct device *dev, return -ENXIO; } -static inline struct gpio_desc *acpi_get_and_request_gpiod(char *path, unsigned int pin, - char *label) -{ - return ERR_PTR(-ENOSYS); -} - #endif /* CONFIG_GPIOLIB && CONFIG_ACPI */ -- 2.41.0