All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH v2 21/24] video: da8xx-fb: setup struct lcd_ctrl_config for dt
Date: Wed, 31 Jul 2013 09:33:03 +0000	[thread overview]
Message-ID: <51F8D9CF.8020004@ti.com> (raw)
In-Reply-To: <1375208791-15781-22-git-send-email-detheridge@ti.com>

[-- Attachment #1: Type: text/plain, Size: 1615 bytes --]

On 30/07/13 21:26, Darren Etheridge wrote:
> From: Afzal Mohammed <afzal@ti.com>
> 
> strcut lcd_ctrl_config information required for driver is currently
> obtained via platform data. To handle DT probing, create
> lcd_ctrl_config and populate it with default values, these values are
> sufficient for the panels so far used with this controller to work.
> 
> Signed-off-by: Afzal Mohammed <afzal@ti.com>
> Signed-off-by: Darren Etheridge <detheridge@ti.com>
> ---
>  drivers/video/da8xx-fb.c |   34 +++++++++++++++++++++++++++++++++-
>  1 files changed, 33 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
> index 697b07c..fe3d79e 100644
> --- a/drivers/video/da8xx-fb.c
> +++ b/drivers/video/da8xx-fb.c

<snip>

>  static struct fb_videomode *da8xx_fb_get_videomode(struct platform_device *dev)
>  {
>  	struct da8xx_lcdc_platform_data *fb_pdata = dev->dev.platform_data;
> @@ -1346,7 +1375,10 @@ static int fb_probe(struct platform_device *device)
>  		break;
>  	}
>  
> -	lcd_cfg = (struct lcd_ctrl_config *)fb_pdata->controller_data;

In the previous patch you allow fb_pdata==NULL if booting with DT.
However, this patch shows that fb_pdata is still accessed. So I think
you need to move the previous patch after this to avoid a crash between
this and the previous patch.

> +	if (device->dev.of_node)
> +		lcd_cfg = da8xx_fb_create_cfg(device);
> +	else
> +		lcd_cfg = (struct lcd_ctrl_config *)fb_pdata->controller_data;

fb_pdata->controller_data is void *, so you don't need to cast it
explicitly.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

      reply	other threads:[~2013-07-31  9:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-30 18:26 [PATCH v2 21/24] video: da8xx-fb: setup struct lcd_ctrl_config for dt Darren Etheridge
2013-07-31  9:33 ` Tomi Valkeinen [this message]

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=51F8D9CF.8020004@ti.com \
    --to=tomi.valkeinen@ti.com \
    --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.