Re: [PATCH] 2.5.59: drivers/media/video/bt819.c

Christoph Hellwig (hch@infradead.org)
Wed, 5 Feb 2003 00:23:19 +0000


On Tue, Feb 04, 2003 at 07:18:44PM -0500, Frank Davis wrote:
> +
> +I2C_CLIENT_INSMOD;

Please don't use these magic macros, they will go away soon.
Use Rusty's new unified parameter support instead.

> static struct i2c_driver i2c_driver_bt819 = {
> - "bt819", /* name */
> - I2C_DRIVERID_BT819, /* ID */
> - I2C_DF_NOTIFY,
> - bt819_probe,
> - bt819_detach,
> - bt819_command
> + .name = "bt819", /* name */
> + .id = I2C_DRIVERID_BT819, /* ID */
> + .flags = I2C_DF_NOTIFY,
> + .attach_adapter = bt819_probe,
> + .detach_client = bt819_detach,
> + .command = bt819_command

This is missing a .owner and the indentation looks strange. It
should be something like:

static struct i2c_driver i2c_driver_bt819 = {
.owner = THIS_MODULE,
.name = "bt819",
.id = I2C_DRIVERID_BT819,
.flags = I2C_DF_NOTIFY,
.attach_adapter = bt819_probe,
.detach_client = bt819_detach,
.command = bt819_command,
};

-
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/