Skip to content

Commit

Permalink
V4L/DVB (11161): pvrusb2: Set i2c autoprobing to be off by default
Browse files Browse the repository at this point in the history
In order to keep a sub-device from promiscuously attaching to the
pvrusb2 driver, the i2c adapter's class must be cleared.  This change
clears that class by default.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mike Isely authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent 6063a44 commit 15b4744
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ static struct i2c_algorithm pvr2_i2c_algo_template = {

static struct i2c_adapter pvr2_i2c_adap_template = {
.owner = THIS_MODULE,
.class = I2C_CLASS_TV_ANALOG,
.class = 0,
.id = I2C_HW_B_BT848,
.client_register = pvr2_i2c_attach_inform,
.client_unregister = pvr2_i2c_detach_inform,
Expand Down Expand Up @@ -607,6 +607,7 @@ void pvr2_i2c_core_init(struct pvr2_hdw *hdw)
hdw->i2c_adap.dev.parent = &hdw->usb_dev->dev;
hdw->i2c_adap.algo = &hdw->i2c_algo;
hdw->i2c_adap.algo_data = hdw;
hdw->i2c_adap.class = I2C_CLASS_TV_ANALOG;
hdw->i2c_linked = !0;
i2c_set_adapdata(&hdw->i2c_adap, &hdw->v4l2_dev);
i2c_add_adapter(&hdw->i2c_adap);
Expand Down

0 comments on commit 15b4744

Please sign in to comment.