From patchwork Fri Dec 28 10:18:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 1914761 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 0A690DF25A for ; Fri, 28 Dec 2012 10:26:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752987Ab2L1K01 (ORCPT ); Fri, 28 Dec 2012 05:26:27 -0500 Received: from mail-da0-f52.google.com ([209.85.210.52]:52922 "EHLO mail-da0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752915Ab2L1K01 (ORCPT ); Fri, 28 Dec 2012 05:26:27 -0500 Received: by mail-da0-f52.google.com with SMTP id f10so4726916dak.25 for ; Fri, 28 Dec 2012 02:26:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=EXZmHBncbgwM7EpC/eaEHrkUEm6lDVI/OYTsTQQ1jcI=; b=GkRwidtlGw/kYG7800gG6QMAWl45XtIn6dGYw51OG/4Ud/cfYhryQZW47BZ2SPlra/ 6BZfGTbGUmo2ogdMrtO1+W6nKSgl7rtdLbAG4UWtl9OH7sSmfD1ewGd7PQQ+d3eGyZ7l FsX308fmORH0ob989PYgVo0NKakD1RL848DRDXVxnDY4oqyFCY9Jx8JPZ53IGCTIxoAR OHmvpHHST9hJWqxnF3X5gRWbJVEDqS5pcXqj8nJUHuQFW85qwYPKOUOM9RcBe+igUJSj EocV4bVUP33/mkLN7tT0JqnlqKZq6XRY1cQ37YrWsNOOE5kaBglMDW1WFjYKwNBhgZLG qC1Q== X-Received: by 10.68.219.67 with SMTP id pm3mr104024635pbc.150.1356690386596; Fri, 28 Dec 2012 02:26:26 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id is3sm19485354pbc.6.2012.12.28.02.26.23 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 28 Dec 2012 02:26:26 -0800 (PST) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: k.debski@samsung.com, s.nawrocki@samsung.com, sylvester.nawrocki@gmail.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 3/3] [media] s5p-mfc: Use of_match_ptr and CONFIG_OF Date: Fri, 28 Dec 2012 15:48:28 +0530 Message-Id: <1356689908-6866-3-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1356689908-6866-1-git-send-email-sachin.kamat@linaro.org> References: <1356689908-6866-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQnwijI1wdBzjNsOpm7f3fZxZ/ZSFA/xqwTkCdJgoY5JuyauT8j1iE7MRAjahSfK7dZUyAR3 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This builds the code only if DT is enabled. Signed-off-by: Sachin Kamat --- drivers/media/platform/s5p-mfc/s5p_mfc.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index 3930177..65ed603 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -1405,6 +1405,7 @@ static struct platform_device_id mfc_driver_ids[] = { }; MODULE_DEVICE_TABLE(platform, mfc_driver_ids); +#ifdef CONFIG_OF static const struct of_device_id exynos_mfc_match[] = { { .compatible = "samsung,mfc-v5", @@ -1416,6 +1417,7 @@ static const struct of_device_id exynos_mfc_match[] = { {}, }; MODULE_DEVICE_TABLE(of, exynos_mfc_match); +#endif static void *mfc_get_drv_data(struct platform_device *pdev) { @@ -1442,7 +1444,7 @@ static struct platform_driver s5p_mfc_driver = { .name = S5P_MFC_NAME, .owner = THIS_MODULE, .pm = &s5p_mfc_pm_ops, - .of_match_table = exynos_mfc_match, + .of_match_table = of_match_ptr(exynos_mfc_match), }, };