vpif_display.c bug

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

 



Hi Chaithrika,

This code in vpif_display.c is not correct:

        for (i = 0; i < subdev_count; i++) {
                vpif_obj.sd[i] = v4l2_i2c_new_probed_subdev(&vpif_obj.v4l2_dev,
                                                i2c_adap, subdevdata[i].name,
                                                subdevdata[i].name,
                                                &subdevdata[i].addr);
                if (!vpif_obj.sd[i]) {
                        vpif_err("Error registering v4l2 subdevice\n");
                        goto probe_subdev_out;
                }

                if (vpif_obj.sd[i])
                        vpif_obj.sd[i]->grp_id = 1 << i;
        }

This: '&subdevdata[i].addr' should be: I2C_ADDRS(subdevdata[i].addr).

The list of probe addresses must be terminated by I2C_CLIENT_END (= -1) and
that isn't the case here.

An alternative solution is to use v4l2_i2c_new_subdev, but then no probing
will take place. But I think that you don't want probing at all since this
address information comes from the platform data, so one can assume that
that data is correct.

Even better is to copy the implementation from vpfe_capture.c and to use
v4l2_i2c_new_subdev_board().

Regards,

	Hans

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG Telecom
--
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