From patchwork Wed Aug 17 10:34:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepthy Ravi X-Patchwork-Id: 1073482 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7HAZ3o4011764 for ; Wed, 17 Aug 2011 10:35:03 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752874Ab1HQKet (ORCPT ); Wed, 17 Aug 2011 06:34:49 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:59438 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752749Ab1HQKes (ORCPT ); Wed, 17 Aug 2011 06:34:48 -0400 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id p7HAYd19024814 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 17 Aug 2011 05:34:41 -0500 Received: from dbde71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id p7HAYc5W008555; Wed, 17 Aug 2011 16:04:38 +0530 (IST) Received: from dbdp31.itg.ti.com (172.24.170.98) by DBDE71.ent.ti.com (172.24.170.149) with Microsoft SMTP Server id 8.3.106.1; Wed, 17 Aug 2011 16:04:38 +0530 Received: from localhost.localdomain (dbdp20.itg.ti.com [172.24.170.38]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id p7HAYat9003171; Wed, 17 Aug 2011 16:04:37 +0530 (IST) From: Deepthy Ravi To: , , CC: , Vaibhav Hiremath , Deepthy Ravi Subject: [PATCH] Media controller: Define media_entity_init() and media_entity_cleanup() conditionally Date: Wed, 17 Aug 2011 16:04:36 +0530 Message-ID: <1313577276-18182-1-git-send-email-deepthy.ravi@ti.com> X-Mailer: git-send-email 1.6.2.4 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 17 Aug 2011 10:35:03 +0000 (UTC) From: Vaibhav Hiremath Defines the two functions only when CONFIG_MEDIA_CONTROLLER is enabled. Signed-off-by: Vaibhav Hiremath Signed-off-by: Deepthy Ravi --- include/media/media-entity.h | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/include/media/media-entity.h b/include/media/media-entity.h index cd8bca6..c90916e 100644 --- a/include/media/media-entity.h +++ b/include/media/media-entity.h @@ -121,9 +121,18 @@ struct media_entity_graph { int top; }; +#ifdef CONFIG_MEDIA_CONTROLLER int media_entity_init(struct media_entity *entity, u16 num_pads, struct media_pad *pads, u16 extra_links); void media_entity_cleanup(struct media_entity *entity); +#else +static inline int media_entity_init(struct media_entity *entity, u16 num_pads, + struct media_pad *pads, u16 extra_links) +{ + return 0; +} +static inline void media_entity_cleanup(struct media_entity *entity) {} +#endif int media_entity_create_link(struct media_entity *source, u16 source_pad, struct media_entity *sink, u16 sink_pad, u32 flags);