From patchwork Thu Jul 20 13:25:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrei Coardos X-Patchwork-Id: 704728 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 109CDEB64DC for ; Thu, 20 Jul 2023 13:26:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231895AbjGTN0m (ORCPT ); Thu, 20 Jul 2023 09:26:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231904AbjGTN0k (ORCPT ); Thu, 20 Jul 2023 09:26:40 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89BAB1BFC; Thu, 20 Jul 2023 06:26:36 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-4f95bf5c493so1250308e87.3; Thu, 20 Jul 2023 06:26:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689859594; x=1690464394; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=eQjJSdjGFyH05KUOiJ895s0EmBFeOD2VpWV79nK2wRs=; b=mWkpt2DTKfUgTc4WPZCOOd54l/zrdumAL85ULv383Icr6DbPQM10Tf8dQN4PhLNAbW Rd5WFG3mTuVIPo/67H8aWC1Nzj+X9hyimt7ig5DcalbzimBAlGQE1D4G+Xmz3JGP/lI8 XLb10MFTUYmhKvpcqzonh5S8rqJBr3pDLwT9v/xTxftgJV8grxtPxYrtRDUsKD96UMvz Kq4yTTokTD8gOfpPifBP1Mg3YZijw0EN/gdgKO0iC2Cqbyh9MyJ7/JZbS5GZsGzKpF8L D5c+pwwuka6GBz8SGR371kZy5x+LNeQPu5MsTGtCc5ggOdiN7cU1ZkesqRb4fa/UzpnR A2eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689859594; x=1690464394; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eQjJSdjGFyH05KUOiJ895s0EmBFeOD2VpWV79nK2wRs=; b=OQObmKjqm3V2a7MJah0wzoX5XLUWSwCezZkObYEjAeiLAy7CNfjrJPfZUqmriZjg+I cE7tHxxcrLff4vxmg/oE0PAYctG5xNvkMTlH+YzFkCaCAWOX6fR0UYJFOyvE2HPypImu Tzsp8ySlFka/lNtHn+VItLkn78iVrKxEDU2xOFt0gwkP8JSWEq1KqJx0c7pWQW0U8QaF wMo3AlOPDMPcptsVaVxTpX0S/Hhf1/3arVZfTLZfgXnPUxnl94UxPjeSGsaboljiz2ey 59gpmqzxfV2aXofDxnTYFhQU4rA2iej4+u30alATmhbO644Ebyo/kYGCkvPUWQZQNXiG vDoA== X-Gm-Message-State: ABy/qLbUaexR59twQgyj9gm/ApuurOIrvOUeFs+ocptT48nAnQ3wCKBw unRrBVOMGYto3rwvdzr5y0GqDpLF+Kg3Yw== X-Google-Smtp-Source: APBJJlH8kOxkAXearW8UDPPr/lNtU09v2e9Bye/a0V/wQ0qRm9PSrZG9grgXR7WP7fhlgo+k4OSz7g== X-Received: by 2002:a05:6512:2356:b0:4f8:714e:27a8 with SMTP id p22-20020a056512235600b004f8714e27a8mr2443843lfu.0.1689859594136; Thu, 20 Jul 2023 06:26:34 -0700 (PDT) Received: from localhost.localdomain ([92.85.190.61]) by smtp.gmail.com with ESMTPSA id j15-20020a170906254f00b00992d122af63sm706728ejb.89.2023.07.20.06.26.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jul 2023 06:26:33 -0700 (PDT) From: Andrei Coardos To: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Cc: andy@kernel.org, brgl@bgdev.pl, linus.walleij@linaro.org, Andrei Coardos , Alexandru Ardelean Subject: [PATCH] gpio : max77620: remove unneeded platform_set_drvdata() call Date: Thu, 20 Jul 2023 16:25:35 +0300 Message-Id: <20230720132535.23413-1-aboutphysycs@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This function call is not required because no counterpart platform_get_drvdata() call is present to leverage the private data of the driver. Since the private data is confined to this driver file, external access is not feasible. The use of this function appears redundant in the current context of the driver's implementation. Reviewed-by: Alexandru Ardelean Signed-off-by: Andrei Coardos --- drivers/gpio/gpio-max77620.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpio/gpio-max77620.c b/drivers/gpio/gpio-max77620.c index c18b60e39a94..8c2a5609161f 100644 --- a/drivers/gpio/gpio-max77620.c +++ b/drivers/gpio/gpio-max77620.c @@ -331,8 +331,6 @@ static int max77620_gpio_probe(struct platform_device *pdev) girq->init_hw = max77620_gpio_irq_init_hw; girq->threaded = true; - platform_set_drvdata(pdev, mgpio); - ret = devm_gpiochip_add_data(&pdev->dev, &mgpio->gpio_chip, mgpio); if (ret < 0) { dev_err(&pdev->dev, "gpio_init: Failed to add max77620_gpio\n");