From nobody Thu Nov 14 05:06:45 2024 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 9ABFFC4332F for ; Mon, 11 Dec 2023 19:03:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344426AbjLKTDe (ORCPT ); Mon, 11 Dec 2023 14:03:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbjLKTD1 (ORCPT ); Mon, 11 Dec 2023 14:03:27 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C13CCF; Mon, 11 Dec 2023 11:03:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702321414; x=1733857414; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ACcmTJgIefDIVYbDCBBfrcMa7Src+AAIG2eWNqY+244=; b=VN0VLnBkLVZd56vDxcQq35CzDxiJWdp4aU8EM06q3n+QIa3nbovwOyFd xfrrOjl+7dlXsQa0K/HmqksZWPqB3j0a1ozVC464hqDOgTkwYpgJb4rmK 3ZGpMsrleOAP0Q0NmLAT96A2dkFnLaX9QtmmKa88yW4SOhS14DGkGcmCn cZXGcCuC14nDlD45+1lIX/BqsIcDxjWZSMEUr8TxfV/lIH6RbjOXbYr9N JSgVfHBoCLJEaj2bELxuYAgLCKAUWT51oWLxiVKMGyUctLnqkzOWVEYl+ V1FZKG9aE3HJCksGUlilIKPM569wrDvCRcukAFe1t4DV67Q6vnG1kIDBD Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10921"; a="379692511" X-IronPort-AV: E=Sophos;i="6.04,268,1695711600"; d="scan'208";a="379692511" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Dec 2023 11:03:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10921"; a="946445054" X-IronPort-AV: E=Sophos;i="6.04,268,1695711600"; d="scan'208";a="946445054" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga005.jf.intel.com with ESMTP; 11 Dec 2023 11:03:24 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 7601E3AE; Mon, 11 Dec 2023 21:03:23 +0200 (EET) From: Andy Shevchenko To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Geert Uytterhoeven , Rasmus Villemoes , 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, linux-mips@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 , Emil Renner Berthing , Hal Feng Subject: [PATCH v5 03/13] pinctrl: ingenic: Use C99 initializers in PINCTRL_PIN_GROUP() Date: Mon, 11 Dec 2023 20:57:56 +0200 Message-ID: <20231211190321.307330-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20231211190321.307330-1-andriy.shevchenko@linux.intel.com> References: <20231211190321.307330-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" For the better flexibility use C99 initializers in PINCTRL_PIN_GROUP(). Signed-off-by: Andy Shevchenko Acked-by: Paul Cercueil --- drivers/pinctrl/pinctrl-ingenic.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/pinctrl/pinctrl-ingenic.c b/drivers/pinctrl/pinctrl-in= genic.c index ee718f6e2556..f5661dcdedf5 100644 --- a/drivers/pinctrl/pinctrl-ingenic.c +++ b/drivers/pinctrl/pinctrl-ingenic.c @@ -82,16 +82,21 @@ #define PINS_PER_GPIO_CHIP 32 #define JZ4730_PINS_PER_PAIRED_REG 16 =20 -#define INGENIC_PIN_GROUP_FUNCS(name, id, funcs) \ - { \ - name, \ - id##_pins, \ - ARRAY_SIZE(id##_pins), \ - funcs, \ +#define INGENIC_PIN_GROUP_FUNCS(_name_, id, funcs) \ + { \ + .name =3D _name_, \ + .pins =3D id##_pins, \ + .num_pins =3D ARRAY_SIZE(id##_pins), \ + .data =3D funcs, \ } =20 -#define INGENIC_PIN_GROUP(name, id, func) \ - INGENIC_PIN_GROUP_FUNCS(name, id, (void *)(func)) +#define INGENIC_PIN_GROUP(_name_, id, func) \ + { \ + .name =3D _name_, \ + .pins =3D id##_pins, \ + .num_pins =3D ARRAY_SIZE(id##_pins), \ + .data =3D (void *)func, \ + } =20 enum jz_version { ID_JZ4730, --=20 2.43.0.rc1.1.gbec44491f096