All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 3/6] FBDEV: JZ4740: Initialize framebuffer properly
Date: Tue, 01 Mar 2011 13:58:59 +0000	[thread overview]
Message-ID: <4D6CFBF6.7030101@metafoo.de> (raw)
In-Reply-To: <1d49e2b9aa2fa143c14a9782fd4e67cb50610ca8.1298980528.git.mcuelenaere@gmail.com>

On 03/01/2011 01:06 PM, Maurus Cuelenaere wrote:
> Use the jzfb_enable() function instead of manually faking it in jzfb_probe().
> Also add the reverse operation when the framebuffer couldn't be registered.
> 
> Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
> ---
>  drivers/video/jz4740_fb.c |    8 +++-----
>  1 files changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/video/jz4740_fb.c b/drivers/video/jz4740_fb.c
> index cea7b7e..2f3ea57 100644
> --- a/drivers/video/jz4740_fb.c
> +++ b/drivers/video/jz4740_fb.c
> @@ -707,16 +707,13 @@ static int __devinit jzfb_probe(struct platform_device *pdev)
>  
>  	fb_alloc_cmap(&fb->cmap, 256, 0);
>  
> -	clk_enable(jzfb->ldclk);
> -	jzfb->is_enabled = 1;
> -
> -	writel(jzfb->framedesc->next, jzfb->base + JZ_REG_LCD_DA0);
> -
>  	fb->mode = NULL;
>  	jzfb_set_par(fb);
>  
>  	jzfb_pins_operation(jzfb, REQUEST_PINS);
>  
> +	jzfb_blank(FB_BLANK_UNBLANK, fb);
> +

I'd prefer:
jzfb_enable(jzfb);
jzfb->is_enabled = 1;

since there is no need for locking here.

>  	ret = register_framebuffer(fb);
>  	if (ret) {
>  		dev_err(&pdev->dev, "Failed to register framebuffer: %d\n", ret);
> @@ -726,6 +723,7 @@ static int __devinit jzfb_probe(struct platform_device *pdev)
>  	return 0;
>  
>  err_free_devmem:
> +	jzfb_blank(FB_BLANK_POWERDOWN, fb);
>  	jzfb_pins_operation(jzfb, FREE_PINS);
>  
>  	fb_dealloc_cmap(&fb->cmap);


  reply	other threads:[~2011-03-01 13:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-01 12:06 [PATCH 3/6] FBDEV: JZ4740: Initialize framebuffer properly Maurus Cuelenaere
2011-03-01 13:58 ` Lars-Peter Clausen [this message]
2011-03-01 17:21 ` Maurus Cuelenaere

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=4D6CFBF6.7030101@metafoo.de \
    --to=lars@metafoo.de \
    --cc=linux-fbdev@vger.kernel.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.