From: Hans Verkuil Date: Sat, 7 Feb 2009 10:45:08 +0000 (-0300) Subject: V4L/DVB (10498): saa7146: the adapter class will be NULL when v4l2_subdev is used. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d30e21ddcdc948ecedfb46a0ed021d57f310a6f3;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git V4L/DVB (10498): saa7146: the adapter class will be NULL when v4l2_subdev is used. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/common/saa7146_i2c.c b/drivers/media/common/saa7146_i2c.c index 1b64074a92da..76229f992275 100644 --- a/drivers/media/common/saa7146_i2c.c +++ b/drivers/media/common/saa7146_i2c.c @@ -418,8 +418,7 @@ int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c dev->i2c_bitrate = bitrate; saa7146_i2c_reset(dev); - if( NULL != i2c_adapter ) { - BUG_ON(!i2c_adapter->class); + if (i2c_adapter) { i2c_set_adapdata(i2c_adapter, &dev->v4l2_dev); i2c_adapter->dev.parent = &dev->pci->dev; i2c_adapter->algo = &saa7146_algo;