linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: p.zabel@pengutronix.de (Philipp Zabel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] media: coda: Add driver for Coda video codec.
Date: Mon, 09 Jul 2012 10:29:53 +0200	[thread overview]
Message-ID: <1341822593.2489.26.camel@pizza.hi.pengutronix.de> (raw)
In-Reply-To: <CACKLOr0UrZ2bi01L+xub7ARwfnoN7kriGpwWfwWzx-MYgS-H8w@mail.gmail.com>

Am Montag, den 09.07.2012, 10:14 +0200 schrieb javier Martin:
[...]
> >> +enum coda_platform {
> >> +     CODA_INVALID = 0,
> >
> > I don't think CODA_INVALID is useful.
> 
> It is, otherwise the following will fail since CODA_IMX27 is 0:
> 
> 	if (of_id)
> 		dev->devtype = of_id->data;
> 	else if (pdev_id && pdev_id->driver_data)  <-----
> pdev_id->driver_data = CODA_IMX27 = 0
> 		dev->devtype = &coda_devdata[pdev_id->driver_data];
> 	else
> 		return -EINVAL;

Oh, right. I think it should be ok to just remove the
pdev_id->driver_data check.
Since it's all in the same source file, it's unlikely that somebody adds
a platform_device_id to coda_platform_ids array but forgets to set
the .driver_data field.

regards
Philipp

  reply	other threads:[~2012-07-09  8:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-06 12:57 [PATCH 0/3] Add support for 'Coda' video codec IP Javier Martin
2012-07-06 12:57 ` [PATCH 1/3] i.MX: coda: Add platform support for coda in i.MX27 Javier Martin
2012-07-06 12:57 ` [PATCH 2/3] media: coda: Add driver for Coda video codec Javier Martin
2012-07-06 17:48   ` Russell King - ARM Linux
2012-07-09  6:45   ` Philipp Zabel
2012-07-09  8:07     ` javier Martin
2012-07-09  8:19       ` Philipp Zabel
2012-07-09  8:21         ` javier Martin
2012-07-09  8:14     ` javier Martin
2012-07-09  8:29       ` Philipp Zabel [this message]
2012-07-06 12:57 ` [PATCH 3/3] Visstrim M10: Add support for Coda Javier Martin
2012-07-06 17:47   ` Russell King - ARM Linux

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=1341822593.2489.26.camel@pizza.hi.pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.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).