From nobody Mon May 25 08:12:37 2026 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 3B5103CF058 for ; Fri, 15 May 2026 16:33:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778862818; cv=none; b=hiOSSGjy3eiF6Ii/bO9hsscRG12O+2FTar0ohPrEK/o/5pBS7XFc8IENLhPqlVMs3zN/nNYqvaHdWUealUy/kbor3oxln0vLId7PqX9jmUCNHILKrLwAfl8xSvPKR8A4U1Aa/QzYMySID7Pky+F+ncjQCi6cy+sI8s0RZK7TMwo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778862818; c=relaxed/simple; bh=+hyxAutSr0SZBbYi+DBYCGS9Gw3qJ92Hui0BnwYjR6w=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=KnwL23syib58I6g0XROvOMPN2Qh+cw6fNpwxYx0GQScL8jA/ej1X3nr4mEcsxedW4IhCzaqZePxmoDyZaSuqCpP7IY79D9ASeLMQ7q3FP7BOstSC2CyaRCW7lKTrrBpvnGjhvPP+hq8SFwukE42j+Qi2PYE2+t1GjK4dm8v0eCU= 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.20251104.gappssmtp.com header.i=@baylibre-com.20251104.gappssmtp.com header.b=KbRDkBJh; arc=none smtp.client-ip=209.85.128.44 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.20251104.gappssmtp.com header.i=@baylibre-com.20251104.gappssmtp.com header.b="KbRDkBJh" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-4891c0620bcso54905e9.1 for ; Fri, 15 May 2026 09:33:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20251104.gappssmtp.com; s=20251104; t=1778862814; x=1779467614; 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=p1/7js2cGOXlm9yYCDtds9lH9UcryS1S1vNBZjfcTKc=; b=KbRDkBJhtMMYATcm1a5MSv9YW2AF56/tTP8D40OGjDejOlMNKgz2uVP73PpCICtJKV diy6I/9bLBGXnotQNhOmDD2XLITUrHekHOnfHLXe61AFYDJO9uoR9Y6TxIa7tmj9FKCs bbo8cg5HI99UgJ3C/3j8wYEBigjpMr2HE3RK1ulKe8MexlpLoDrE0MWea2VgX57ASrAc RQId43a3ikcJlCblO/2kH8zfQlJu082e/Qwq2SoSFpYBPoMjYPakEek9kgEWw8tPLkT+ x+UvSYeldgAlKwawWPw+rNXaols6JvDJICtQK4pke8x5CYaVDdXhyPLdv3myvkurl++J d8fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778862814; x=1779467614; 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=p1/7js2cGOXlm9yYCDtds9lH9UcryS1S1vNBZjfcTKc=; b=S68SrE/Q6pO+f31UyA+h3wzfpGQACBPu2JuiZmEv5xlxRrNER+AZTwOC8OE0+2hp5w SkSsRat5vBX6If52ttgcLC5ywXVu16JmBj63T5paHrrrZc040PWZhaGHAFVdH4+mKLoX V/X5088DujSnD8IM4Ug0dxJndEjyPDpnzu2Jx2WBGuwt1XtIZH7P+TkTsfrH7XWWH8sH 1Wsn/wGVVswHaJU4E1Vm/kEFjKvFNyyUR0HvSli5FhfczU+JYCNN+OEmuhUn+7SUtlU1 v3SqpMtpof6t3SXfS6heVKfQNHcUWebCBgNEWv9bFvCISeXKozf7+jXHUjRPudZi14g+ 6fbw== X-Forwarded-Encrypted: i=1; AFNElJ+hRzun8Iits1fRD3MCdUwGgbjWrUit3B8qiUAXh1wvWBOJbwLW2q9PsEvmOPgrBVwfC+shGfylo/fmXXU=@vger.kernel.org X-Gm-Message-State: AOJu0YxDuIe/kBjNS+ox4YdI20L4TVuASPM+fDtyGA2fDzXE0ObNsLo7 O6Dex11y6AqM0Ig4ZE60Qt+h+wKOSCGgEDLf/Ida0eV5MbwlQr7L07nexLqM4F6Uens= X-Gm-Gg: Acq92OFKYSw7V3JLuQ4MUwrh+BwnydtQMfcZeUClHwyUFvPTVkXAJg9tmSBpYJ7r9LW IfYdatdhPNF0QFE2XyXir/Ax307GAB36stKPOXPEzJkipV/N/MktlDICg9OdPEFiTItZjkmD/Ix xxs6kOjDHkSkTPvIY92Q0j57M5khtQgOAXVQEI3TnOdVD8GKMFdAmRta/N+JDaVjQ7Y1jyxph9n SrjAO3ZHj7qZrcN5jCoreuTtrn5o75tgcqxq4g1DgOOvjkEbqHdsPQxqM6ayDWyKiUfmU+onzE1 j09M+ffLQPRRaZpPtQlHZeXYXOj+E09OWNkHnB19ZXK+qc+RQQxxY8PlfFjMSPVCkQVBntSiqmz Ds945pHUkNVTS5v0OcnxcmMIcHv9J9Ucd1MRICH32srXP+oWSBlwVGrZb9YwuDh0FqZY/F8gnrj 7hjJ8Bek5wQDGgtOn/NGWpX0qFbUEIVzuDr7u6umF7SbMn1WMqu4YcHkaAWNUjGKxiTKmpD2CjB tNHhsdEUf3aqQA= X-Received: by 2002:a05:600c:a405:b0:48a:52ce:a4b1 with SMTP id 5b1f17b1804b1-48fe60dd5e8mr68922885e9.15.1778862813557; Fri, 15 May 2026 09:33:33 -0700 (PDT) Received: from localhost (p200300f65f47db047ce9331f6697a627.dip0.t-ipconnect.de. [2003:f6:5f47:db04:7ce9:331f:6697:a627]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-48fe5e9d5d9sm79035105e9.15.2026.05.15.09.33.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 09:33:33 -0700 (PDT) From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig=20=28The=20Capable=20Hub=29?= To: Lee Jones , Pavel Machek Cc: Sakari Ailus , Jan-Simon Moeller , Alexander Sverdlin , Riku Voipio , =?utf-8?q?Marek_Beh=C3=BAn?= , Jonathan Cameron , Laurent Pinchart , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] leds: Use named initializers for arrays of i2c_device_data Date: Fri, 15 May 2026 18:33:24 +0200 Message-ID: <20260515163325.471175-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=23621; i=u.kleine-koenig@baylibre.com; h=from:subject; bh=+hyxAutSr0SZBbYi+DBYCGS9Gw3qJ92Hui0BnwYjR6w=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBqB0rVBdQbtQFLY0oBjThzEr3ROJBQwzaYbWhSx cp6XXPTgrGJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCagdK1QAKCRCPgPtYfRL+ ThWmB/sEPhJhbNib1aZE9OhdYztGhcbqFvE1PBbG4tK3lzgP0weJQcl60K+XZhUkCqvvWvQ4FZo ItcmHxnpFSJUrlHHkQYUQ1TQaNeD5yo286iQoyxc1kG+DzKdPYdB5kCs+qhj963DeMgI5Iriujf +gZqgMVXJ0jO+3KFL3fjJpSxd3VZN3xOfCf+68OyTybxeGWcGkx3gJlNOHHRV0JOj/YExyO4XQg 8JL8FYYx7ZAmCtT1kLCQzfqpqwrnnU1BDaRdRdW8VCyYtVTY+7O5WC9BX8HR/k0uZG5Prv/CEw8 KUV66VnTq0feCcoOcgFP7nPJsIBssH8R+sNW6sGZuEjd/9PZ X-Developer-Key: i=u.kleine-koenig@baylibre.com; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: quoted-printable While being less compact, using named initializers allows to more easily see which members of the structs are assigned which value without having to lookup the declaration of the struct. And it's also more robust against changes to the struct definition. The mentioned robustness is relevant for a planned change to struct i2c_device_id that replaces .driver_data by an anonymous union. While touching all these arrays, unify usage of whitespace and commas. This patch doesn't modify the compiled arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds. Signed-off-by: Uwe Kleine-K=C3=B6nig (The Capable Hub) Reviewed-by: Alexander Sverdlin --- Hello, the mentioned change to i2c_device_id is the following: diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetab= le.h index 23ff24080dfd..aebd3a5e90af 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h @@ -477,7 +477,11 @@ struct rpmsg_device_id { =09 struct i2c_device_id { char name[I2C_NAME_SIZE]; - kernel_ulong_t driver_data; /* Data private to the driver */ + union { + /* Data private to the driver */ + kernel_ulong_t driver_data; + const void *driver_data_ptr; + }; }; =09 /* pci_epf */ and this requires that .driver_data is assigned via a named initializer for static data. This requirement isn't a bad one because named initializers are also much better readable than list initializers. The union added to struct i2c_device_id enables further cleanups like: diff --git a/drivers/regulator/ad5398.c b/drivers/regulator/ad5398.c index 0123ca8157a8..dfb0b07500a7 100644 --- a/drivers/regulator/ad5398.c +++ b/drivers/regulator/ad5398.c @@ -207,8 +207,8 @@ struct ad5398_current_data_format { static const struct ad5398_current_data_format df_10_4_120 =3D {10, 4, 0,= 120000}; =09 static const struct i2c_device_id ad5398_id[] =3D { - { .name =3D "ad5398", .driver_data =3D (kernel_ulong_t)&df_10_4_120 }, - { .name =3D "ad5821", .driver_data =3D (kernel_ulong_t)&df_10_4_120 }, + { .name =3D "ad5398", .driver_data_ptr =3D &df_10_4_120 }, + { .name =3D "ad5821", .driver_data_ptr =3D &df_10_4_120 }, { } }; MODULE_DEVICE_TABLE(i2c, ad5398_id); @@ -219,8 +219,7 @@ static int ad5398_probe(struct i2c_client *client) struct regulator_init_data *init_data =3D dev_get_platdata(&client->dev); struct regulator_config config =3D { }; struct ad5398_chip_info *chip; - const struct ad5398_current_data_format *df =3D - (struct ad5398_current_data_format *)id->driver_data; + const struct ad5398_current_data_format *df =3D id->driver_data; =09 chip =3D devm_kzalloc(&client->dev, sizeof(*chip), GFP_KERNEL); if (!chip) that are an improvement for readability (again!) and it keeps some properties of the pointers (here: being const) without having to pay attention for that. (I didn't find a nice led driver that benefits, so this is "only" a regulator driver example.) My additional motivation for this effort is CHERI[1]. This is a hardware extension that uses 128 bit pointers but unsigned long is still 64 bit. So with CHERI you cannot store pointers in unsigned long variables. Best regards Uwe drivers/leds/flash/leds-as3645a.c | 2 +- drivers/leds/flash/leds-lm3601x.c | 4 ++-- drivers/leds/leds-an30259a.c | 2 +- drivers/leds/leds-aw200xx.c | 10 +++++----- drivers/leds/leds-bd2802.c | 2 +- drivers/leds/leds-blinkm.c | 4 ++-- drivers/leds/leds-is31fl319x.c | 22 +++++++++++----------- drivers/leds/leds-is31fl32xx.c | 18 +++++++++--------- drivers/leds/leds-lm3530.c | 4 ++-- drivers/leds/leds-lm3532.c | 4 ++-- drivers/leds/leds-lm355x.c | 6 +++--- drivers/leds/leds-lm3642.c | 4 ++-- drivers/leds/leds-lm3692x.c | 4 ++-- drivers/leds/leds-lm3697.c | 2 +- drivers/leds/leds-lp3944.c | 4 ++-- drivers/leds/leds-lp3952.c | 4 ++-- drivers/leds/leds-lp50xx.c | 12 ++++++------ drivers/leds/leds-lp5521.c | 2 +- drivers/leds/leds-lp5523.c | 4 ++-- drivers/leds/leds-lp5562.c | 2 +- drivers/leds/leds-lp5569.c | 2 +- drivers/leds/leds-lp8501.c | 2 +- drivers/leds/leds-lp8860.c | 2 +- drivers/leds/leds-lp8864.c | 4 ++-- drivers/leds/leds-pca9532.c | 8 ++++---- drivers/leds/leds-pca955x.c | 12 ++++++------ drivers/leds/leds-pca963x.c | 8 ++++---- drivers/leds/leds-pca995x.c | 8 ++++---- drivers/leds/leds-st1202.c | 2 +- drivers/leds/leds-tca6507.c | 2 +- drivers/leds/leds-tlc591xx.c | 6 +++--- drivers/leds/leds-turris-omnia.c | 2 +- drivers/leds/rgb/leds-ktd202x.c | 6 +++--- 33 files changed, 90 insertions(+), 90 deletions(-) diff --git a/drivers/leds/flash/leds-as3645a.c b/drivers/leds/flash/leds-as= 3645a.c index 2f2d783c62c3..5fefcaef3714 100644 --- a/drivers/leds/flash/leds-as3645a.c +++ b/drivers/leds/flash/leds-as3645a.c @@ -741,7 +741,7 @@ static void as3645a_remove(struct i2c_client *client) } =20 static const struct i2c_device_id as3645a_id_table[] =3D { - { AS_NAME }, + { .name =3D AS_NAME }, { } }; MODULE_DEVICE_TABLE(i2c, as3645a_id_table); diff --git a/drivers/leds/flash/leds-lm3601x.c b/drivers/leds/flash/leds-lm= 3601x.c index abf6b96ade3d..8d00510c8967 100644 --- a/drivers/leds/flash/leds-lm3601x.c +++ b/drivers/leds/flash/leds-lm3601x.c @@ -465,8 +465,8 @@ static void lm3601x_remove(struct i2c_client *client) } =20 static const struct i2c_device_id lm3601x_id[] =3D { - { "LM36010", CHIP_LM36010 }, - { "LM36011", CHIP_LM36011 }, + { .name =3D "LM36010", .driver_data =3D CHIP_LM36010 }, + { .name =3D "LM36011", .driver_data =3D CHIP_LM36011 }, { } }; MODULE_DEVICE_TABLE(i2c, lm3601x_id); diff --git a/drivers/leds/leds-an30259a.c b/drivers/leds/leds-an30259a.c index a42cc4bc6917..4654a732d1b1 100644 --- a/drivers/leds/leds-an30259a.c +++ b/drivers/leds/leds-an30259a.c @@ -331,7 +331,7 @@ static const struct of_device_id an30259a_match_table[]= =3D { MODULE_DEVICE_TABLE(of, an30259a_match_table); =20 static const struct i2c_device_id an30259a_id[] =3D { - { "an30259a" }, + { .name =3D "an30259a" }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(i2c, an30259a_id); diff --git a/drivers/leds/leds-aw200xx.c b/drivers/leds/leds-aw200xx.c index fe223d363a5d..0d90eeb6448f 100644 --- a/drivers/leds/leds-aw200xx.c +++ b/drivers/leds/leds-aw200xx.c @@ -637,11 +637,11 @@ static const struct aw200xx_chipdef aw20108_cdef =3D { }; =20 static const struct i2c_device_id aw200xx_id[] =3D { - { "aw20036" }, - { "aw20054" }, - { "aw20072" }, - { "aw20108" }, - {} + { .name =3D "aw20036" }, + { .name =3D "aw20054" }, + { .name =3D "aw20072" }, + { .name =3D "aw20108" }, + { } }; MODULE_DEVICE_TABLE(i2c, aw200xx_id); =20 diff --git a/drivers/leds/leds-bd2802.c b/drivers/leds/leds-bd2802.c index 2a08c5f27608..9732f41a1143 100644 --- a/drivers/leds/leds-bd2802.c +++ b/drivers/leds/leds-bd2802.c @@ -776,7 +776,7 @@ static int bd2802_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(bd2802_pm, bd2802_suspend, bd2802_resume); =20 static const struct i2c_device_id bd2802_id[] =3D { - { "BD2802" }, + { .name =3D "BD2802" }, { } }; MODULE_DEVICE_TABLE(i2c, bd2802_id); diff --git a/drivers/leds/leds-blinkm.c b/drivers/leds/leds-blinkm.c index 577497b9d426..42188926b2bb 100644 --- a/drivers/leds/leds-blinkm.c +++ b/drivers/leds/leds-blinkm.c @@ -805,8 +805,8 @@ static void blinkm_remove(struct i2c_client *client) } =20 static const struct i2c_device_id blinkm_id[] =3D { - { "blinkm" }, - {} + { .name =3D "blinkm" }, + { } }; =20 MODULE_DEVICE_TABLE(i2c, blinkm_id); diff --git a/drivers/leds/leds-is31fl319x.c b/drivers/leds/leds-is31fl319x.c index e411cee06dab..80f38dba0fba 100644 --- a/drivers/leds/leds-is31fl319x.c +++ b/drivers/leds/leds-is31fl319x.c @@ -565,17 +565,17 @@ static int is31fl319x_probe(struct i2c_client *client) * even though it is not used for DeviceTree based instantiation. */ static const struct i2c_device_id is31fl319x_id[] =3D { - { "is31fl3190" }, - { "is31fl3191" }, - { "is31fl3193" }, - { "is31fl3196" }, - { "is31fl3199" }, - { "sn3190" }, - { "sn3191" }, - { "sn3193" }, - { "sn3196" }, - { "sn3199" }, - {}, + { .name =3D "is31fl3190" }, + { .name =3D "is31fl3191" }, + { .name =3D "is31fl3193" }, + { .name =3D "is31fl3196" }, + { .name =3D "is31fl3199" }, + { .name =3D "sn3190" }, + { .name =3D "sn3191" }, + { .name =3D "sn3193" }, + { .name =3D "sn3196" }, + { .name =3D "sn3199" }, + { } }; MODULE_DEVICE_TABLE(i2c, is31fl319x_id); =20 diff --git a/drivers/leds/leds-is31fl32xx.c b/drivers/leds/leds-is31fl32xx.c index fe07acbb103a..6c8d6b833260 100644 --- a/drivers/leds/leds-is31fl32xx.c +++ b/drivers/leds/leds-is31fl32xx.c @@ -616,15 +616,15 @@ static void is31fl32xx_remove(struct i2c_client *clie= nt) * even though it is not used for DeviceTree based instantiation. */ static const struct i2c_device_id is31fl32xx_id[] =3D { - { "is31fl3293" }, - { "is31fl3236" }, - { "is31fl3236a" }, - { "is31fl3235" }, - { "is31fl3218" }, - { "sn3218" }, - { "is31fl3216" }, - { "sn3216" }, - {}, + { .name =3D "is31fl3293" }, + { .name =3D "is31fl3236" }, + { .name =3D "is31fl3236a" }, + { .name =3D "is31fl3235" }, + { .name =3D "is31fl3218" }, + { .name =3D "sn3218" }, + { .name =3D "is31fl3216" }, + { .name =3D "sn3216" }, + { } }; =20 MODULE_DEVICE_TABLE(i2c, is31fl32xx_id); diff --git a/drivers/leds/leds-lm3530.c b/drivers/leds/leds-lm3530.c index e44a3db106c3..481e9c0a41e7 100644 --- a/drivers/leds/leds-lm3530.c +++ b/drivers/leds/leds-lm3530.c @@ -478,8 +478,8 @@ static void lm3530_remove(struct i2c_client *client) } =20 static const struct i2c_device_id lm3530_id[] =3D { - { LM3530_NAME }, - {} + { .name =3D LM3530_NAME }, + { } }; MODULE_DEVICE_TABLE(i2c, lm3530_id); =20 diff --git a/drivers/leds/leds-lm3532.c b/drivers/leds/leds-lm3532.c index 24dc8ad27bb3..b51496910b08 100644 --- a/drivers/leds/leds-lm3532.c +++ b/drivers/leds/leds-lm3532.c @@ -722,8 +722,8 @@ static const struct of_device_id of_lm3532_leds_match[]= =3D { MODULE_DEVICE_TABLE(of, of_lm3532_leds_match); =20 static const struct i2c_device_id lm3532_id[] =3D { - { LM3532_NAME }, - {} + { .name =3D LM3532_NAME }, + { } }; MODULE_DEVICE_TABLE(i2c, lm3532_id); =20 diff --git a/drivers/leds/leds-lm355x.c b/drivers/leds/leds-lm355x.c index f68771b9eac6..2b7cf42141e4 100644 --- a/drivers/leds/leds-lm355x.c +++ b/drivers/leds/leds-lm355x.c @@ -504,9 +504,9 @@ static void lm355x_remove(struct i2c_client *client) } =20 static const struct i2c_device_id lm355x_id[] =3D { - {LM3554_NAME, CHIP_LM3554}, - {LM3556_NAME, CHIP_LM3556}, - {} + { .name =3D LM3554_NAME, .driver_data =3D CHIP_LM3554 }, + { .name =3D LM3556_NAME, .driver_data =3D CHIP_LM3556 }, + { } }; =20 MODULE_DEVICE_TABLE(i2c, lm355x_id); diff --git a/drivers/leds/leds-lm3642.c b/drivers/leds/leds-lm3642.c index 36246267b096..2a893399e05f 100644 --- a/drivers/leds/leds-lm3642.c +++ b/drivers/leds/leds-lm3642.c @@ -388,8 +388,8 @@ static void lm3642_remove(struct i2c_client *client) } =20 static const struct i2c_device_id lm3642_id[] =3D { - { LM3642_NAME }, - {} + { .name =3D LM3642_NAME }, + { } }; =20 MODULE_DEVICE_TABLE(i2c, lm3642_id); diff --git a/drivers/leds/leds-lm3692x.c b/drivers/leds/leds-lm3692x.c index 1d64ceb5ac85..95b850a3b31c 100644 --- a/drivers/leds/leds-lm3692x.c +++ b/drivers/leds/leds-lm3692x.c @@ -503,8 +503,8 @@ static void lm3692x_remove(struct i2c_client *client) } =20 static const struct i2c_device_id lm3692x_id[] =3D { - { "lm36922", LM36922_MODEL }, - { "lm36923", LM36923_MODEL }, + { .name =3D "lm36922", .driver_data =3D LM36922_MODEL }, + { .name =3D "lm36923", .driver_data =3D LM36923_MODEL }, { } }; MODULE_DEVICE_TABLE(i2c, lm3692x_id); diff --git a/drivers/leds/leds-lm3697.c b/drivers/leds/leds-lm3697.c index 7ad232780a31..933191fb2be0 100644 --- a/drivers/leds/leds-lm3697.c +++ b/drivers/leds/leds-lm3697.c @@ -354,7 +354,7 @@ static void lm3697_remove(struct i2c_client *client) } =20 static const struct i2c_device_id lm3697_id[] =3D { - { "lm3697" }, + { .name =3D "lm3697" }, { } }; MODULE_DEVICE_TABLE(i2c, lm3697_id); diff --git a/drivers/leds/leds-lp3944.c b/drivers/leds/leds-lp3944.c index ccfeee49ea78..8e95dcedce40 100644 --- a/drivers/leds/leds-lp3944.c +++ b/drivers/leds/leds-lp3944.c @@ -417,8 +417,8 @@ static void lp3944_remove(struct i2c_client *client) =20 /* lp3944 i2c driver struct */ static const struct i2c_device_id lp3944_id[] =3D { - { "lp3944" }, - {} + { .name =3D "lp3944" }, + { } }; =20 MODULE_DEVICE_TABLE(i2c, lp3944_id); diff --git a/drivers/leds/leds-lp3952.c b/drivers/leds/leds-lp3952.c index 17219a582704..0a1af284f52b 100644 --- a/drivers/leds/leds-lp3952.c +++ b/drivers/leds/leds-lp3952.c @@ -266,8 +266,8 @@ static int lp3952_probe(struct i2c_client *client) } =20 static const struct i2c_device_id lp3952_id[] =3D { - { LP3952_NAME }, - {} + { .name =3D LP3952_NAME }, + { } }; MODULE_DEVICE_TABLE(i2c, lp3952_id); =20 diff --git a/drivers/leds/leds-lp50xx.c b/drivers/leds/leds-lp50xx.c index e2a9c8592953..64303faa1a8a 100644 --- a/drivers/leds/leds-lp50xx.c +++ b/drivers/leds/leds-lp50xx.c @@ -600,12 +600,12 @@ static void lp50xx_remove(struct i2c_client *client) } =20 static const struct i2c_device_id lp50xx_id[] =3D { - { "lp5009", (kernel_ulong_t)&lp50xx_chip_info_tbl[LP5009] }, - { "lp5012", (kernel_ulong_t)&lp50xx_chip_info_tbl[LP5012] }, - { "lp5018", (kernel_ulong_t)&lp50xx_chip_info_tbl[LP5018] }, - { "lp5024", (kernel_ulong_t)&lp50xx_chip_info_tbl[LP5024] }, - { "lp5030", (kernel_ulong_t)&lp50xx_chip_info_tbl[LP5030] }, - { "lp5036", (kernel_ulong_t)&lp50xx_chip_info_tbl[LP5036] }, + { .name =3D "lp5009", .driver_data =3D (kernel_ulong_t)&lp50xx_chip_info_= tbl[LP5009] }, + { .name =3D "lp5012", .driver_data =3D (kernel_ulong_t)&lp50xx_chip_info_= tbl[LP5012] }, + { .name =3D "lp5018", .driver_data =3D (kernel_ulong_t)&lp50xx_chip_info_= tbl[LP5018] }, + { .name =3D "lp5024", .driver_data =3D (kernel_ulong_t)&lp50xx_chip_info_= tbl[LP5024] }, + { .name =3D "lp5030", .driver_data =3D (kernel_ulong_t)&lp50xx_chip_info_= tbl[LP5030] }, + { .name =3D "lp5036", .driver_data =3D (kernel_ulong_t)&lp50xx_chip_info_= tbl[LP5036] }, { } }; MODULE_DEVICE_TABLE(i2c, lp50xx_id); diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c index 7564b9953408..4937fc968011 100644 --- a/drivers/leds/leds-lp5521.c +++ b/drivers/leds/leds-lp5521.c @@ -253,7 +253,7 @@ static struct lp55xx_device_config lp5521_cfg =3D { }; =20 static const struct i2c_device_id lp5521_id[] =3D { - { "lp5521", .driver_data =3D (kernel_ulong_t)&lp5521_cfg, }, /* Three cha= nnel chip */ + { .name =3D "lp5521", .driver_data =3D (kernel_ulong_t)&lp5521_cfg }, /* = Three channel chip */ { } }; MODULE_DEVICE_TABLE(i2c, lp5521_id); diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c index 4ed3e735260c..39cb26d343c1 100644 --- a/drivers/leds/leds-lp5523.c +++ b/drivers/leds/leds-lp5523.c @@ -346,8 +346,8 @@ static struct lp55xx_device_config lp5523_cfg =3D { }; =20 static const struct i2c_device_id lp5523_id[] =3D { - { "lp5523", .driver_data =3D (kernel_ulong_t)&lp5523_cfg, }, - { "lp55231", .driver_data =3D (kernel_ulong_t)&lp5523_cfg, }, + { .name =3D "lp5523", .driver_data =3D (kernel_ulong_t)&lp5523_cfg }, + { .name =3D "lp55231", .driver_data =3D (kernel_ulong_t)&lp5523_cfg }, { } }; =20 diff --git a/drivers/leds/leds-lp5562.c b/drivers/leds/leds-lp5562.c index 14a4af361b26..9e6056821eb5 100644 --- a/drivers/leds/leds-lp5562.c +++ b/drivers/leds/leds-lp5562.c @@ -395,7 +395,7 @@ static struct lp55xx_device_config lp5562_cfg =3D { }; =20 static const struct i2c_device_id lp5562_id[] =3D { - { "lp5562", .driver_data =3D (kernel_ulong_t)&lp5562_cfg, }, + { .name =3D "lp5562", .driver_data =3D (kernel_ulong_t)&lp5562_cfg }, { } }; MODULE_DEVICE_TABLE(i2c, lp5562_id); diff --git a/drivers/leds/leds-lp5569.c b/drivers/leds/leds-lp5569.c index a252ba6c455d..199db3efca65 100644 --- a/drivers/leds/leds-lp5569.c +++ b/drivers/leds/leds-lp5569.c @@ -514,7 +514,7 @@ static struct lp55xx_device_config lp5569_cfg =3D { }; =20 static const struct i2c_device_id lp5569_id[] =3D { - { "lp5569", .driver_data =3D (kernel_ulong_t)&lp5569_cfg, }, + { .name =3D "lp5569", .driver_data =3D (kernel_ulong_t)&lp5569_cfg }, { } }; =20 diff --git a/drivers/leds/leds-lp8501.c b/drivers/leds/leds-lp8501.c index ee4ff4586bc0..946c27fd74cc 100644 --- a/drivers/leds/leds-lp8501.c +++ b/drivers/leds/leds-lp8501.c @@ -130,7 +130,7 @@ static struct lp55xx_device_config lp8501_cfg =3D { }; =20 static const struct i2c_device_id lp8501_id[] =3D { - { "lp8501", .driver_data =3D (kernel_ulong_t)&lp8501_cfg, }, + { .name =3D "lp8501", .driver_data =3D (kernel_ulong_t)&lp8501_cfg }, { } }; MODULE_DEVICE_TABLE(i2c, lp8501_id); diff --git a/drivers/leds/leds-lp8860.c b/drivers/leds/leds-lp8860.c index 7a436861c4b7..69f064781f69 100644 --- a/drivers/leds/leds-lp8860.c +++ b/drivers/leds/leds-lp8860.c @@ -333,7 +333,7 @@ static int lp8860_probe(struct i2c_client *client) } =20 static const struct i2c_device_id lp8860_id[] =3D { - { "lp8860" }, + { .name =3D "lp8860" }, { } }; MODULE_DEVICE_TABLE(i2c, lp8860_id); diff --git a/drivers/leds/leds-lp8864.c b/drivers/leds/leds-lp8864.c index 3afd729d2f8a..204727f2f350 100644 --- a/drivers/leds/leds-lp8864.c +++ b/drivers/leds/leds-lp8864.c @@ -270,8 +270,8 @@ static int lp8864_probe(struct i2c_client *client) } =20 static const struct i2c_device_id lp8864_id[] =3D { - { "lp8864" }, - {} + { .name =3D "lp8864" }, + { } }; MODULE_DEVICE_TABLE(i2c, lp8864_id); =20 diff --git a/drivers/leds/leds-pca9532.c b/drivers/leds/leds-pca9532.c index 0344189bb991..54fd344adc74 100644 --- a/drivers/leds/leds-pca9532.c +++ b/drivers/leds/leds-pca9532.c @@ -67,10 +67,10 @@ enum { }; =20 static const struct i2c_device_id pca9532_id[] =3D { - { "pca9530", pca9530 }, - { "pca9531", pca9531 }, - { "pca9532", pca9532 }, - { "pca9533", pca9533 }, + { .name =3D "pca9530", .driver_data =3D pca9530 }, + { .name =3D "pca9531", .driver_data =3D pca9531 }, + { .name =3D "pca9532", .driver_data =3D pca9532 }, + { .name =3D "pca9533", .driver_data =3D pca9533 }, { } }; =20 diff --git a/drivers/leds/leds-pca955x.c b/drivers/leds/leds-pca955x.c index 2007fe6217ec..273383351ba0 100644 --- a/drivers/leds/leds-pca955x.c +++ b/drivers/leds/leds-pca955x.c @@ -764,12 +764,12 @@ static int pca955x_probe(struct i2c_client *client) } =20 static const struct i2c_device_id pca955x_id[] =3D { - { "pca9550", (kernel_ulong_t)&pca955x_chipdefs[pca9550] }, - { "pca9551", (kernel_ulong_t)&pca955x_chipdefs[pca9551] }, - { "pca9552", (kernel_ulong_t)&pca955x_chipdefs[pca9552] }, - { "ibm-pca9552", (kernel_ulong_t)&pca955x_chipdefs[ibm_pca9552] }, - { "pca9553", (kernel_ulong_t)&pca955x_chipdefs[pca9553] }, - {} + { .name =3D "pca9550", .driver_data =3D (kernel_ulong_t)&pca955x_chipdefs= [pca9550] }, + { .name =3D "pca9551", .driver_data =3D (kernel_ulong_t)&pca955x_chipdefs= [pca9551] }, + { .name =3D "pca9552", .driver_data =3D (kernel_ulong_t)&pca955x_chipdefs= [pca9552] }, + { .name =3D "ibm-pca9552", .driver_data =3D (kernel_ulong_t)&pca955x_chip= defs[ibm_pca9552] }, + { .name =3D "pca9553", .driver_data =3D (kernel_ulong_t)&pca955x_chipdefs= [pca9553] }, + { } }; MODULE_DEVICE_TABLE(i2c, pca955x_id); =20 diff --git a/drivers/leds/leds-pca963x.c b/drivers/leds/leds-pca963x.c index 050e93b04884..e3a81c60ee27 100644 --- a/drivers/leds/leds-pca963x.c +++ b/drivers/leds/leds-pca963x.c @@ -88,10 +88,10 @@ static struct pca963x_chipdef pca963x_chipdefs[] =3D { #define PCA963X_BLINK_PERIOD_MAX 10667 =20 static const struct i2c_device_id pca963x_id[] =3D { - { "pca9632", pca9633 }, - { "pca9633", pca9633 }, - { "pca9634", pca9634 }, - { "pca9635", pca9635 }, + { .name =3D "pca9632", .driver_data =3D pca9633 }, + { .name =3D "pca9633", .driver_data =3D pca9633 }, + { .name =3D "pca9634", .driver_data =3D pca9634 }, + { .name =3D "pca9635", .driver_data =3D pca9635 }, { } }; MODULE_DEVICE_TABLE(i2c, pca963x_id); diff --git a/drivers/leds/leds-pca995x.c b/drivers/leds/leds-pca995x.c index 6ad06ce2bf64..59951207fd04 100644 --- a/drivers/leds/leds-pca995x.c +++ b/drivers/leds/leds-pca995x.c @@ -188,10 +188,10 @@ static int pca995x_probe(struct i2c_client *client) } =20 static const struct i2c_device_id pca995x_id[] =3D { - { "pca9952", .driver_data =3D (kernel_ulong_t)&pca9952_chipdef }, - { "pca9955b", .driver_data =3D (kernel_ulong_t)&pca9955b_chipdef }, - { "pca9956b", .driver_data =3D (kernel_ulong_t)&pca9956b_chipdef }, - {} + { .name =3D "pca9952", .driver_data =3D (kernel_ulong_t)&pca9952_chipdef = }, + { .name =3D "pca9955b", .driver_data =3D (kernel_ulong_t)&pca9955b_chipde= f }, + { .name =3D "pca9956b", .driver_data =3D (kernel_ulong_t)&pca9956b_chipde= f }, + { } }; MODULE_DEVICE_TABLE(i2c, pca995x_id); =20 diff --git a/drivers/leds/leds-st1202.c b/drivers/leds/leds-st1202.c index 4e5dd76d714d..03518bf60f6c 100644 --- a/drivers/leds/leds-st1202.c +++ b/drivers/leds/leds-st1202.c @@ -390,7 +390,7 @@ static int st1202_probe(struct i2c_client *client) } =20 static const struct i2c_device_id st1202_id[] =3D { - { "st1202-i2c" }, + { .name =3D "st1202-i2c" }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(i2c, st1202_id); diff --git a/drivers/leds/leds-tca6507.c b/drivers/leds/leds-tca6507.c index fd0e8bab9a4b..9afe2722986c 100644 --- a/drivers/leds/leds-tca6507.c +++ b/drivers/leds/leds-tca6507.c @@ -182,7 +182,7 @@ struct tca6507_chip { }; =20 static const struct i2c_device_id tca6507_id[] =3D { - { "tca6507" }, + { .name =3D "tca6507" }, { } }; MODULE_DEVICE_TABLE(i2c, tca6507_id); diff --git a/drivers/leds/leds-tlc591xx.c b/drivers/leds/leds-tlc591xx.c index 6605e08a042a..2f272cfd2e91 100644 --- a/drivers/leds/leds-tlc591xx.c +++ b/drivers/leds/leds-tlc591xx.c @@ -214,9 +214,9 @@ tlc591xx_probe(struct i2c_client *client) } =20 static const struct i2c_device_id tlc591xx_id[] =3D { - { "tlc59116" }, - { "tlc59108" }, - {}, + { .name =3D "tlc59116" }, + { .name =3D "tlc59108" }, + { } }; MODULE_DEVICE_TABLE(i2c, tlc591xx_id); =20 diff --git a/drivers/leds/leds-turris-omnia.c b/drivers/leds/leds-turris-om= nia.c index 25ee5c1eb820..ed6a47bbb44f 100644 --- a/drivers/leds/leds-turris-omnia.c +++ b/drivers/leds/leds-turris-omnia.c @@ -532,7 +532,7 @@ static const struct of_device_id of_omnia_leds_match[] = =3D { MODULE_DEVICE_TABLE(of, of_omnia_leds_match); =20 static const struct i2c_device_id omnia_id[] =3D { - { "omnia" }, + { .name =3D "omnia" }, { } }; MODULE_DEVICE_TABLE(i2c, omnia_id); diff --git a/drivers/leds/rgb/leds-ktd202x.c b/drivers/leds/rgb/leds-ktd202= x.c index e4f0f25a5e45..143020945e23 100644 --- a/drivers/leds/rgb/leds-ktd202x.c +++ b/drivers/leds/rgb/leds-ktd202x.c @@ -605,9 +605,9 @@ static void ktd202x_shutdown(struct i2c_client *client) } =20 static const struct i2c_device_id ktd202x_id[] =3D { - {"ktd2026", KTD2026_NUM_LEDS}, - {"ktd2027", KTD2027_NUM_LEDS}, - {} + { .name =3D "ktd2026", .driver_data =3D KTD2026_NUM_LEDS }, + { .name =3D "ktd2027", .driver_data =3D KTD2027_NUM_LEDS }, + { } }; MODULE_DEVICE_TABLE(i2c, ktd202x_id); =20 base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731 --=20 2.47.3