From 3580112b6d6f51725ba605c146db14af61e87628 Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Tue, 9 Jan 2018 05:20:34 -0500 Subject: 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 Reviewed-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/ov7670.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'drivers/media/i2c/ov7670.c') 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; } -- cgit v1.2.3