Re: [PATCH v2 2/2] power: supply: add LT8491 battery charger driver
From: Uwe Kleine-König
Date: Mon Sep 07 2026 - 04:42:02 EST
Hello,
On Thu, Sep 03, 2026 at 06:46:37PM +0800, John Erasmus Mari Geronimo wrote:
> +#include <linux/i2c.h>
> +#include <linux/mod_devicetable.h>
Please don't use <linux/mod_devicetable.h>. You can rely on
<linux/i2c.h> to provide i2c_device_id and of_device_id. Alternatively
include <linux/device-id/i2c.h> and <linux/device-id/of.h>.
> +static const struct i2c_device_id lt8491_id[] = {
> + { "lt8491", 0 },
> + { }
> +};
Please make this:
static const struct i2c_device_id lt8491_id[] = {
{ .name = "lt8491" },
{ }
};
(i.e. use a named initializer and don't explicitly initialize the unused
driver_data member.)
Best regards
Uwe
Attachment:
signature.asc
Description: PGP signature