Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp209221lqb; Tue, 28 May 2024 13:08:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVPHs6ZdMVTudEASi2LLi6XsQkkp1LpkHYurUypNFSGFaZ0iSe6RuenuNUh7Btt7LfSmWfxEuvuCE/8rZyIwFkMPgvq5FCCtM5kjm6J1A== X-Google-Smtp-Source: AGHT+IEt92B2/+eA1yWHBNaK2u/oYxG6lEuyiwjcvFDrKsK++f0Aq4i3Nj/SIAnamdAmQrk7GId8 X-Received: by 2002:a17:906:2789:b0:a59:9ad2:a7f8 with SMTP id a640c23a62f3a-a626511490fmr901628766b.72.1716926915000; Tue, 28 May 2024 13:08:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716926914; cv=pass; d=google.com; s=arc-20160816; b=CBhk17AHxIK+rS8895TeKKLL6mDyEDAFsOwgEEjRVYnVR/kz7LeK8fL1IYiNRiLvdV rmjX81k+10dZLgXAbYjO3IX25/DMISSrQXQw18WMyYFEg8DM+bFPHc9D9OlvR+WYb9JD WMyAdhc40+vuVQ+hcvFo1m+ggdbputFg5iiyyHLIDJK3l9yIO6U3D9j32Stz/ZloH7By 4+LxvqZRQOnO0X/7/JlbTgWIsWQRlzdwOlqy1Yb8nUcplq3DYuVtN4638KdlD0qTqL3v UxM39OJYVhgJCtbpGpa4RMNQTwrZiGYcXWLiis2IvUgs1xCQQ8C2hX+AInmoBDyKmO0e 3qDw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=k5YoBN47w5IsZg0BgdqxDWyBmssOg1ao0QpWC3Q6PYw=; fh=7i0PP+tNNxhEqCNt1DaWuCxUYRb0M4WDBE9BrWIvsBQ=; b=csEhHNrA5Hxkr7yGMnzchxDesoLbUezG3TV9Elwgw9UVwULvLLpPlKb2runYGENFVP +iE3kUqlhiH3+tkr8jaU2RMPLhiVcuSSdSeyn9VbdWi3ly40yLf3UJo0H9ZBFdvFz14k 6cyGOQ/biX7IZO6h5FeKUsjxdSQG/PpXgGa7OLwgRouLL7wixKW8nyLY4XZ9BtS0PsfS Bq33zV3XW6UFTyffDWMHaSPVMuo6IuJ90GARNaYO2OzL8uWHQpyM5YRCU4kdNbU61hxs GgyN5tviEyODeuUzbtLzem9g7dcK2H/fsn79mCePBbEHAJBtv43vYDtvQVbDz3tT3u03 SrjA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-192980-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192980-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a626cd9607fsi539422966b.831.2024.05.28.13.08.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 13:08:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192980-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-192980-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192980-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0102D1F28249 for ; Tue, 28 May 2024 19:51:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 704E817B430; Tue, 28 May 2024 19:50:08 +0000 (UTC) Received: from fgw23-7.mail.saunalahti.fi (fgw23-7.mail.saunalahti.fi [62.142.5.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 091D217A936 for ; Tue, 28 May 2024 19:50:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.84 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716925807; cv=none; b=etPfz6szRJtprObmAmSmAdss08ZPSiKwWDVnzY10r88xbKNamgzlvAWGJs3z6WiTvEZZDcvIi6tT21fZyjuyGe3q5jlDFoFr4+FUK275a0cOqqXUnXC1DE5cg4JlwX6oj864dQ+xrh+UDSjLQ4nZ8yLa/xClQPEr1ChbyKVJnW0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716925807; c=relaxed/simple; bh=Ipd1r706hFJdBLXw3qskh6dO0fzpcVigdcqkKJK4BV8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Eo1Kf94AOUUSyiUFHkBVGuWEFsRpZPu/t6pjUODk0ZqWdtN5Mhd9DFD8MRMh2sWRxeu8SMk8OziFwU2TfODvCOyvYh5dI+Gc+i9FjwBzVLmoywLpQCgaBPdba69occQMCJqle6eoFQZuA/14IgTktSu943f6aVX/rXNwaZni8Cc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com; spf=fail smtp.mailfrom=gmail.com; arc=none smtp.client-ip=62.142.5.84 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=gmail.com Received: from localhost (88-113-26-230.elisa-laajakaista.fi [88.113.26.230]) by fgw21.mail.saunalahti.fi (Halon) with ESMTP id 798dced9-1d2b-11ef-aaf5-005056bdd08f; Tue, 28 May 2024 22:50:03 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Linus Walleij , Daniel Golle , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-mips@vger.kernel.org Cc: Dong Aisheng , Fabio Estevam , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , Sascha Hauer , Sean Wang , Matthias Brugger , AngeloGioacchino Del Regno , Paul Cercueil , Lakshmi Sowjanya D , Andy Shevchenko Subject: [PATCH v2 07/11] pinctrl: imx: Convert to use func member Date: Tue, 28 May 2024 22:44:58 +0300 Message-ID: <20240528194951.1489887-8-andy.shevchenko@gmail.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240528194951.1489887-1-andy.shevchenko@gmail.com> References: <20240528194951.1489887-1-andy.shevchenko@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Convert drivers to use func member embedded in struct function_desc, because other members will be removed to avoid duplication and desynchronisation of the generic pin function description. Signed-off-by: Andy Shevchenko --- drivers/pinctrl/freescale/pinctrl-imx.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c index 2d3d80921c0d..44921e3bdb94 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx.c +++ b/drivers/pinctrl/freescale/pinctrl-imx.c @@ -266,7 +266,7 @@ static int imx_pmx_set(struct pinctrl_dev *pctldev, unsigned selector, npins = grp->grp.npins; dev_dbg(ipctl->dev, "enable function %s group %s\n", - func->name, grp->grp.name); + func->func.name, grp->grp.name); for (i = 0; i < npins; i++) { /* @@ -593,21 +593,21 @@ static int imx_pinctrl_parse_functions(struct device_node *np, return -EINVAL; /* Initialise function */ - func->name = np->name; - func->num_group_names = of_get_child_count(np); - if (func->num_group_names == 0) { + func->func.name = np->name; + func->func.ngroups = of_get_child_count(np); + if (func->func.ngroups == 0) { dev_info(ipctl->dev, "no groups defined in %pOF\n", np); return -EINVAL; } - group_names = devm_kcalloc(ipctl->dev, func->num_group_names, - sizeof(char *), GFP_KERNEL); + group_names = devm_kcalloc(ipctl->dev, func->ngroups, sizeof(*func->func.groups), + GFP_KERNEL); if (!group_names) return -ENOMEM; i = 0; for_each_child_of_node(np, child) group_names[i++] = child->name; - func->group_names = group_names; + func->func.groups = group_names; i = 0; for_each_child_of_node(np, child) { -- 2.45.1