From patchwork Sat May 15 07:59:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Ardelean X-Patchwork-Id: 439608 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F930C433ED for ; Sat, 15 May 2021 07:59:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 75A31613F7 for ; Sat, 15 May 2021 07:59:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233928AbhEOIAi (ORCPT ); Sat, 15 May 2021 04:00:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233788AbhEOIAh (ORCPT ); Sat, 15 May 2021 04:00:37 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0079C061756 for ; Sat, 15 May 2021 00:59:24 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id di13so1100528edb.2 for ; Sat, 15 May 2021 00:59:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=deviqon.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=t8BjOD14/zfrRT9J2IBjHxA1EstqGY6nrbX9XG/Uqgw=; b=Q/ehuhlO06rEtD0RVIMgwXJe67yhu6Fz46cpD/Ye6XiyQnAV6R+srVKCqlVhfPM3jP 45xUAQnK0YJGk/25MIGqW4qNEmAUIkgK/v6dGejdo2lCiaCfxUUD1dRFi4LgFBmadDwv G4vYwJDu8opTGhesnOItmD82eRQTy8CKQq6/gDHr7qgV/45DlR4kl07n/gcLGyyoQgE/ d9NlkuBtPJHDnzxal8JtfQJ+drCK/MdFQeZtWh3s6bDSccfu/x9YZW9Te3myFn/TZu12 RihZo7CpZnDgtFF8l0bwz8ohCkMqS8f59cxOfgGe3LJp90WYtcKf83GuF6woGTYm9WhJ p6gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=t8BjOD14/zfrRT9J2IBjHxA1EstqGY6nrbX9XG/Uqgw=; b=UDzHJFJmtY8H00MxYdUyxaI2dJXSZXfrM0bPiwnYofSTw9aAAbOsnQKAge966fJWKd ruhfvgkG4QgkMsOwtk9QpreWkhDZdSiBLoy9ZknNtA7m2308HwwrMlOEM5Omf0Jszvji UyiEitq3J7QnzVzulBMGs0xUZcUlrSpfbK6g9kxsnx2+eI+DO2VKz0SIatu9e4zyKGck wF5WCINjN4LtJjaqpurr8Gr8s/9cSS0irfsbnepGbLQbKBbPDSvkmVP/tN+LSl4G2JoW DnvPfE3qYGX6+tlq009FG/ps7t9T/Ck0enlF5b8sJ9ZFqFXY+U7HBMo0VXSIDxlzR5rV +/2A== X-Gm-Message-State: AOAM532pQjByzJ6tQ4B3pHhQGlmOjqvv8HIa5baXajWlXi5ECH41wn9W Na1TfjAJdgbYcFdZ9yDdG6eWojbTMn8/VNsiLYI= X-Google-Smtp-Source: ABdhPJzEMypq/3EyajT0dRbWrPY8bLNymglDBOtSpgmLaFZdgFURQuip3b5LhNIDHb7dwKy0Mj8qDg== X-Received: by 2002:a05:6402:204b:: with SMTP id bc11mr60780971edb.40.1621065563457; Sat, 15 May 2021 00:59:23 -0700 (PDT) Received: from neptune.. ([188.27.131.122]) by smtp.gmail.com with ESMTPSA id ch30sm6185520edb.92.2021.05.15.00.59.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 May 2021 00:59:23 -0700 (PDT) From: Alexandru Ardelean To: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: linus.walleij@linaro.org, bgolaszewski@baylibre.com, jonathanh@nvidia.com, thierry.reding@gmail.com, Alexandru Ardelean Subject: [PATCH 1/2] gpio: gpio-tegra186: remove empty remove hook Date: Sat, 15 May 2021 10:59:04 +0300 Message-Id: <20210515075905.12150-1-aardelean@deviqon.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The tegra186_gpio_remove hook simply does a return 0. Not defining it yields pretty much the same result. So, this can be removed. Signed-off-by: Alexandru Ardelean --- drivers/gpio/gpio-tegra186.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/gpio/gpio-tegra186.c b/drivers/gpio/gpio-tegra186.c index 1bd9e44df718..10d3597e9ac2 100644 --- a/drivers/gpio/gpio-tegra186.c +++ b/drivers/gpio/gpio-tegra186.c @@ -750,11 +750,6 @@ static int tegra186_gpio_probe(struct platform_device *pdev) return 0; } -static int tegra186_gpio_remove(struct platform_device *pdev) -{ - return 0; -} - #define TEGRA186_MAIN_GPIO_PORT(_name, _bank, _port, _pins) \ [TEGRA186_MAIN_GPIO_PORT_##_name] = { \ .name = #_name, \ @@ -924,7 +919,6 @@ static struct platform_driver tegra186_gpio_driver = { .of_match_table = tegra186_gpio_of_match, }, .probe = tegra186_gpio_probe, - .remove = tegra186_gpio_remove, }; module_platform_driver(tegra186_gpio_driver); From patchwork Sat May 15 07:59:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandru Ardelean X-Patchwork-Id: 439979 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 269B8C433B4 for ; Sat, 15 May 2021 07:59:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F2727613F7 for ; Sat, 15 May 2021 07:59:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234087AbhEOIAj (ORCPT ); Sat, 15 May 2021 04:00:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234009AbhEOIAi (ORCPT ); Sat, 15 May 2021 04:00:38 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 004B9C061760 for ; Sat, 15 May 2021 00:59:25 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id lg14so1864376ejb.9 for ; Sat, 15 May 2021 00:59:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=deviqon.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ruDxV1+JrGkaktFClfUuq6154xx3fQbfsw7mksEIy9Y=; b=JrVcVvCWfvm8b5KZexbt5w3BqB/YLkpXSvMsA3E9+gGxzlIgQ1VVLGdXArS3k1mWxb sZ/OPRv1Oliw2pxndFLmhxTnJpGWD80PtZVZSOZ43mPkxyVJf+9RndhvFv5dmlTNUY+V YV/Xnu9I94ySl4jX8NI9ZUi3mBdBPsJKq5r0ZqTjCE/wIPQ+JUdXBgeoQpDu8Cgjyz7/ brEPijUIN9pDhZppJTGtqj/THjZ+PhrbbDmEG1R2gJGx6TkX7LYHPWqQ6sSQczIw2O87 J3XKibRwPfLy4Reh9a7IJP9tkGHet0Rxsh9VUec6rse5THIlUJqn3+TvTIukZS7OAbDR acPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ruDxV1+JrGkaktFClfUuq6154xx3fQbfsw7mksEIy9Y=; b=fzj2FKYoF/qqvIF1SaieTITYij6vquK8g/rnli0YOKxOaI1MYbGNDDJM8lqtC49L/Y kettXZWhZFkU6Rm7gKIZh7MAMyCU5QR+1aF7xe2CllPGjM2sS/oFOo1qqzEOEhcj2ZyM S94eS9lE7IQ1Q3emRD2IngestVRJxPxrnhI2Ne4jOKHVnQUBvxGju1nl8oamHRzJzoKi 8LBenHwvLkYiyVmBNyxjEmcVRqKW4RQEM/UG/67viYtWqOW38FLfOZITPTib8vExWnbE /dj45MwGmlemLCpyuRFAEHx8t+ykJvNckK36xznJwqUSWKBKiRwwSDKzK7mFlac/ghXK 5nZw== X-Gm-Message-State: AOAM532/bSqEglnmhcIaFPt+PujH6LOtYSi93z5YIX7M2k35dX5+iEL5 eRThvZgcrNiB2YAeoEz4m2jqMuAqV4M9alLC/9w= X-Google-Smtp-Source: ABdhPJz+mAdIayNn9GvTEbcAjrn2FCebQe6IE68YmK3rdXeyYhUFWqskChd7cVtIL1EL5M1agqzMjQ== X-Received: by 2002:a17:906:a403:: with SMTP id l3mr53422894ejz.251.1621065564449; Sat, 15 May 2021 00:59:24 -0700 (PDT) Received: from neptune.. ([188.27.131.122]) by smtp.gmail.com with ESMTPSA id ch30sm6185520edb.92.2021.05.15.00.59.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 May 2021 00:59:24 -0700 (PDT) From: Alexandru Ardelean To: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: linus.walleij@linaro.org, bgolaszewski@baylibre.com, jonathanh@nvidia.com, thierry.reding@gmail.com, Alexandru Ardelean Subject: [PATCH 2/2] gpio: gpio-tegra186: remove platform_set_drvdata() + cleanup probe Date: Sat, 15 May 2021 10:59:05 +0300 Message-Id: <20210515075905.12150-2-aardelean@deviqon.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210515075905.12150-1-aardelean@deviqon.com> References: <20210515075905.12150-1-aardelean@deviqon.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The platform_set_drvdata() call is only useful if we need to retrieve back the private information. Since the driver doesn't do that, it's not useful to have it. If this is removed, we can also just do a direct return on devm_gpiochip_add_data(). We don't need to print that this call failed as there are other ways to log/see this during probe. Signed-off-by: Alexandru Ardelean --- drivers/gpio/gpio-tegra186.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpio/gpio-tegra186.c b/drivers/gpio/gpio-tegra186.c index 10d3597e9ac2..f54ae9d4254a 100644 --- a/drivers/gpio/gpio-tegra186.c +++ b/drivers/gpio/gpio-tegra186.c @@ -741,13 +741,7 @@ static int tegra186_gpio_probe(struct platform_device *pdev) offset += port->pins; } - platform_set_drvdata(pdev, gpio); - - err = devm_gpiochip_add_data(&pdev->dev, &gpio->gpio, gpio); - if (err < 0) - return err; - - return 0; + return devm_gpiochip_add_data(&pdev->dev, &gpio->gpio, gpio); } #define TEGRA186_MAIN_GPIO_PORT(_name, _bank, _port, _pins) \