Re: [PATCH 6.1.y-cip 07/13] rtc: isl1208: Make similar I2C and DT-based matching table

Pavel Machek
2023-08-17T13:23:49Z

[-- Attachment #1: Type: text/plain, Size: 1177 bytes --]

Hi!

> > > +++ b/drivers/rtc/rtc-isl1208.c
> > > @@ -90,10 +90,10 @@ static const struct isl1208_config { };
> > >
> > > static const struct i2c_device_id isl1208_id[] = {
> > > - { "isl1208", TYPE_ISL1208 },
> > > - { "isl1209", TYPE_ISL1209 },
> > > - { "isl1218", TYPE_ISL1218 },
> > > - { "isl1219", TYPE_ISL1219 },
> > > + { "isl1208", .driver_data =
> > (kernel_ulong_t)&isl1208_configs[TYPE_ISL1208] },
> > > + { "isl1209", .driver_data =
> > (kernel_ulong_t)&isl1208_configs[TYPE_ISL1209] },
> > > + { "isl1218", .driver_data =
> > (kernel_ulong_t)&isl1208_configs[TYPE_ISL1218] },
> > > + { "isl1219", .driver_data =
> > > +(kernel_ulong_t)&isl1208_configs[TYPE_ISL1219] },
> >
> > I'd expect to see "(unsigned long)" here.
>
> Because driver_data is kernel_ulong_t. See below
>
> struct i2c_device_id {
> char name[I2C_NAME_SIZE];
> kernel_ulong_t driver_data; /* Data private to the driver */
> };

Aha, ok, that's quite unusual. Sorry for the noise.

Best regards,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]