All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
To: Vikas Sajjan <vikas.sajjan@linaro.org>
Cc: linux-samsung-soc@vger.kernel.org, kgene.kim@samsung.com,
	sachin.kamat@linaro.org, t.figa@samsung.com,
	devicetree-discuss@lists.ozlabs.org, inki.dae@samsung.com,
	jy0922.shim@samsung.com, sunil joshi <joshi@samsung.com>
Subject: Re: [PATCH v6 5/5] ARM: dts: Add FIMD DT binding Documentation
Date: Wed, 06 Mar 2013 22:13:39 +0100	[thread overview]
Message-ID: <5137B183.6040201@gmail.com> (raw)
In-Reply-To: <CAD025yQA+yAPzATDvE-4HQP+HVbmDQkg+XVKd=VUepL+dM9s9Q@mail.gmail.com>

On 03/06/2013 11:18 AM, Vikas Sajjan wrote:
> Good idea, but i am just wondering is it a good idea to modify the
> fimd driver ?

I think it is. But it depends what code quality you aim for.

Is there any issue in making a change as below ? ;)

Of course it's all up to you, I've just suggested what I thought was
an improvement to the current situation.

diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index 51afedd..4180247 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -160,9 +160,9 @@ struct platform_device samsung_asoc_idma = {
  #ifdef CONFIG_S3C_DEV_FB
  static struct resource s3c_fb_resource[] = {
         [0] = DEFINE_RES_MEM(S3C_PA_FB, SZ_16K),
-       [1] = DEFINE_RES_IRQ(IRQ_LCD_VSYNC),
-       [2] = DEFINE_RES_IRQ(IRQ_LCD_FIFO),
-       [3] = DEFINE_RES_IRQ(IRQ_LCD_SYSTEM),
+       [1] = DEFINE_RES_IRQ_NAMED(IRQ_LCD_VSYNC, "vsync"),
+       [2] = DEFINE_RES_IRQ_NAMED(IRQ_LCD_FIFO, "fifo"),
+       [3] = DEFINE_RES_IRQ_NAMED(IRQ_LCD_SYSTEM, "system"),
  };

  struct platform_device s3c_device_fb = {
@@ -305,9 +305,9 @@ struct platform_device s5p_device_jpeg = {
  #ifdef CONFIG_S5P_DEV_FIMD0
  static struct resource s5p_fimd0_resource[] = {
         [0] = DEFINE_RES_MEM(S5P_PA_FIMD0, SZ_32K),
-       [1] = DEFINE_RES_IRQ(IRQ_FIMD0_VSYNC),
-       [2] = DEFINE_RES_IRQ(IRQ_FIMD0_FIFO),
-       [3] = DEFINE_RES_IRQ(IRQ_FIMD0_SYSTEM),
+       [1] = DEFINE_RES_IRQ_NAMED(IRQ_FIMD0_VSYNC, "vsync"),
+       [2] = DEFINE_RES_IRQ(IRQ_FIMD0_FIFO, "fifo"),
+       [3] = DEFINE_RES_IRQ(IRQ_FIMD0_SYSTEM, "system"),
  };

  struct platform_device s5p_device_fimd0 = {
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c 
b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 36493ce..5efb4c7 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -917,7 +917,7 @@ static int fimd_probe(struct platform_device *pdev)
         if (IS_ERR(ctx->regs))
                 return PTR_ERR(ctx->regs);

-       res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
+       res = platform_get_resource_byname(pdev, IORESOURCE_IRQ, "vsync");
         if (!res) {
                 dev_err(dev, "irq request failed.\n");
                 return -ENXIO;
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index 968a625..43af0108 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -1427,7 +1427,7 @@ static int s3c_fb_probe(struct platform_device *pdev)
                 goto err_lcd_clk;
         }

-       res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
+       res = platform_get_resource_byname(pdev, IORESOURCE_IRQ, "vsync");
         if (!res) {
                 dev_err(dev, "failed to acquire irq resource\n");
                 ret = -ENOENT;

  reply	other threads:[~2013-03-06 21:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-28  9:42 [PATCH v6 0/5] Add DRM FIMD DT support for Exynos4 DT Machines Vikas Sajjan
2013-02-28  9:42 ` [PATCH v6 1/5] ARM: dts: Add FIMD node to exynos4 Vikas Sajjan
2013-02-28  9:42 ` [PATCH v6 2/5] ARM: dts: Add lcd pinctrl node entries for EXYNOS4412 SoC Vikas Sajjan
2013-02-28  9:42 ` [PATCH v6 3/5] ARM: dts: Add FIMD node and display timing node to exynos4412-origen.dts Vikas Sajjan
2013-02-28  9:42 ` [PATCH v6 4/5] ARM: dts: Add FIMD AUXDATA node entry for exynos4 DT Vikas Sajjan
2013-02-28  9:42 ` [PATCH v6 5/5] ARM: dts: Add FIMD DT binding Documentation Vikas Sajjan
2013-03-03 19:11   ` Sylwester Nawrocki
2013-03-03 20:03     ` Sylwester Nawrocki
2013-03-06 10:18     ` Vikas Sajjan
2013-03-06 21:13       ` Sylwester Nawrocki [this message]
2013-03-06 21:20         ` Sylwester Nawrocki
2013-03-06 23:56           ` Kukjin Kim
2013-03-07  6:50         ` Vikas Sajjan

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=5137B183.6040201@gmail.com \
    --to=sylvester.nawrocki@gmail.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=inki.dae@samsung.com \
    --cc=joshi@samsung.com \
    --cc=jy0922.shim@samsung.com \
    --cc=kgene.kim@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=sachin.kamat@linaro.org \
    --cc=t.figa@samsung.com \
    --cc=vikas.sajjan@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.