linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
To: Sachin Kamat <sachin.kamat@linaro.org>
Cc: linux-media@vger.kernel.org, k.debski@samsung.com,
	s.nawrocki@samsung.com, patches@linaro.org,
	linux-samsung-soc <linux-samsung-soc@vger.kernel.org>
Subject: Re: [PATCH 3/3] [media] s5p-mfc: Use of_match_ptr and CONFIG_OF
Date: Sun, 06 Jan 2013 15:48:05 +0100	[thread overview]
Message-ID: <50E98EA5.6050806@gmail.com> (raw)
In-Reply-To: <1356689908-6866-3-git-send-email-sachin.kamat@linaro.org>

Hi Sachin,

On 12/28/2012 11:18 AM, Sachin Kamat wrote:
> This builds the code only if DT is enabled.

Since the driver this patch touches is for platforms that in (not distant)
future will be DT only I don't really see an advantage of applying it,
only to need to revert it after few kernel releases.

I realize this exynos_mfc_match[] array's size is ~400 B, but still I'd
prefer to avoid such #ifdefs.

> Signed-off-by: Sachin Kamat<sachin.kamat@linaro.org>
> ---
>   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 struct of_device_id[] = {
>   	{
>   		.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),
>   	},
>   };
>

Thanks,
Sylwester

  reply	other threads:[~2013-01-06 14:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-28 10:18 [PATCH 1/3] [media] s5p-mfc: use mfc_err instead of printk Sachin Kamat
2012-12-28 10:18 ` [PATCH 2/3] [media] s5p-mfc: Remove redundant 'break' Sachin Kamat
2013-01-02 18:29   ` Kamil Debski
2013-01-03  2:53     ` Sachin Kamat
2012-12-28 10:18 ` [PATCH 3/3] [media] s5p-mfc: Use of_match_ptr and CONFIG_OF Sachin Kamat
2013-01-06 14:48   ` Sylwester Nawrocki [this message]
2013-01-02 18:30 ` [PATCH 1/3] [media] s5p-mfc: use mfc_err instead of printk Kamil Debski
     [not found]   ` <CAK9yfHzbMKvo-WYED9hPdzCccjvKcXgtq=SqOLPEGuaGhMwqCw@mail.gmail.com>
2013-01-07 10:02     ` Sylwester Nawrocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50E98EA5.6050806@gmail.com \
    --to=sylvester.nawrocki@gmail.com \
    --cc=k.debski@samsung.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=s.nawrocki@samsung.com \
    --cc=sachin.kamat@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).