From mboxrd@z Thu Jan 1 00:00:00 1970 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 B4B69C636D7 for ; Fri, 10 Feb 2023 14:56:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232529AbjBJO40 (ORCPT ); Fri, 10 Feb 2023 09:56:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232234AbjBJO4Y (ORCPT ); Fri, 10 Feb 2023 09:56:24 -0500 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB7C36C7E0; Fri, 10 Feb 2023 06:56:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676040983; x=1707576983; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=o+AkmZ/j0Ltm2vhm8z9qz/CNnGgU1gRksq4fGSdRq2A=; b=ZRAVI9lZewkGovCvJFA4ELxbEj7yNcislun+FbR2mWA3NF5s/oyleXo4 PnOsYPkexDk258+v7jjl84c8EwcUP2o9kkk10zKrmLOUKXqSfE6QpU+KD T85pNX3pTBK5DhwAySm4DGc8TD+AY3xOUTvAmirM+x5YzMFTNpmiZ5t9F dZ3pCYtoCZE9DblHapwkrq9GN3QkTMyGa8JyHhrTw9khRVFypTZOY0i6Z iiZIXyqESEgPaaKwjuB+sHSDB4HscaY4BqiHTI548zgqV7adXdd3Y8HDR Avo0Fv3yc1x53lqqvCa0TKWoaYyo5N06DTPrSdT/4x+an3Fz0jLAexbJV w==; X-IronPort-AV: E=McAfee;i="6500,9779,10617"; a="395041588" X-IronPort-AV: E=Sophos;i="5.97,287,1669104000"; d="scan'208";a="395041588" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2023 06:56:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10617"; a="776953052" X-IronPort-AV: E=Sophos;i="5.97,287,1669104000"; d="scan'208";a="776953052" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 10 Feb 2023 06:56:19 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id EFF961F8; Fri, 10 Feb 2023 16:56:57 +0200 (EET) From: Andy Shevchenko To: linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ludovic Desroches , Linus Walleij , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Andy Shevchenko Subject: [PATCH v1 3/5] pinctrl: at91: Use of_device_get_match_data() Date: Fri, 10 Feb 2023 16:56:54 +0200 Message-Id: <20230210145656.71838-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230210145656.71838-1-andriy.shevchenko@linux.intel.com> References: <20230210145656.71838-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Use of_device_get_match_data() to simplify the code. Signed-off-by: Andy Shevchenko --- 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 6d5ebdae0bf9..203a29ad9344 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; -- 2.39.1 From mboxrd@z Thu Jan 1 00:00:00 1970 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 92CE9C05027 for ; Fri, 10 Feb 2023 14:57:48 +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=H2xKQZEKnT5x/uswCi0s/+YeYgfqSI1eapKN9IGcI18=; b=uEHRHzIi6j6Olf 4oGP/zNP8zjTxiyHrxUahlm7Q1XWJB1SEos0FgMUFeaHB6z66bihPlfpY9ZCtWHEgcAnEk3cUkU+Z EwhjzY1FD6+LvmOz0x+HZP4G3pmdvY4oa1hDhtOBRi5lQEhyRtYibn5mFUca8lonwz+08O2S8OLVk uEv4f5pREqGK9Wue1BcBfk/N/Tp5+KRsZ2DyWmdm4+cEWbHYVshT7B9IEUNM1vLvRJNPmMlVmmd+4 UjVygqj+GZoDKOQZZadJl4HqiJLxpx8Gk3+EZjkhqYQm913eMQUY8/EagzyFfwpgOtWbOoz4KlzUZ LAQ3y+BTgCf9ZXHh/GSA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQUpT-0068Be-12; Fri, 10 Feb 2023 14:56:47 +0000 Received: from mga07.intel.com ([134.134.136.100]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQUp8-0067yY-Af for linux-arm-kernel@lists.infradead.org; Fri, 10 Feb 2023 14:56:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676040986; x=1707576986; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=o+AkmZ/j0Ltm2vhm8z9qz/CNnGgU1gRksq4fGSdRq2A=; b=Attpm4ZUTgA3Kqu5INd6r2Xl08mRQlZpCmqSDtTkuGAcEHPQxgrzzvfr rrd+EOsxNqNCtJjlkjh4rAVI7Z535eVWfH3wZhxFcRWh2dyrcPRcx1tsp oH488/+Uf6RjYL2cculAcACf7q4pDHjyuYHLebTV6clomy+1lIy5gnnMj B9iHrXl3r5ilWJLDOkVj/teoQtNSZst4tgfarmr5bVwPSXZ/HIC5qbLbb CCyvRmDNRfX1F5W/i9EmgRvMxKPSb6sgJlg2JGqUjxqLVjGhO2lX3a4Ei 1ydeKFKsay+0vj8qgCpZ2obm3RJDfnwHfZtWe0VREDgSTQAY7kPWekxKd A==; X-IronPort-AV: E=McAfee;i="6500,9779,10617"; a="395041592" X-IronPort-AV: E=Sophos;i="5.97,287,1669104000"; d="scan'208";a="395041592" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2023 06:56:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10617"; a="776953052" X-IronPort-AV: E=Sophos;i="5.97,287,1669104000"; d="scan'208";a="776953052" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 10 Feb 2023 06:56:19 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id EFF961F8; Fri, 10 Feb 2023 16:56:57 +0200 (EET) From: Andy Shevchenko To: linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 3/5] pinctrl: at91: Use of_device_get_match_data() Date: Fri, 10 Feb 2023 16:56:54 +0200 Message-Id: <20230210145656.71838-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230210145656.71838-1-andriy.shevchenko@linux.intel.com> References: <20230210145656.71838-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-20230210_065626_492797_AB880FA3 X-CRM114-Status: GOOD ( 12.47 ) 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 --- 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 6d5ebdae0bf9..203a29ad9344 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; -- 2.39.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel