Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4699290rdh; Wed, 29 Nov 2023 08:17:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IGhd1Lk/y+buWBn7dc7xC8d471L+CWQchQYF7swDU+rxlGiYhlP+s+GLDXS7JtB0suZL+wU X-Received: by 2002:a17:902:8488:b0:1cc:5e1b:98b5 with SMTP id c8-20020a170902848800b001cc5e1b98b5mr19209153plo.66.1701274665804; Wed, 29 Nov 2023 08:17:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701274665; cv=none; d=google.com; s=arc-20160816; b=GchVT0MuSAjhZ/WhQeXJVNWcEgvKuP7USK2Hug+CT+iS0u0XN1E/BydDTjNID6dVzY 9uaIOMeY3R17cfNYQ6IkG0phWXjlXzxfRv3puxm49Eg0dmHp60ZEhUlu+dpKEPAtwhED V/gYhE0iinz/tT2JxDratnEXJHOQsIhGlZZlrkygYRORJg0OZRj70bQvZ32Ki8rOFHRd jpChP4m3cxs5tiEC5wYxLCCM2gjT7xDc+4jKeq8tfWbfnGULD9LVAYRc1CEtg+j35z0U XAz06amDu2/i3ANYTJTITtq1yDfBlcKTS9bY12inio6yuKKrmSPz3I3OgOwuJJsiDnpH bGrg== 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=jdoYOr9EXW1lR2ShQSrdq4vBQdBVk+dwioqnIqLPykc=; fh=p5qGgOuQ1qdHRKXQ3E7ZkEX+heMqfz4xi8z6J8C0/aQ=; b=KuTKcngZcIhwtiln43q4y5hTpdAnNX8Foac+hI139Bg+CMmWyQLVlxE2EA5Xzeaknf kbum1c1LqAmJJhL+sMHBdSfR7xkHuuPTBXzhwv8UgY08hFlTR+t+3y7+XhtsgnMdBI+K OyGuQOXYpQOQ9GIxivNwMOti4/5CvGw2/4MoNy0xnbjogNcIURbpYIODbH5r+hV8LlaM YCB+oOR/UX5yBx06UN6Z99jg8BAHw8iLe+1FpenyWJvgbbdfM/Lit8QV4XnRAN26nS/D h/AVD2eEQCWkMiESwalKPs2PMPlJCqzmbYfNiNz9n+IISEylKxhQ6mNRzY4xbf6doTcq p1KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=irpitN9h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id u10-20020a17090282ca00b001cfa70f3a47si11580541plz.158.2023.11.29.08.17.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 08:17:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=irpitN9h; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 549588087242; Wed, 29 Nov 2023 08:17:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233958AbjK2QQm (ORCPT + 99 others); Wed, 29 Nov 2023 11:16:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234131AbjK2QQB (ORCPT ); Wed, 29 Nov 2023 11:16:01 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFB451986; Wed, 29 Nov 2023 08:15:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701274538; x=1732810538; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=liPHDLuYbD94sAXW+HKE2PmyEtAsJEMqj1/hueiHOBE=; b=irpitN9hP/LcIQCvmN+DWrudovIY1cGJWPDK0y3qCv0PCy69Votd+cMI 8fk+jLZyyK4QvD4dPRH0eFxgjX4kpyV2ioCZtoZULx1U9/MQMJ63QkozS 27kfMsd4e87Y//cdzMvRekUYKvlXPhKzhdzXVDEa6kmK//3qx2LUHt7G+ PYRurQbLTkVCLanH9eLbBusKMcBF9QFCvbzKwkWeQbDmNqzsZH+ctlny3 4GPfbuY7yj5q3Q5lJrMLiPBEKhHj1eY4ec3JJD1II0fvz2K3l+OK9WVTT NwIzGEQi/negP5RRbe6ci+l8ae0TZmIzmPkU2d6J2YeLCpZNZv0ys3RjJ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="373372902" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="373372902" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2023 08:15:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="892498910" X-IronPort-AV: E=Sophos;i="6.04,235,1695711600"; d="scan'208";a="892498910" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga004.jf.intel.com with ESMTP; 29 Nov 2023 08:15:21 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 50423BFC; Wed, 29 Nov 2023 18:15:02 +0200 (EET) From: Andy Shevchenko To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Rasmus Villemoes , =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= , Krzysztof Kozlowski , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Geert Uytterhoeven , Biju Das , Claudiu Beznea , Jianlong Huang , 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 , Scott Branden , Broadcom internal kernel review list , Dong Aisheng , Fabio Estevam , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , Sascha Hauer , NXP Linux Team , Sean Wang , Paul Cercueil , Lakshmi Sowjanya D , Bjorn Andersson , Andy Gross , Konrad Dybcio , Emil Renner Berthing , Hal Feng Subject: [PATCH v4 19/23] pinctrl: mediatek: Convert to use grp member Date: Wed, 29 Nov 2023 18:06:42 +0200 Message-ID: <20231129161459.1002323-20-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20231129161459.1002323-1-andriy.shevchenko@linux.intel.com> References: <20231129161459.1002323-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 fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 29 Nov 2023 08:17:39 -0800 (PST) Convert drivers to use grp member embedded in struct group_desc. Signed-off-by: Andy Shevchenko --- drivers/pinctrl/mediatek/pinctrl-moore.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/pinctrl/mediatek/pinctrl-moore.c b/drivers/pinctrl/mediatek/pinctrl-moore.c index c3d59eddd994..d972584c0519 100644 --- a/drivers/pinctrl/mediatek/pinctrl-moore.c +++ b/drivers/pinctrl/mediatek/pinctrl-moore.c @@ -56,12 +56,12 @@ static int mtk_pinmux_set_mux(struct pinctrl_dev *pctldev, return -EINVAL; dev_dbg(pctldev->dev, "enable function %s group %s\n", - func->name, grp->name); + func->name, grp->grp.name); - for (i = 0; i < grp->num_pins; i++) { + for (i = 0; i < grp->grp.npins; i++) { const struct mtk_pin_desc *desc; int *pin_modes = grp->data; - int pin = grp->pins[i]; + int pin = grp->grp.pins[i]; desc = (const struct mtk_pin_desc *)&hw->soc->pins[pin]; if (!desc->name) @@ -602,13 +602,12 @@ static int mtk_build_groups(struct mtk_pinctrl *hw) for (i = 0; i < hw->soc->ngrps; i++) { const struct group_desc *group = hw->soc->grps + i; + const struct pingroup *grp = &group->grp; - err = pinctrl_generic_add_group(hw->pctrl, group->name, - group->pins, group->num_pins, + err = pinctrl_generic_add_group(hw->pctrl, grp->name, grp->pins, grp->npins, group->data); if (err < 0) { - dev_err(hw->dev, "Failed to register group %s\n", - group->name); + dev_err(hw->dev, "Failed to register group %s\n", grp->name); return err; } } -- 2.43.0.rc1.1.gbec44491f096