From patchwork Wed Feb 15 13:42:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13141688 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 EA221C636CC for ; Wed, 15 Feb 2023 13:43:43 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=le1I+Lb62gR++T5xsf8M49kGmdaaSEMlqK2aSkBfx/g=; b=shVUkQ1siPcs7T MGfALH3tudxffij2QXlgn725rosZL7+0s2SBznW7H1zsmzY5NqcYQpKHzhM9NyNS+zOqlwFwPWu9B iYB4N3HUuT31pDRTWbB1iesHKL/cehW/wSdBW7LLhVrc3yfLBThFVTGpBrrvlX18sS+lgf2eBL00a T5eC+F2OOOYx8GuqI8Mjpk4684ALjsYsCZUsPvPDfpsoYeg+jN9J1BCSBnmnoTuiVVlqT2z1DMpR9 QzkgBTfcKuTcOyAIQ/PRE8d40I1Qo3jZ3pTfxjMmKnvBsJEeUWhhAaxDqCIsDxDl1nX9p4UR3OUeE i2e8dxXuEf12WjSA5bAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSI3d-00642e-AK; Wed, 15 Feb 2023 13:42:49 +0000 Received: from mga01.intel.com ([192.55.52.88]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSI32-0063o2-PB for linux-arm-kernel@lists.infradead.org; Wed, 15 Feb 2023 13:42:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676468532; x=1708004532; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PGZTgxIhMsUzgY8FxmNXbX88JsjVT1Ty1RH/GYeJM58=; b=MwXu3+UH4NPkVvgF4AFB1qTWe1gmYIWfOA+MjgVNboA2aIRQkJnTxNjG QjPBZTirOWnxxVx0c/fN8XfHGVj/mEPxRHZu8nq1gR8t4HY90gMmu7eQV wp0ocIc6QOP5WwNA0s+nc1adIPioyBpw8iMrWwCKFnCHamcB+b+n2WBfV aG9UQeRvL6uvUcFfW8PY/8MT6G6XBoAhWDYb7IAYEsIllCDJEFOBJ5G/W IiynaJMVkry9vFuue8l/mK+VfhUIY5dyXGpuusbV4uEPm6CNSzxHGBPc+ L8sNWhodlLv6HpVqOndhv3r3ZXEjtGz/6PA60oTjq6z4O73m5N7Nk1Awe w==; X-IronPort-AV: E=McAfee;i="6500,9779,10621"; a="358849425" X-IronPort-AV: E=Sophos;i="5.97,299,1669104000"; d="scan'208";a="358849425" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2023 05:42:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10621"; a="793502741" X-IronPort-AV: E=Sophos;i="5.97,299,1669104000"; d="scan'208";a="793502741" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga004.jf.intel.com with ESMTP; 15 Feb 2023 05:42:04 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 5F2E2210; Wed, 15 Feb 2023 15:42:44 +0200 (EET) From: Andy Shevchenko To: linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 3/5] pinctrl: at91: Use of_device_get_match_data() Date: Wed, 15 Feb 2023 15:42:40 +0200 Message-Id: <20230215134242.37618-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230215134242.37618-1-andriy.shevchenko@linux.intel.com> References: <20230215134242.37618-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230215_054212_874617_80C00602 X-CRM114-Status: GOOD ( 12.63 ) 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: , Cc: Alexandre Belloni , Linus Walleij , Ludovic Desroches , Andy Shevchenko , Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use of_device_get_match_data() to simplify the code. Signed-off-by: Andy Shevchenko Reviewed-by: Claudiu Beznea Tested-by: Claudiu Beznea --- drivers/pinctrl/pinctrl-at91.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index 6d9015ed8a3b..055a88b2dacc 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c @@ -1304,8 +1304,7 @@ static int at91_pinctrl_probe_dt(struct platform_device *pdev, return -ENODEV; info->dev = &pdev->dev; - info->ops = (const struct at91_pinctrl_mux_ops *) - of_match_device(at91_pinctrl_of_match, &pdev->dev)->data; + info->ops = of_device_get_match_data(dev); at91_pinctrl_child_count(info, np); /* @@ -1844,8 +1843,7 @@ static int at91_gpio_probe(struct platform_device *pdev) goto err; } - at91_chip->ops = (const struct at91_pinctrl_mux_ops *) - of_match_device(at91_gpio_of_match, &pdev->dev)->data; + at91_chip->ops = of_device_get_match_data(dev); at91_chip->pioc_virq = irq; at91_chip->pioc_idx = alias_idx;