From nobody Mon May 25 00:09:08 2026 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B6E2392C4C for ; Wed, 20 May 2026 07:48:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779263302; cv=none; b=aoZFTuztEWIWci5TNUY9jSHbxeEN1fiP8qxCHsSl+MJGayK2My7VDTYuq/F3VOE7RcKlJngTX3K/wQYpS9oLqzsQOFOQQIzV0bccTUO5Yus/Da2+7e9h9dBy4XiannQJFe5YWDwE7bRzkPGiwLSHZXkhYvSZF6UruJBtiGelepk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779263302; c=relaxed/simple; bh=8oizMrjeWfteu1vloj6toZPSwmdcNwqp1/bOet7ng5A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=IJH3U5Tk/3GioXKrbSxqSegnGl44ZLZg1yiLvk4ypBBHbVB/T2e3w097P0NBsYt3IHGymu0euLoyAIs1u5Gy659VvDHOUP42pGiXthbbDiU+ssOWyQFq/UlAc0chEN7ublGHzoVypv4iSzF2jxzvX6MyjJlis2NWKSaG6RHNSIc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b=ZkM73Noy; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre.com header.i=@baylibre.com header.b="ZkM73Noy" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-48e8132c6d0so29626315e9.1 for ; Wed, 20 May 2026 00:48:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre.com; s=google; t=1779263298; x=1779868098; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=LHKYBHNO9m3u0CZa7cLjg4ja/mnIoKgguwmanDDcf+E=; b=ZkM73NoyQVLRk8kbAvpL8KacbhLv0WcGexGeo9UEEj5ARzk3D+7Y4/LUxlwkZDunHS AyTddPXuJy5sAenk7ixeC0bwsw0mak/6lUEYrPmLZMPOGgtp5J8IYA6egl9eYyFkA2/1 H0niQ/9e3McpZkSqN5PtmCI0N0tZ907VWahjCSw0ZooX9eMIKK0xI/ItipEVDCoM56WR pi4CBCPelgcEmXcgNFMu4YW6gaEE8w3UbQK8w4Ye026pbILCZ2gjYMkGsKfNKvNInMxw K6ulLV+6d+JLu79OVkA59WJEdbPqPqcfaztPGr8sF9Pa36ydvKWj0k/M6Km31FEF7OKJ CI1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779263298; x=1779868098; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=LHKYBHNO9m3u0CZa7cLjg4ja/mnIoKgguwmanDDcf+E=; b=HQijupAavmAfOaN1km4JgFDotTX9PWBGL4ugKF7HQN0c52cVr/SX+nE4z9WiVZ8gS/ Fbi+lOspixv8Y1Sfb0t7QA7X2AxF9lYQAHcON98T4PDyFjJ0xShHPLmeURVmPxpS9/eP aA3oSqEWB/iDONw18WeGspPD0XmHsqOD0odof+IkSWTV2R2dSE2AAyB6eFKS4YxSToTR Hqc1LhOvkF6mXV5Vy4ELFoLdTF0zhZ1AZQ1kgUIE7PVMsNKbZGhfQQGOs46HDBZLOSxN VKfe2qva6IKBMq+DwPLIsKONMdce647dfUP10nhj+qk1jKGrYzd/R12bbiRMnn6gz4u1 cD4Q== X-Forwarded-Encrypted: i=1; AFNElJ89zmtXxf1wulAWclZon5S70vVDO/YXW6HxxQkr/y8yKdJRWOVAFQOWLYmzqJ707pD1qbuE36BPGjhT5Mc=@vger.kernel.org X-Gm-Message-State: AOJu0Yz+NWOnLw9sg+WyVSprFL0JW/k4rTZGhvXrbWCdrFC7lRn8fk4i p/Q6MSnaIdDDIx/ubS6I34JqzRax+j0fy3f2ClVoQNQbSEJHM27qC5NTQuGuTz+aQTQ= X-Gm-Gg: Acq92OHbhx+C4cjX7MUJL8C8COs8pmUz2bP7wY5ml1f/WQT1Y2yfPAHHzlhaTPgNIlZ /vxd781sTPwJXy1eF03tA9BgsK3R8b5wLrHZSjBOhNaUzZKUtDFv13iS8ybCjBIPvsvUGbbMLH3 /eNUoOB86msyrambAJhLD3Ci1vacNTpsuQkFb1H2DnnTgpCCyFetntnlAmy7EHm4SZQ5/5wlozU hDwXyizNdBFu1YFF9KMazg29iAaGmZyJRzQX65g+nhgai78RLvR700bs4hgiRSMUg4oE6wbgPqJ 0hMdvvV69nplGOjshroj9PgeXA7C6vzYaAh/B2kvvClLUAXB7mQT4sQFM101KPrFlU2ugIctlFH z/8yVgVm5hJQuIvyHgHP3cfC/cxVD46UqYaNh+qir/Eve/pIjISgCVqByBpyah4MEyJJJgkQLG1 fAc2B8uwyXXC1XcD4nzgN5o9ZTgSLj9jOGX1LFtWyI8t23195Tm0UKf/oihYcS3DIzL6eMF87vw lzlnFhrZq8Qv6iJBXX3JT6UgQ== X-Received: by 2002:a05:600c:3f0a:b0:48e:82af:d9 with SMTP id 5b1f17b1804b1-48fe6612a59mr357435925e9.29.1779263298403; Wed, 20 May 2026 00:48:18 -0700 (PDT) Received: from localhost (p200300f65f47db04a02ef40d8e5825ac.dip0.t-ipconnect.de. [2003:f6:5f47:db04:a02e:f40d:8e58:25ac]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-45da0fe1a41sm56072517f8f.31.2026.05.20.00.48.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2026 00:48:17 -0700 (PDT) From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig=20=28The=20Capable=20Hub=29?= To: Linus Walleij , Bartosz Golaszewski Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] gpio: Initialize all i2c_device_id arrays using member names Date: Wed, 20 May 2026 09:48:12 +0200 Message-ID: <20260520074812.1632512-2-u.kleine-koenig@baylibre.com> X-Mailer: git-send-email 2.47.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Developer-Signature: v=1; a=openpgp-sha256; l=4321; i=u.kleine-koenig@baylibre.com; h=from:subject; bh=8oizMrjeWfteu1vloj6toZPSwmdcNwqp1/bOet7ng5A=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBqDWc8ZpehEtlT/cjK7lMWny4yMSE/0QWYJsa4u 8Munn/R+LOJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCag1nPAAKCRCPgPtYfRL+ Tlk5CACSwtA3Tb3VYu13N3C814yOGLEShBgljiCfWQ2ner4pCPyUyYLI4a2+ruOrS/o49iQxYWd tS5cN0rGvI0M40LPy+drqlAGmkQQ4UgFkm+HVhQJSqwBf4vNcPySo6sm5IibVK4EjeNi+PoqOjj GZHJRzysXdgW0LI31NIFwpjn2OTaP8OAqTTX7kL5jRX/D3dkyVI4kszzsPvh++eSJMzx8ZoXqdl K7LoWsjSPbEdxX9RO4qbxRExCjEl/EDZ92AhN1/1ImoXZVyKIIT+RlH3MoaoGoKuGJGS489MalP l8RcJ0kujMWqWjKulJlnW0dx9cshtxqSU8cZt/zwqrSrWFnF X-Developer-Key: i=u.kleine-koenig@baylibre.com; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: quoted-printable The previously applied similar commit 553e26a45e0e ("gpio: Initialize i2c_device_id arrays using member names") only handled i2c_device_id arrays that also have an assignment for .driver_data. For consistency also convert the entries without such an assignment. Again this is a modification that has no influence on the generated code, it's only more robust against changes to struct i2c_device_id and easier to understand for a human. While touching adnp_i2c_id[] drop the comma after the list terminator. Signed-off-by: Uwe Kleine-K=C3=B6nig (The Capable Hub) --- Hello, as requested in https://lore.kernel.org/linux-gpio/CAMRc=3DMcrnORJbik6QYB-ps7fjxXb24VbB8R9p= BgnXzL5xj8aVw@mail.gmail.com here comes a follow-up patch for the above mentioned commit. Best regards Uwe drivers/gpio/gpio-adnp.c | 4 ++-- drivers/gpio/gpio-ds4520.c | 2 +- drivers/gpio/gpio-fxl6408.c | 2 +- drivers/gpio/gpio-gw-pld.c | 2 +- drivers/gpio/gpio-max7300.c | 2 +- drivers/gpio/gpio-tpic2810.c | 2 +- drivers/gpio/gpio-ts4900.c | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpio/gpio-adnp.c b/drivers/gpio/gpio-adnp.c index e5ac2d211013..27a80d1143a1 100644 --- a/drivers/gpio/gpio-adnp.c +++ b/drivers/gpio/gpio-adnp.c @@ -499,8 +499,8 @@ static int adnp_i2c_probe(struct i2c_client *client) } =20 static const struct i2c_device_id adnp_i2c_id[] =3D { - { "gpio-adnp" }, - { }, + { .name =3D "gpio-adnp" }, + { } }; MODULE_DEVICE_TABLE(i2c, adnp_i2c_id); =20 diff --git a/drivers/gpio/gpio-ds4520.c b/drivers/gpio/gpio-ds4520.c index f52ecae382a4..5add662a7ef5 100644 --- a/drivers/gpio/gpio-ds4520.c +++ b/drivers/gpio/gpio-ds4520.c @@ -54,7 +54,7 @@ static const struct of_device_id ds4520_gpio_of_match_tab= le[] =3D { MODULE_DEVICE_TABLE(of, ds4520_gpio_of_match_table); =20 static const struct i2c_device_id ds4520_gpio_id_table[] =3D { - { "ds4520-gpio" }, + { .name =3D "ds4520-gpio" }, { } }; MODULE_DEVICE_TABLE(i2c, ds4520_gpio_id_table); diff --git a/drivers/gpio/gpio-fxl6408.c b/drivers/gpio/gpio-fxl6408.c index afc1b8461dab..45b02d36e66f 100644 --- a/drivers/gpio/gpio-fxl6408.c +++ b/drivers/gpio/gpio-fxl6408.c @@ -150,7 +150,7 @@ static const __maybe_unused struct of_device_id fxl6408= _dt_ids[] =3D { MODULE_DEVICE_TABLE(of, fxl6408_dt_ids); =20 static const struct i2c_device_id fxl6408_id[] =3D { - { "fxl6408" }, + { .name =3D "fxl6408" }, { } }; MODULE_DEVICE_TABLE(i2c, fxl6408_id); diff --git a/drivers/gpio/gpio-gw-pld.c b/drivers/gpio/gpio-gw-pld.c index 2e5d97b7363f..bf1f91c3c4a8 100644 --- a/drivers/gpio/gpio-gw-pld.c +++ b/drivers/gpio/gpio-gw-pld.c @@ -109,7 +109,7 @@ static int gw_pld_probe(struct i2c_client *client) } =20 static const struct i2c_device_id gw_pld_id[] =3D { - { "gw-pld", }, + { .name =3D "gw-pld" }, { } }; MODULE_DEVICE_TABLE(i2c, gw_pld_id); diff --git a/drivers/gpio/gpio-max7300.c b/drivers/gpio/gpio-max7300.c index 621d609ece90..62f2434c0d79 100644 --- a/drivers/gpio/gpio-max7300.c +++ b/drivers/gpio/gpio-max7300.c @@ -53,7 +53,7 @@ static void max7300_remove(struct i2c_client *client) } =20 static const struct i2c_device_id max7300_id[] =3D { - { "max7300" }, + { .name =3D "max7300" }, { } }; MODULE_DEVICE_TABLE(i2c, max7300_id); diff --git a/drivers/gpio/gpio-tpic2810.c b/drivers/gpio/gpio-tpic2810.c index 866ff2d436d5..c38538653e99 100644 --- a/drivers/gpio/gpio-tpic2810.c +++ b/drivers/gpio/gpio-tpic2810.c @@ -112,7 +112,7 @@ static int tpic2810_probe(struct i2c_client *client) } =20 static const struct i2c_device_id tpic2810_id_table[] =3D { - { "tpic2810", }, + { .name =3D "tpic2810" }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(i2c, tpic2810_id_table); diff --git a/drivers/gpio/gpio-ts4900.c b/drivers/gpio/gpio-ts4900.c index d9ee8fc77ccd..b46b48e56c56 100644 --- a/drivers/gpio/gpio-ts4900.c +++ b/drivers/gpio/gpio-ts4900.c @@ -175,7 +175,7 @@ static int ts4900_gpio_probe(struct i2c_client *client) } =20 static const struct i2c_device_id ts4900_gpio_id_table[] =3D { - { "ts4900-gpio", }, + { .name =3D "ts4900-gpio" }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(i2c, ts4900_gpio_id_table); base-commit: 6a50ba100ace43f43c87384367eb2d2605fcc16c --=20 2.47.3