aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/media/i2c/ov7670.c
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2018-01-09 05:20:34 -0500
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-01-23 08:12:01 -0500
commit3580112b6d6f51725ba605c146db14af61e87628 (patch)
tree8b1aa45e1330526e66e5e047af75a4758c715f6f /drivers/media/i2c/ov7670.c
parentmedia: ov5640: fix spurious streamon failures (diff)
downloadwireguard-linux-3580112b6d6f51725ba605c146db14af61e87628.tar.xz
wireguard-linux-3580112b6d6f51725ba605c146db14af61e87628.zip
media: entity: Add a nop variant of media_entity_cleanup
Add nop variant of media_entity_cleanup. This allows calling media_entity_cleanup whether or not Media controller is enabled, simplifying driver code. Also drop #ifdefs on a few drivers around media_entity_cleanup(). Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/i2c/ov7670.c')
-rw-r--r--drivers/media/i2c/ov7670.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c
index fd229bc8a0e5..28571de1c2f6 100644
--- a/drivers/media/i2c/ov7670.c
+++ b/drivers/media/i2c/ov7670.c
@@ -1846,9 +1846,7 @@ static int ov7670_probe(struct i2c_client *client,
return 0;
entity_cleanup:
-#if defined(CONFIG_MEDIA_CONTROLLER)
media_entity_cleanup(&info->sd.entity);
-#endif
hdl_free:
v4l2_ctrl_handler_free(&info->hdl);
power_off:
@@ -1867,9 +1865,7 @@ static int ov7670_remove(struct i2c_client *client)
v4l2_async_unregister_subdev(sd);
v4l2_ctrl_handler_free(&info->hdl);
clk_disable_unprepare(info->clk);
-#if defined(CONFIG_MEDIA_CONTROLLER)
media_entity_cleanup(&info->sd.entity);
-#endif
ov7670_s_power(sd, 0);
return 0;
}