Message ID | 20231122164040.2262742-2-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp1463234vqb; Wed, 22 Nov 2023 08:57:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IEIfU4ptXpqjgYs996hmuVJI7Q20/DJAXKJI/a4POm9aC1TibIbLSAOpg10iFzS+xSBGw+G X-Received: by 2002:a05:6a21:788b:b0:172:918b:3907 with SMTP id bf11-20020a056a21788b00b00172918b3907mr3222362pzc.54.1700672228986; Wed, 22 Nov 2023 08:57:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700672228; cv=none; d=google.com; s=arc-20160816; b=owx5lHpviw/WLgw8UR5fxsWMtkm1N0X9YIzI3kuk5em2l5pdjIqXGQNzTos7nXmHS7 eup34Is5Rp6aAkCt4ZpiEBF1RmbtIU2kwoSHx6f4t1ZYG6Rz/Gcclw2CZ3u8PUdDoRbL 4Gn0R66VE+orGYY+BDmmRivmxAAsxTI1V9aBcBQHfvgmEDGLW+6kwFNKIOr63u/s7DwU 9Nf2rO4/45dkM35QMSLxrcM7ePHgDSrKwM7mKVZBcuLRGFvVdloa6ewuV+5Povm/s+1D znVWDyzdORQMLJH0+xKvp8rn1b8VvPLychPhDPt/GzC3goErx+Zbpae7LoQEcXobB0rc JUPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=w7zRKHolBLv5gVPiB/7MCiE6HClGY+C3zfglzlEMz6o=; fh=sxmBgIg3TktvEv2YZkVPRGvTPPCg6dr/2rID5e1JPXk=; b=XOvZO9+4UhueJBxXsW6UOv1+WepDCyp0AxDKWs7FG7NGwFL/mcsWCuaLLBx4MloaaT P15/FPuy78pqQgkuaigdAOXw+kZbgNodn7uzvkzVmX7KomoavU8d11YP0md8xqZDJ9PO AwLtQ0PHQNf/2JL8nZruRJyguwPQiArQ58z5QRsBjiamxeFM9DzlwidmLuxw/6cGcwlu MqKj+bo/cVLV7JEer5q5UvcP5uEGcx5lGuUGOzkt8b0QHB92yDbZUAusTaLMzIKMDRfV Tg8VXqvHMuKQ9XvMu7ftcGA4kNBvrZBWXvNfSrQ9OVcrksVW/ZArHK/6dX2LqIHM3iKM tHXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nn3B6ZqC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id b19-20020a056a000a9300b0068895dea43csi13111813pfl.78.2023.11.22.08.57.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 08:57:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nn3B6ZqC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id C82578260F47; Wed, 22 Nov 2023 08:57:00 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343647AbjKVQ45 (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Wed, 22 Nov 2023 11:56:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232069AbjKVQ4z (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 22 Nov 2023 11:56:55 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA28A11F; Wed, 22 Nov 2023 08:56:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700672212; x=1732208212; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+w70dijnIhYAk0vVK1fe5YJSScdtigXGehzr6Lwxbvg=; b=nn3B6ZqCB4UG2LwrxYm48bgHXm2vJJqjTn8Npi8cgHucLkkEb+xXjNQl dBOW+zcKYt4r16/T8FsODItD3hoc6pJhqtDHXSA+N1KahEnAvV4uyf98z XP/sU1y17Q8VicBN6ppcigHxSK6SWZfC/Oqf1PeZlZFsLkX7XUyVGlMBx SaN6JkEXSPPFJ57BQoFHLfRqBxJTIvkC64crQeb8Bt8kKwpScf26uSgq7 M4AmwLNV7zNTW63DhvltHQj7q1OWVcg5sqSxWATSO+DLylfGAsQMAC7B6 2yekQXZuSf5SKGRw6DiapHiqm8rZMsFEjwyeVnfFfm0xPeJWl8plo03H8 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="5235476" X-IronPort-AV: E=Sophos;i="6.04,219,1695711600"; d="scan'208";a="5235476" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2023 08:56:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="857815517" X-IronPort-AV: E=Sophos;i="6.04,219,1695711600"; d="scan'208";a="857815517" Received: from black.fi.intel.com ([10.237.72.28]) by FMSMGA003.fm.intel.com with ESMTP; 22 Nov 2023 08:56:16 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id E3FE6FD; Wed, 22 Nov 2023 18:40:44 +0200 (EET) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <bartosz.golaszewski@linaro.org>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Rasmus Villemoes <linux@rasmusvillemoes.dk>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, =?utf-8?q?Uwe_Kleine-?= =?utf-8?q?K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, Geert Uytterhoeven <geert+renesas@glider.be>, Biju Das <biju.das.jz@bp.renesas.com>, Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>, Jianlong Huang <jianlong.huang@starfivetech.com>, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, openbmc@lists.ozlabs.org, linux-mips@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org Cc: Ray Jui <rjui@broadcom.com>, Scott Branden <sbranden@broadcom.com>, Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>, Dong Aisheng <aisheng.dong@nxp.com>, Fabio Estevam <festevam@gmail.com>, Shawn Guo <shawnguo@kernel.org>, Jacky Bai <ping.bai@nxp.com>, Pengutronix Kernel Team <kernel@pengutronix.de>, Sascha Hauer <s.hauer@pengutronix.de>, NXP Linux Team <linux-imx@nxp.com>, Sean Wang <sean.wang@kernel.org>, =?utf-8?q?Jonathan_Neusch=C3=A4fer?= <j.neuschaefer@gmx.net>, Paul Cercueil <paul@crapouillou.net>, Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>, Bjorn Andersson <andersson@kernel.org>, Andy Gross <agross@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Emil Renner Berthing <kernel@esmil.dk>, Hal Feng <hal.feng@starfivetech.com> Subject: [PATCH v1 01/17] pinctrl: equilibrium: Convert to use struct pingroup Date: Wed, 22 Nov 2023 18:35:33 +0200 Message-ID: <20231122164040.2262742-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20231122164040.2262742-1-andriy.shevchenko@linux.intel.com> References: <20231122164040.2262742-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 22 Nov 2023 08:57:01 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783284083485333344 X-GMAIL-MSGID: 1783284083485333344 |
Series |
pinctrl: Convert struct group_desc to use struct pingroup
|
|
Commit Message
Andy Shevchenko
Nov. 22, 2023, 4:35 p.m. UTC
The pin control header provides struct pingroup.
Utilize it instead of open coded variants in the driver.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/pinctrl/pinctrl-equilibrium.c | 32 +++++++++++++--------------
1 file changed, 15 insertions(+), 17 deletions(-)
Comments
Hi Andy, kernel test robot noticed the following build errors: [auto build test ERROR on linusw-pinctrl/devel] [also build test ERROR on linusw-pinctrl/for-next geert-renesas-drivers/renesas-pinctrl pinctrl-samsung/for-next linus/master v6.7-rc2 next-20231122] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/pinctrl-equilibrium-Convert-to-use-struct-pingroup/20231123-005932 base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel patch link: https://lore.kernel.org/r/20231122164040.2262742-2-andriy.shevchenko%40linux.intel.com patch subject: [PATCH v1 01/17] pinctrl: equilibrium: Convert to use struct pingroup config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20231123/202311230820.oBQop844-lkp@intel.com/config) compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231123/202311230820.oBQop844-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202311230820.oBQop844-lkp@intel.com/ All errors (new ones prefixed by >>): >> drivers/pinctrl/pinctrl-equilibrium.c:750:17: error: read-only variable is not assignable grp->pins[j] = pin_id; ~~~~~~~~~~~~ ^ >> drivers/pinctrl/pinctrl-equilibrium.c:761:23: error: no member named 'num_pins' in 'struct pingroup' grp->pins, grp->num_pins, ~~~ ^ 2 errors generated. vim +750 drivers/pinctrl/pinctrl-equilibrium.c 702 703 static int eqbr_build_groups(struct eqbr_pinctrl_drv_data *drvdata) 704 { 705 struct device *dev = drvdata->dev; 706 struct device_node *node = dev->of_node; 707 unsigned int *pinmux, pin_id, pinmux_id; 708 struct pingroup group, *grp = &group; 709 struct device_node *np; 710 struct property *prop; 711 int j, err; 712 713 for_each_child_of_node(node, np) { 714 prop = of_find_property(np, "groups", NULL); 715 if (!prop) 716 continue; 717 718 grp->npins = of_property_count_u32_elems(np, "pins"); 719 if (grp->npins < 0) { 720 dev_err(dev, "No pins in the group: %s\n", prop->name); 721 of_node_put(np); 722 return -EINVAL; 723 } 724 grp->name = prop->value; 725 grp->pins = devm_kcalloc(dev, grp->npins, sizeof(*grp->pins), GFP_KERNEL); 726 if (!grp->pins) { 727 of_node_put(np); 728 return -ENOMEM; 729 } 730 731 pinmux = devm_kcalloc(dev, grp->npins, sizeof(*pinmux), GFP_KERNEL); 732 if (!pinmux) { 733 of_node_put(np); 734 return -ENOMEM; 735 } 736 737 for (j = 0; j < grp->npins; j++) { 738 if (of_property_read_u32_index(np, "pins", j, &pin_id)) { 739 dev_err(dev, "Group %s: Read intel pins id failed\n", 740 grp->name); 741 of_node_put(np); 742 return -EINVAL; 743 } 744 if (pin_id >= drvdata->pctl_desc.npins) { 745 dev_err(dev, "Group %s: Invalid pin ID, idx: %d, pin %u\n", 746 grp->name, j, pin_id); 747 of_node_put(np); 748 return -EINVAL; 749 } > 750 grp->pins[j] = pin_id; 751 if (of_property_read_u32_index(np, "pinmux", j, &pinmux_id)) { 752 dev_err(dev, "Group %s: Read intel pinmux id failed\n", 753 grp->name); 754 of_node_put(np); 755 return -EINVAL; 756 } 757 pinmux[j] = pinmux_id; 758 } 759 760 err = pinctrl_generic_add_group(drvdata->pctl_dev, grp->name, > 761 grp->pins, grp->num_pins, 762 pinmux); 763 if (err < 0) { 764 dev_err(dev, "Failed to register group %s\n", grp->name); 765 of_node_put(np); 766 return err; 767 } 768 memset(&group, 0, sizeof(group)); 769 pinmux = NULL; 770 } 771 772 return 0; 773 } 774
Hi Andy, kernel test robot noticed the following build warnings: [auto build test WARNING on linusw-pinctrl/devel] [also build test WARNING on linusw-pinctrl/for-next geert-renesas-drivers/renesas-pinctrl pinctrl-samsung/for-next linus/master v6.7-rc2 next-20231122] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/pinctrl-equilibrium-Convert-to-use-struct-pingroup/20231123-005932 base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel patch link: https://lore.kernel.org/r/20231122164040.2262742-2-andriy.shevchenko%40linux.intel.com patch subject: [PATCH v1 01/17] pinctrl: equilibrium: Convert to use struct pingroup config: i386-randconfig-001-20231123 (https://download.01.org/0day-ci/archive/20231123/202311230820.MGDyVHJW-lkp@intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231123/202311230820.MGDyVHJW-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202311230820.MGDyVHJW-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/pinctrl/pinctrl-equilibrium.c: In function 'eqbr_build_groups': drivers/pinctrl/pinctrl-equilibrium.c:750:17: error: assignment of read-only location '*(grp->pins + (sizetype)((unsigned int)j * 4))' 750 | grp->pins[j] = pin_id; | ^ drivers/pinctrl/pinctrl-equilibrium.c:761:23: error: 'struct pingroup' has no member named 'num_pins'; did you mean 'npins'? 761 | grp->pins, grp->num_pins, | ^~~~~~~~ | npins >> drivers/pinctrl/pinctrl-equilibrium.c:761:10: warning: passing argument 3 of 'pinctrl_generic_add_group' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 761 | grp->pins, grp->num_pins, | ~~~^~~~~~ In file included from drivers/pinctrl/pinctrl-equilibrium.c:16: drivers/pinctrl/core.h:225:15: note: expected 'int *' but argument is of type 'const unsigned int *' 225 | int *gpins, int ngpins, void *data); | ~~~~~^~~~~ vim +761 drivers/pinctrl/pinctrl-equilibrium.c 702 703 static int eqbr_build_groups(struct eqbr_pinctrl_drv_data *drvdata) 704 { 705 struct device *dev = drvdata->dev; 706 struct device_node *node = dev->of_node; 707 unsigned int *pinmux, pin_id, pinmux_id; 708 struct pingroup group, *grp = &group; 709 struct device_node *np; 710 struct property *prop; 711 int j, err; 712 713 for_each_child_of_node(node, np) { 714 prop = of_find_property(np, "groups", NULL); 715 if (!prop) 716 continue; 717 718 grp->npins = of_property_count_u32_elems(np, "pins"); 719 if (grp->npins < 0) { 720 dev_err(dev, "No pins in the group: %s\n", prop->name); 721 of_node_put(np); 722 return -EINVAL; 723 } 724 grp->name = prop->value; 725 grp->pins = devm_kcalloc(dev, grp->npins, sizeof(*grp->pins), GFP_KERNEL); 726 if (!grp->pins) { 727 of_node_put(np); 728 return -ENOMEM; 729 } 730 731 pinmux = devm_kcalloc(dev, grp->npins, sizeof(*pinmux), GFP_KERNEL); 732 if (!pinmux) { 733 of_node_put(np); 734 return -ENOMEM; 735 } 736 737 for (j = 0; j < grp->npins; j++) { 738 if (of_property_read_u32_index(np, "pins", j, &pin_id)) { 739 dev_err(dev, "Group %s: Read intel pins id failed\n", 740 grp->name); 741 of_node_put(np); 742 return -EINVAL; 743 } 744 if (pin_id >= drvdata->pctl_desc.npins) { 745 dev_err(dev, "Group %s: Invalid pin ID, idx: %d, pin %u\n", 746 grp->name, j, pin_id); 747 of_node_put(np); 748 return -EINVAL; 749 } 750 grp->pins[j] = pin_id; 751 if (of_property_read_u32_index(np, "pinmux", j, &pinmux_id)) { 752 dev_err(dev, "Group %s: Read intel pinmux id failed\n", 753 grp->name); 754 of_node_put(np); 755 return -EINVAL; 756 } 757 pinmux[j] = pinmux_id; 758 } 759 760 err = pinctrl_generic_add_group(drvdata->pctl_dev, grp->name, > 761 grp->pins, grp->num_pins, 762 pinmux); 763 if (err < 0) { 764 dev_err(dev, "Failed to register group %s\n", grp->name); 765 of_node_put(np); 766 return err; 767 } 768 memset(&group, 0, sizeof(group)); 769 pinmux = NULL; 770 } 771 772 return 0; 773 } 774
diff --git a/drivers/pinctrl/pinctrl-equilibrium.c b/drivers/pinctrl/pinctrl-equilibrium.c index 5b5ddf7e5d0e..9202a60b4ec7 100644 --- a/drivers/pinctrl/pinctrl-equilibrium.c +++ b/drivers/pinctrl/pinctrl-equilibrium.c @@ -705,7 +705,7 @@ static int eqbr_build_groups(struct eqbr_pinctrl_drv_data *drvdata) struct device *dev = drvdata->dev; struct device_node *node = dev->of_node; unsigned int *pinmux, pin_id, pinmux_id; - struct group_desc group; + struct pingroup group, *grp = &group; struct device_node *np; struct property *prop; int j, err; @@ -715,55 +715,53 @@ static int eqbr_build_groups(struct eqbr_pinctrl_drv_data *drvdata) if (!prop) continue; - group.num_pins = of_property_count_u32_elems(np, "pins"); - if (group.num_pins < 0) { + grp->npins = of_property_count_u32_elems(np, "pins"); + if (grp->npins < 0) { dev_err(dev, "No pins in the group: %s\n", prop->name); of_node_put(np); return -EINVAL; } - group.name = prop->value; - group.pins = devm_kcalloc(dev, group.num_pins, - sizeof(*(group.pins)), GFP_KERNEL); - if (!group.pins) { + grp->name = prop->value; + grp->pins = devm_kcalloc(dev, grp->npins, sizeof(*grp->pins), GFP_KERNEL); + if (!grp->pins) { of_node_put(np); return -ENOMEM; } - pinmux = devm_kcalloc(dev, group.num_pins, sizeof(*pinmux), - GFP_KERNEL); + pinmux = devm_kcalloc(dev, grp->npins, sizeof(*pinmux), GFP_KERNEL); if (!pinmux) { of_node_put(np); return -ENOMEM; } - for (j = 0; j < group.num_pins; j++) { + for (j = 0; j < grp->npins; j++) { if (of_property_read_u32_index(np, "pins", j, &pin_id)) { dev_err(dev, "Group %s: Read intel pins id failed\n", - group.name); + grp->name); of_node_put(np); return -EINVAL; } if (pin_id >= drvdata->pctl_desc.npins) { dev_err(dev, "Group %s: Invalid pin ID, idx: %d, pin %u\n", - group.name, j, pin_id); + grp->name, j, pin_id); of_node_put(np); return -EINVAL; } - group.pins[j] = pin_id; + grp->pins[j] = pin_id; if (of_property_read_u32_index(np, "pinmux", j, &pinmux_id)) { dev_err(dev, "Group %s: Read intel pinmux id failed\n", - group.name); + grp->name); of_node_put(np); return -EINVAL; } pinmux[j] = pinmux_id; } - err = pinctrl_generic_add_group(drvdata->pctl_dev, group.name, - group.pins, group.num_pins, + err = pinctrl_generic_add_group(drvdata->pctl_dev, grp->name, + grp->pins, grp->num_pins, pinmux); if (err < 0) { - dev_err(dev, "Failed to register group %s\n", group.name); + dev_err(dev, "Failed to register group %s\n", grp->name); of_node_put(np); return err; }