[media] smiapp: Set sub-device owner
authorSakari Ailus <sakari.ailus@linux.intel.com>
Fri, 28 Mar 2014 14:35:12 +0000 (11:35 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 3 Sep 2014 11:50:25 +0000 (08:50 -0300)
The smiapp driver is the owner of the sub-devices exposed by the smiapp
driver. This prevents unloading the module whilst it's in use.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/i2c/smiapp/smiapp-core.c

index 632bd9efdc97de54f13cf3a64c824577cfd43b77..62acb10630f9b2a1b12c114eddad10995308389e 100644 (file)
@@ -2565,7 +2565,7 @@ static int smiapp_registered(struct v4l2_subdev *subdev)
 
                this->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
                this->sd.internal_ops = &smiapp_internal_ops;
-               this->sd.owner = NULL;
+               this->sd.owner = THIS_MODULE;
                v4l2_set_subdevdata(&this->sd, client);
 
                rval = media_entity_init(&this->sd.entity,