Re: [PATCHv15 6/8] FM TX: si4713: Add files to handle si4713 i2c device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

On Sat, 2009-08-08 at 13:10 +0200, Valentin Eduardo (Nokia-D/Helsinki)
wrote:

...

> +/*
> + * I2C driver interface
> + */
> +/* si4713_probe - probe for the device */
> +static int si4713_probe(struct i2c_client *client,
> +                                       const struct i2c_device_id *id)
> +{
> +       struct si4713_device *sdev;
> +       int rval;
> +
> +       sdev = kzalloc(sizeof *sdev, GFP_KERNEL);
> +       if (!sdev) {
> +               dev_err(&client->dev, "Failed to alloc video device.\n");
> +               rval = -ENOMEM;
> +               goto exit;
> +       }
> +
> +       sdev->platform_data = client->dev.platform_data;
> +       if (!sdev->platform_data) {
> +               v4l2_err(&sdev->sd, "No platform data registered.\n");
                           ^^^^^^^^^
It looks like sdev-sd is still uninitialized here... 

> +               rval = -ENODEV;
> +               goto free_sdev;
> +       }
> +
> +       v4l2_i2c_subdev_init(&sdev->sd, client, &si4713_subdev_ops);
                               ^^^^^^^^^^
> +

B.R.
Matti





--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux