From: "Uwe Kleine-König (The Capable Hub)" <u.kleine-koenig@baylibre.com>
To: Wensheng Wang <wenswang@yeah.net>, Guenter Roeck <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v1 1/2] hwmon: (pmbus/mp2869) Remove unused driver data
Date: Tue, 12 May 2026 18:28:56 +0200 [thread overview]
Message-ID: <dcfcc82a93da77b55503998c5c7acf2a80c4a615.1778603083.git.ukleinek@kernel.org> (raw)
In-Reply-To: <cover.1778603083.git.ukleinek@kernel.org>
The driver doesn't make use of the i2c .driver_data and the of .data. So
drop the useless and irritating assignments.
While touching all these lines, use named initializers for the i2c
device ids and convert to the most common usage of spacing in such
arrays.
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
drivers/hwmon/pmbus/mp2869.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/hwmon/pmbus/mp2869.c b/drivers/hwmon/pmbus/mp2869.c
index 4647892e5112..d345be920429 100644
--- a/drivers/hwmon/pmbus/mp2869.c
+++ b/drivers/hwmon/pmbus/mp2869.c
@@ -632,20 +632,20 @@ static int mp2869_probe(struct i2c_client *client)
}
static const struct i2c_device_id mp2869_id[] = {
- {"mp2869", 0},
- {"mp29608", 1},
- {"mp29612", 2},
- {"mp29816", 3},
- {}
+ { .name = "mp2869" },
+ { .name = "mp29608" },
+ { .name = "mp29612" },
+ { .name = "mp29816" },
+ { }
};
MODULE_DEVICE_TABLE(i2c, mp2869_id);
static const struct of_device_id __maybe_unused mp2869_of_match[] = {
- {.compatible = "mps,mp2869", .data = (void *)0},
- {.compatible = "mps,mp29608", .data = (void *)1},
- {.compatible = "mps,mp29612", .data = (void *)2},
- {.compatible = "mps,mp29816", .data = (void *)3},
- {}
+ { .compatible = "mps,mp2869" },
+ { .compatible = "mps,mp29608" },
+ { .compatible = "mps,mp29612" },
+ { .compatible = "mps,mp29816" },
+ { }
};
MODULE_DEVICE_TABLE(of, mp2869_of_match);
--
2.47.3
next prev parent reply other threads:[~2026-05-12 16:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 16:28 [PATCH v1 0/2] hwmon: (pmbus/mp2869) Two cleanups about device ids Uwe Kleine-König (The Capable Hub)
2026-05-12 16:28 ` Uwe Kleine-König (The Capable Hub) [this message]
2026-05-12 18:37 ` [PATCH v1 1/2] hwmon: (pmbus/mp2869) Remove unused driver data Guenter Roeck
2026-05-12 16:28 ` [PATCH v1 2/2] hwmon: (pmbus/mp2869) Drop unjustified __maybe_unused Uwe Kleine-König (The Capable Hub)
2026-05-12 18:38 ` Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dcfcc82a93da77b55503998c5c7acf2a80c4a615.1778603083.git.ukleinek@kernel.org \
--to=u.kleine-koenig@baylibre.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=wenswang@yeah.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®