OSDN Git Service

media: tda1997x: Use bitwise or for setting subdev flags
authorSakari Ailus <sakari.ailus@linux.intel.com>
Thu, 12 Apr 2018 12:27:50 +0000 (08:27 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 23 Apr 2018 17:58:56 +0000 (13:58 -0400)
Assigning subdev flags in probe() after v4l2_i2c_subdev_init() clears the
I2C flag set by that function. Fix this by using bitwise or instead.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/i2c/tda1997x.c

index 3021913..1c5b5f7 100644 (file)
@@ -2567,7 +2567,7 @@ static int tda1997x_probe(struct i2c_client *client,
        snprintf(sd->name, sizeof(sd->name), "%s %d-%04x",
                 id->name, i2c_adapter_id(client->adapter),
                 client->addr);
-       sd->flags = V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
+       sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
        sd->entity.function = MEDIA_ENT_F_DTV_DECODER;
        sd->entity.ops = &tda1997x_media_ops;