From: Guenter Roeck <linux@roeck-us.net>
To: Zev Weiss <zev@bewilderbeest.net>
Cc: Jean Delvare <jdelvare@suse.com>,
linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/8] hwmon: (pmbus/lm25066) Avoid forward declaration of lm25066_id
Date: Fri, 8 Oct 2021 06:47:05 -0700 [thread overview]
Message-ID: <20211008134705.GA1215575@roeck-us.net> (raw)
In-Reply-To: <20210928092242.30036-4-zev@bewilderbeest.net>
On Tue, Sep 28, 2021 at 02:22:37AM -0700, Zev Weiss wrote:
> Reordering things to put the table before the probe function
> eliminates the need for it.
>
> Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Applied.
Thanks,
Guenter
> ---
> drivers/hwmon/pmbus/lm25066.c | 23 ++++++++++-------------
> 1 file changed, 10 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/hwmon/pmbus/lm25066.c b/drivers/hwmon/pmbus/lm25066.c
> index 3616705aafde..4dc003ff859e 100644
> --- a/drivers/hwmon/pmbus/lm25066.c
> +++ b/drivers/hwmon/pmbus/lm25066.c
> @@ -234,8 +234,6 @@ struct lm25066_data {
>
> #define to_lm25066_data(x) container_of(x, struct lm25066_data, info)
>
> -static const struct i2c_device_id lm25066_id[];
> -
> static int lm25066_read_word_data(struct i2c_client *client, int page,
> int phase, int reg)
> {
> @@ -436,6 +434,16 @@ static int lm25066_write_word_data(struct i2c_client *client, int page, int reg,
> return ret;
> }
>
> +static const struct i2c_device_id lm25066_id[] = {
> + {"lm25056", lm25056},
> + {"lm25066", lm25066},
> + {"lm5064", lm5064},
> + {"lm5066", lm5066},
> + {"lm5066i", lm5066i},
> + { }
> +};
> +MODULE_DEVICE_TABLE(i2c, lm25066_id);
> +
> static int lm25066_probe(struct i2c_client *client)
> {
> int config;
> @@ -509,17 +517,6 @@ static int lm25066_probe(struct i2c_client *client)
> return pmbus_do_probe(client, info);
> }
>
> -static const struct i2c_device_id lm25066_id[] = {
> - {"lm25056", lm25056},
> - {"lm25066", lm25066},
> - {"lm5064", lm5064},
> - {"lm5066", lm5066},
> - {"lm5066i", lm5066i},
> - { }
> -};
> -
> -MODULE_DEVICE_TABLE(i2c, lm25066_id);
> -
> /* This is the driver that will be inserted */
> static struct i2c_driver lm25066_driver = {
> .driver = {
next prev parent reply other threads:[~2021-10-08 13:47 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-28 9:22 [PATCH 0/8] hwmon: (pmbus/lm25066) Configurable sense resistor, other cleanups Zev Weiss
2021-09-28 9:22 ` [PATCH 1/8] hwmon: (pmbus/lm25066) Add offset coefficients Zev Weiss
2021-10-08 13:37 ` Guenter Roeck
2021-09-28 9:22 ` [PATCH 2/8] hwmon: (pmbus/lm25066) Adjust lm25066 PSC_CURRENT_IN_L mantissa Zev Weiss
2021-10-08 13:46 ` Guenter Roeck
2021-09-28 9:22 ` [PATCH 3/8] hwmon: (pmbus/lm25066) Avoid forward declaration of lm25066_id Zev Weiss
2021-10-08 13:47 ` Guenter Roeck [this message]
2021-09-28 9:22 ` [PATCH 4/8] hwmon: (pmbus/lm25066) Let compiler determine outer dimension of lm25066_coeff Zev Weiss
2021-10-08 13:47 ` Guenter Roeck
2021-09-28 9:22 ` [PATCH 5/8] hwmon: (pmbus/lm25066) Mark lm25066_coeff array const Zev Weiss
2021-10-08 13:49 ` Guenter Roeck
2021-09-28 9:22 ` [PATCH 6/8] hwmon: (pmbus/lm25066) Add OF device ID table Zev Weiss
2021-10-08 13:52 ` Guenter Roeck
2021-10-08 13:59 ` Guenter Roeck
2021-09-28 9:22 ` [PATCH 7/8] hwmon: (pmbus/lm25066) Support configurable sense resistor values Zev Weiss
2021-10-08 14:03 ` Guenter Roeck
2021-09-28 9:22 ` [PATCH 8/8] dt-bindings: hwmon/pmbus: Add ti,lm25066 power-management IC Zev Weiss
2021-10-04 18:28 ` Rob Herring
2021-10-08 14:05 ` 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=20211008134705.GA1215575@roeck-us.net \
--to=linux@roeck-us.net \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zev@bewilderbeest.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