Re: [PATCH] 2.5.45 : drivers/media/video/saa7111.c

Arnaldo Carvalho de Melo (acme@conectiva.com.br)
Thu, 31 Oct 2002 23:33:07 -0300


Em Thu, Oct 31, 2002 at 10:20:45PM -0500, Frank Davis escreveu:
> Hello all,
> This converts the saa7111 driver's i2c api from i2c-old --> i2c . This
> one was never converted (for some reason). Please review.
> Regards,
> Frank
>
> static struct i2c_driver i2c_driver_saa7111 = {
> "saa7111", /* name */
> - I2C_DRIVERID_VIDEODECODER, /* ID */
> - I2C_SAA7111, I2C_SAA7111 + 1,
> -
> - saa7111_attach,
> + I2C_DRIVERID_SAA7111, /* ID */
> + I2C_DF_NOTIFY,
> + saa7111_probe,
> saa7111_detach,
> saa7111_command
> };

Could you please use the named initializers in C99?

like

static struct i2c_driver i2c_driver_saa7111 = {
.name = "saa7111",
.id = I2C_DRIVERID_VIDEODECODER,
.
.
.

> +static struct i2c_client client_template = {
> + "saa7111_client",
> + -1,
> + 0,
> + 0,
> + NULL,
> + &i2c_driver_saa7111
> +};

ditto, and in this one you can kill all the 0 and the NULL, as it will
be initialized to null if you omit its initializations.

- Arnaldo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/