From nobody Mon May 25 04:35:27 2026 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (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 EB852371868 for ; Mon, 18 May 2026 17:23:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779125027; cv=none; b=D8zq1ahom9tDEqlbPeH4p5XxURKv1HLB4JjZMhmiwDDOHDjhd2xN/xD4O0eiEwnQmH+ZQ3eA7/Y/bDBsjuXi6wjBeEvBfHlscmz61TfK/u9+wf8vNfm2/Ti0WVPLN/pWtXjBM8AZ3xJnTkC0iHUiv1RwyyzcrshL0hvLKDrSs34= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779125027; c=relaxed/simple; bh=43hGWy6CXT2R1bwTxcRgu8XuA0X83BFP5fjXxCH5MSQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=mjHVDKk1IiOf3k8oy1NSiQijq24V2BjXf/IZ3QFExViSArYNKLLRNeeLlGA49BrtmiPJErTI0pEwsn6bSY6GM72Rj4HaSaUkv2pqGQ6MdbPIeq4bXZJlkVru3FY6nuxc1kFn4HjgC9dpeyP7gL2mscUM4RPxN5rwjo6CwSRX8hY= 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=MIGjySnT; arc=none smtp.client-ip=209.85.221.52 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="MIGjySnT" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-43eb05b1875so1402608f8f.3 for ; Mon, 18 May 2026 10:23:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre.com; s=google; t=1779125024; x=1779729824; 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=MuK6ptr3aWkYIKLFnR1DBnyHrMXuuFxeZ3aCiGm6k6M=; b=MIGjySnTfJOmi2Gm/Tz8cyWhX8otSHaNnR5owIi2sUB6PpQxlsTCIy2a5kJvCm8xS6 9z72P8lefcpmHmG7VoWO+EuT8zt2zHlJUwepwTZxoOHSd1x5WGF9dPKrpulnClPyPgtI Z0hAEpGFSDMhBrMfwqZxekMnXzkrirC4PYrhEpQ/3lbx+EYmjYBKLgkqQjxSzNg8dVfi IOaGlDTJ6ka4BcBmbflBjZy1jgy6Jz0zfPqIOcrP2GWTQaq+3maWhgZWO3ugUAjsQF9o ET3Q88/wnwSgmj5yeqDsfqxGEl1IPud//tCHlFE/v/QlurU8E5k7VJxspDETF/c5rZfk kJMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779125024; x=1779729824; 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=MuK6ptr3aWkYIKLFnR1DBnyHrMXuuFxeZ3aCiGm6k6M=; b=YDt4JnVbUYVnIe4w4ipxQIn6BYJVA9ryNjp3NNjwsg8TWVfOMVZo4/R2HW5OYCpACr s2Fw6KWB2WPbwIxw88Zg6gwfTTuVDwDGG9sBORYcRnVQc3hJLyiMjsStDpgWwSqhygRA GgRHdAunQdnD91aQ1V1kKJOF4ba56f3NQdHK7J1loQyNewlzgtWaWfZpjKcLfBv2r5Us AOizmyYP8COF+2gmZWWYkqeTvaI28EVT+fi3TxXJqbgq2p4lADFvPzcX8QpSrA8nfrEB nWpU/Nkfz0JkLJ/4MEjCqClVgBpHKP18rWHThte6yStlwbe6hfeWsErPFmF8PnfRRcgw ydTA== X-Gm-Message-State: AOJu0YyVsjjW4LsDy+3EDbHFp2soidDCA+vGgDiwG6MQm9rDwaThNn18 uYYBFRd0YVfqqiaywZm8H/4J+jKwaRhjoZTCrg7G4ikz3SyFmRdXVK8DrXRJB8srKTxsjQPwkJx 7WSwbrMo= X-Gm-Gg: Acq92OHXjVj5k3puRPP5vO/9Sop1jfs8yPlPyA9kdPdzrsJ47Z5pvcLaUhRWzNqyXM3 PNsQymIpaY44kcC/rZpJUPB4cJRWXOJGSpF3wsvB8TamQHZvlBW2PjBJUYqnpo59T/5Zg7fTENu EJdNWhnt67h1ZcyORdoCinPZGMKE7vuoBkwXXVMweOypTDYZoYnaix7wFcf0M8/MBzz2p/Nx9YO EV4jtmbyCR72ZOOtIFc+LXEX5rWuAoNM9+ElGM976dPh1ArJEKgpt8D3DdHfMyQbe/sklfg7MDn cX2S+LXYxUyII9vSuGQ3WBO1auf9mR9QJ7N8R8zG6AedWoXpsrqZmICoMMUQC/PwH+73NDmUm8u SBgyytbhurbC2NrV+CuRTF0D0CpvgkD7VYjE+YprJ2VueiG/HLoqntSkOvTnto+o2t27Vt5/2tX g1L7E9zpxPKCVn8xs6DPRUu9twQVl0qks6Qp5oLvq37hjy6ncSKmOg17x4mJtTPeG7kVjGKkirL Kshd6sbIJeN0Q== X-Received: by 2002:a05:6000:4014:b0:441:1fa5:4577 with SMTP id ffacd0b85a97d-45e5c5f20f3mr24717081f8f.26.1779125024256; Mon, 18 May 2026 10:23:44 -0700 (PDT) Received: from localhost (p200300f65f47db041bee4d0e08e9609b.dip0.t-ipconnect.de. [2003:f6:5f47:db04:1bee:4d0e:8e9:609b]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-45da0fe0f72sm41580678f8f.25.2026.05.18.10.23.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2026 10:23:43 -0700 (PDT) From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig=20=28The=20Capable=20Hub=29?= To: linux-pwm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH v1] pwm: pca9685: Use named initializers for struct i2c_device_id Date: Mon, 18 May 2026 19:23:22 +0200 Message-ID: <20260518172323.932774-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=1572; i=u.kleine-koenig@baylibre.com; h=from:subject; bh=43hGWy6CXT2R1bwTxcRgu8XuA0X83BFP5fjXxCH5MSQ=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBqC0sLnHgpNKtc2+h/7i6WXAYsCAutfNRxxxmor drbEyOtG1KJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCagtLCwAKCRCPgPtYfRL+ Tl9UCACkbdG/hXUGY4ZN2jzhlhSF/SqNxHOIkBj2+F3mSeU5Xb89Z0HraXLZErENNfTzoFOpv3q hQfX8f/je9DtXf2Lfu607NQ8irWUamaJnaFNaEDWrQN8fGvlSdZ1kufhI+Q1/zQbmlyKezwpbZY EJvwo3VN50V/FH4XTz8rPXlCURZ2EbdPzkQy4DzjPVNCYDSG0EZbMfx+RiyKYvTjqZZ+XueDhe9 F5dIDD8LJuiDPVGCnRUhjJHpXhCXJXnsa0zOkigp87xHSoogiGpa5Y3k3CCHcW61thw+LfI1DX2 jJEvX/nWBbNW14pbKxhBH7E0Ey7HYGZyi12Jcu7z87cZG+Ok 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. 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) --- Hello, this patch is part of a bigger quest to use named initializers for mainly struct i2c_device_id::driver_data to be able to modify i2c_device_id. See e.g. https://lore.kernel.org/all/20260518111203.639603-2-u.kleine-koenig@baylibr= e.com/ for the details. This patch here isn't critical for this quest, as no driver makes use of .driver_data, so apart from the better readability this is only about consistency with other subsystems. Best regards Uwe drivers/pwm/pwm-pca9685.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-pca9685.c b/drivers/pwm/pwm-pca9685.c index 107bebec3546..a02255a64ea8 100644 --- a/drivers/pwm/pwm-pca9685.c +++ b/drivers/pwm/pwm-pca9685.c @@ -538,7 +538,7 @@ static int __maybe_unused pca9685_pwm_runtime_resume(st= ruct device *dev) } =20 static const struct i2c_device_id pca9685_id[] =3D { - { "pca9685" }, + { .name =3D "pca9685" }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(i2c, pca9685_id); base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731 --=20 2.47.3