Message ID | 20230605125810.61456-1-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2683235vqr; Mon, 5 Jun 2023 06:23:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5mcirM6AL6tVNc+uNH4y83TDDoPvJeDJ+7PNEKVOxbLDmLJIW+IgIi7h+yub1FtUqYu6Y1 X-Received: by 2002:a05:6a20:1456:b0:10a:e9ff:808d with SMTP id a22-20020a056a20145600b0010ae9ff808dmr6733512pzi.0.1685971386730; Mon, 05 Jun 2023 06:23:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685971386; cv=none; d=google.com; s=arc-20160816; b=EtOz6OUnGAvl3qr6quv9Gx4QpflRHZmQEvEiDYb6zqRtkwWk3NnJmrj6TwoAX+JcTy ex7XACvnNApBSgNKM4CksnP/yhrhWByi5vfQtFeEaywEhCzh8Z+RMbmQQWsnCU1L1ij0 MRz35X6fnStXRFO/df7gwq56Sxk66Wu6Y/pdtSG7fW3gjKcRDMqz7dWbkxOOjpQ+LDn4 fE33zCJhul/Pz+cUzDZcgWqeYn5ZvhJMKkrRR0xAlnTEjJ9HleEidztT6fi/7OOGrHol r0oaVK/4MlIF+LOwQE8XQ2DUSwh+8eY9ONC/5KCu3cKAOST2gZdW84HYWVNNz9l6P+NO eBgg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=mMgTYKTlxeAexSJBrCYYj0KCprT0fnH3jCnoVjYEhd4=; b=gFt7hI7yCOiUIn3VacLIyBJZ8rtnu+EIiXVUJfrKbO9LSRmO3h0r6807+iVn0zC+w/ WvphbsAWpAkHED4yxyZgZGmBNttQCbv28vg5tSfmRYnSgAO/C7RDkcyAKIvml7UvKQAO HuYekpwxvPuzGkW8XpJKKWa1QkcH6Fzekun84IIveCKWTWohiTsa+8aTAMI7nUWuJVkh FGZntaUYJ6JZn1Af7QNpFhaaNnyvgXu2yAw3nxOHd8wyTGNiOTQcKDXzvSFSTeZhYWzg 4s5iWKDzPJcYl4JTXU4S0qaNqXnDRaMiKEzeWkxI+cF+oMl9H2BCyS2BFhY1XpvdAWPw vJOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CfrTuHpJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r17-20020a638f51000000b0053f0cdab820si5597723pgn.259.2023.06.05.06.22.53; Mon, 05 Jun 2023 06:23:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CfrTuHpJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232792AbjFEM7M (ORCPT <rfc822;pavtiger@gmail.com> + 99 others); Mon, 5 Jun 2023 08:59:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229625AbjFEM7K (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 5 Jun 2023 08:59:10 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DED33FE; Mon, 5 Jun 2023 05:58:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685969924; x=1717505924; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=MEgj/vZSUbGWWbHpadQGpjjG8bL7wedFUW38lNf/E18=; b=CfrTuHpJSvspT0vkEl95OEKv7UvgfrTaJRt1W64IXIGVDfLGM3shrGFb 56v460ZRJ7xhFUJTSLl8hMzLSBR0r++GHyeQnS4VsH0f420Aex0HlgN/F Mp3r7K68OPTrmd4crs9+PoJnPpStZYtF41VY1G4+Qh/ZU4scYDcDNFo8R FDtygqxn/0Dz7iWE4wJYSjEsZPDqEW8ZzjlKSoAb4p50RnEO5hcVSNCHN +E9HaVlmgyaiAMsqvCKgWNVlT0+plSttJp6VVB/lWdRxMbB0agMpd+RzJ OcUPM9qft1hYC5rnOKUrtxJm/s7Qevsi734N85HKSTv21BBFuwMUTkjW5 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10731"; a="356369588" X-IronPort-AV: E=Sophos;i="6.00,217,1681196400"; d="scan'208";a="356369588" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2023 05:58:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10731"; a="832798144" X-IronPort-AV: E=Sophos;i="6.00,217,1681196400"; d="scan'208";a="832798144" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga004.jf.intel.com with ESMTP; 05 Jun 2023 05:58:05 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 0A75C2A6; Mon, 5 Jun 2023 15:58:11 +0300 (EEST) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <brgl@bgdev.pl> Subject: [PATCH v2 1/1] gpiolib: Do not unexport GPIO on freeing Date: Mon, 5 Jun 2023 15:58:10 +0300 Message-Id: <20230605125810.61456-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767869132517810171?= X-GMAIL-MSGID: =?utf-8?q?1767869132517810171?= |
Series |
[v2,1/1] gpiolib: Do not unexport GPIO on freeing
|
|
Commit Message
Andy Shevchenko
June 5, 2023, 12:58 p.m. UTC
Since the legacy exporting is gone with 2f804aca4832 ("gpiolib:
Kill unused GPIOF_EXPORT and Co") there is no need to unexport
GPIO on freeing. Remove that call.
Note, the other users of this functionality do that explicitly,
except one SH and one OMAP boardfile which don't free GPIO anyways,
so it is safe to drop the call.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v2: mentioned OMAP boardfile as well
drivers/gpio/gpiolib.c | 2 --
1 file changed, 2 deletions(-)
Comments
On Mon, Jun 5, 2023 at 2:58 PM Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > Since the legacy exporting is gone with 2f804aca4832 ("gpiolib: > Kill unused GPIOF_EXPORT and Co") there is no need to unexport > GPIO on freeing. Remove that call. > > Note, the other users of this functionality do that explicitly, > except one SH and one OMAP boardfile which don't free GPIO anyways, > so it is safe to drop the call. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Yeah let's kill this off it is just annoying. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij
On Mon, Jun 5, 2023 at 2:58 PM Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > > Since the legacy exporting is gone with 2f804aca4832 ("gpiolib: > Kill unused GPIOF_EXPORT and Co") there is no need to unexport > GPIO on freeing. Remove that call. > > Note, the other users of this functionality do that explicitly, > except one SH and one OMAP boardfile which don't free GPIO anyways, > so it is safe to drop the call. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > --- > v2: mentioned OMAP boardfile as well > drivers/gpio/gpiolib.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c > index a8da38ee721a..7a9c9934365a 100644 > --- a/drivers/gpio/gpiolib.c > +++ b/drivers/gpio/gpiolib.c > @@ -2117,8 +2117,6 @@ static bool gpiod_free_commit(struct gpio_desc *desc) > > might_sleep(); > > - gpiod_unexport(desc); > - > spin_lock_irqsave(&gpio_lock, flags); > > gc = desc->gdev->chip; > -- > 2.40.0.1.gaa8946217a0b > Ah, you already sent a v2. I applied this one. Bart
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index a8da38ee721a..7a9c9934365a 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -2117,8 +2117,6 @@ static bool gpiod_free_commit(struct gpio_desc *desc) might_sleep(); - gpiod_unexport(desc); - spin_lock_irqsave(&gpio_lock, flags); gc = desc->gdev->chip;