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: 13732 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9B8C823E1F for ; Fri, 28 Dec 2012 10:26:28 +0000 (UTC) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by fiordland.canonical.com (Postfix) with ESMTP id 5534BA18772 for ; Fri, 28 Dec 2012 10:26:28 +0000 (UTC) Received: by mail-vc0-f172.google.com with SMTP id fw7so10665409vcb.31 for ; Fri, 28 Dec 2012 02:26:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=EXZmHBncbgwM7EpC/eaEHrkUEm6lDVI/OYTsTQQ1jcI=; b=oiLcyd7R/UWtSANFWFwml0E72J253m6I9Dlp2NaStZn49exeI17vrDEhwVWGfqbZZA o9cv5vrXOkZ4tdvp+JGlCvqYWaZAJbYsfpIH6ml8bmR9lvjDdLJAd1A6XnZ6DCFjhutk vUL7DFcEBp8WX0XJaMRhIqLTDMYDpAGshkLtN1x6V+pi0fjKfJu2sbjQgtY6jRuhpIXB biKpRczoOAfYK1c7i5MHWOoBJpy2Qd2oa6Fx4jvMPB0K8yiOAZpyMblEN0oEG+XLEQIP Oj1KrERb1r1wbLdbbuzqndpw7mR75bPQLuTvIfQCzjT/qYQOnLyenyhQ8nwMEuSSIXB4 iiWA== X-Received: by 10.58.247.132 with SMTP id ye4mr52642902vec.9.1356690387819; Fri, 28 Dec 2012 02:26:27 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.214.195 with SMTP id oc3csp53574vec; Fri, 28 Dec 2012 02:26:27 -0800 (PST) X-Received: by 10.66.83.165 with SMTP id r5mr98387952pay.3.1356690386961; Fri, 28 Dec 2012 02:26:26 -0800 (PST) Received: from mail-pb0-f46.google.com (mail-pb0-f46.google.com [209.85.160.46]) by mx.google.com with ESMTPS id l2si32097142pav.184.2012.12.28.02.26.26 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 28 Dec 2012 02:26:26 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.46 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.46; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.46 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pb0-f46.google.com with SMTP id wy7so5828898pbc.5 for ; Fri, 28 Dec 2012 02:26:26 -0800 (PST) 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: ALoCoQnYB3iXmBHMG1UcoomkNz0kYGPyblSxB/aeWFqhIeTlxUGto3RTyLrW0ZnTIbbhaaEkIsQP 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), }, };