summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2013-04-18 14:34:05 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-04-25 09:33:58 -0300
commita5ad1dbe226324f2d1ee51cf3337d0d855faa076 (patch)
treea6d1abec47ca5f37afd6a9095deb463570cddada /drivers/media
parent0c2224ee0e480001eab6fd31e7d12b6d80745926 (diff)
[media] s5c73m3: Add missing subdev .unregistered callback
This is needed to free any resources requested in the .registered subdev op. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/i2c/s5c73m3/s5c73m3-core.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/i2c/s5c73m3/s5c73m3-core.c b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
index ce8fcf22253a..cb52438e53ac 100644
--- a/drivers/media/i2c/s5c73m3/s5c73m3-core.c
+++ b/drivers/media/i2c/s5c73m3/s5c73m3-core.c
@@ -1457,6 +1457,12 @@ static int s5c73m3_oif_registered(struct v4l2_subdev *sd)
return ret;
}
+static void s5c73m3_oif_unregistered(struct v4l2_subdev *sd)
+{
+ struct s5c73m3 *state = oif_sd_to_s5c73m3(sd);
+ v4l2_device_unregister_subdev(&state->sensor_sd);
+}
+
static const struct v4l2_subdev_internal_ops s5c73m3_internal_ops = {
.open = s5c73m3_open,
};
@@ -1474,6 +1480,7 @@ static const struct v4l2_subdev_ops s5c73m3_subdev_ops = {
static const struct v4l2_subdev_internal_ops oif_internal_ops = {
.registered = s5c73m3_oif_registered,
+ .unregistered = s5c73m3_oif_unregistered,
.open = s5c73m3_oif_open,
};