lkml.org 
[lkml]   [2002]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 2.5.45 : drivers/media/video/saa7111.c
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/

\
 
 \ /
  Last update: 2005-03-22 13:30    [W:0.032 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site