From patchwork Thu Jan 12 16:39:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13098323 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 4F4BEC54EBC for ; Thu, 12 Jan 2023 16:40:52 +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: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:In-Reply-To:References: List-Owner; bh=ZYasPvYXXNiS/CaknADazBEzcKU3iegh1sP5/iQqG+0=; b=fHtDM++MrYuKlx M67GCqaJvNAYv7GyAEj+IzXU/mWEmL8oFS3pZmtCQUjLcUSAPKGzwDsOY4e/clJu0t+puIkZaX2ey YgrtqSM6v1/o+utHActXEzoRCyJFWFTyMbqXHrbT8XqtM8zmqgPloTTDyuwtN83xxjuQ3+/F9F6oT VSOTwGFfTqR/1czVjWr6UREEBfk1o6oNITcKQfhXoEDN3aXcuB4jUVN6R+d/N7HSGrd+3cS+ZOJCk SPKiBdxZGS0Odkg0DwpDhouW2Mu3IO/oDhDkZ55SzwkbBoO+iSMqzPuzK2jPVNZLvBH8nDoznbM5F SIPYUietqqZ0VIjdmeXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pG0cK-00FtCB-Lu; Thu, 12 Jan 2023 16:39:52 +0000 Received: from mga14.intel.com ([192.55.52.115]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pG0cG-00Ft9q-JJ for linux-arm-kernel@lists.infradead.org; Thu, 12 Jan 2023 16:39:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673541588; x=1705077588; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=fCnoikO59aYEJe3y7pYtBBoi1zVtcj8w0L1hqCtMZDc=; b=jlBwjydleyB2LFYj8kgFBbRlRZr4dDptAj46yFMBQnp0ZLxLChU+jnn5 uiq4R6gzs4u8FjS5VpyZMdiQvmxW0/IWwExYJLsikuJIqp80VnQpElGTF DYZfLunKmKK/F5L1l7UjYNkxKw6gL1HRToLxTXRE3JLscPiEX+PXBa6yp edsXDtBw9/t5ugBATExjLUmZrgr6FXb8/U4lt1J32DmhFM2DDDRNrjvcW th/JmqEEohGWTsYGW/GN7NqsvMZltayPpjwvtOTrehnA7ChOHPuAeOfrC O9KHay8Uxcz30KfZgebeymoXvIUoKzLxstaexawRBDE/BiYsVtRVDgfdU g==; X-IronPort-AV: E=McAfee;i="6500,9779,10588"; a="323814546" X-IronPort-AV: E=Sophos;i="5.97,211,1669104000"; d="scan'208";a="323814546" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2023 08:39:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10588"; a="721153141" X-IronPort-AV: E=Sophos;i="5.97,211,1669104000"; d="scan'208";a="721153141" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga008.fm.intel.com with ESMTP; 12 Jan 2023 08:39:19 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 9FD4CE1; Thu, 12 Jan 2023 18:39:53 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Shubhrajyoti Datta , Srinivas Neeli , Michal Simek , Linus Walleij , Bartosz Golaszewski Subject: [PATCH v1 1/1] gpio: xilinx: Remove duplicate assignment of of_gpio_n_cells Date: Thu, 12 Jan 2023 18:39:51 +0200 Message-Id: <20230112163951.73180-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230112_083948_696749_6352237E X-CRM114-Status: GOOD ( 12.46 ) 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 The of_gpio_n_cells default is 2 when ->of_xlate() callback is not defined. No need to assign it explicitly in the driver. Signed-off-by: Andy Shevchenko --- drivers/gpio/gpio-xilinx.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c index 619a00ad71d4..bbcde91135b9 100644 --- a/drivers/gpio/gpio-xilinx.c +++ b/drivers/gpio/gpio-xilinx.c @@ -558,7 +558,6 @@ static int xgpio_probe(struct platform_device *pdev) int status = 0; struct device_node *np = pdev->dev.of_node; u32 is_dual = 0; - u32 cells = 2; u32 width[2]; u32 state[2]; u32 dir[2]; @@ -591,15 +590,6 @@ static int xgpio_probe(struct platform_device *pdev) bitmap_from_arr32(chip->dir, dir, 64); - /* Update cells with gpio-cells value */ - if (of_property_read_u32(np, "#gpio-cells", &cells)) - dev_dbg(&pdev->dev, "Missing gpio-cells property\n"); - - if (cells != 2) { - dev_err(&pdev->dev, "#gpio-cells mismatch\n"); - return -EINVAL; - } - /* * Check device node and parent device node for device width * and assume default width of 32 @@ -630,7 +620,6 @@ static int xgpio_probe(struct platform_device *pdev) chip->gc.parent = &pdev->dev; chip->gc.direction_input = xgpio_dir_in; chip->gc.direction_output = xgpio_dir_out; - chip->gc.of_gpio_n_cells = cells; chip->gc.get = xgpio_get; chip->gc.set = xgpio_set; chip->gc.request = xgpio_request;