From: Jarod Wilson <jarod@redhat.com>
To: Nicolas Kaiser <nikai@nikai.net>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers/media: nuvoton: fix chip id probe
Date: Fri, 19 Nov 2010 14:16:44 -0500 [thread overview]
Message-ID: <20101119191644.GF5022@redhat.com> (raw)
In-Reply-To: <20101117113525.1ded029c@absol.kitzblitz>
On Wed, Nov 17, 2010 at 11:35:25AM +0100, Nicolas Kaiser wrote:
> Make sure we have a matching chip id high and one or the other
> of the chip id low values.
> Print the values if the probe fails.
>
> Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
> ---
> Like this?
> Supersedes patch "drivers/media: nuvoton: always true expression".
>
> drivers/media/IR/nuvoton-cir.c | 7 +++++--
> 1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/IR/nuvoton-cir.c b/drivers/media/IR/nuvoton-cir.c
> index 301be53..92d32c8 100644
> --- a/drivers/media/IR/nuvoton-cir.c
> +++ b/drivers/media/IR/nuvoton-cir.c
> @@ -249,9 +249,12 @@ static int nvt_hw_detect(struct nvt_dev *nvt)
> chip_minor = nvt_cr_read(nvt, CR_CHIP_ID_LO);
> nvt_dbg("%s: chip id: 0x%02x 0x%02x", chip_id, chip_major, chip_minor);
>
> - if (chip_major != CHIP_ID_HIGH &&
> - (chip_minor != CHIP_ID_LOW || chip_minor != CHIP_ID_LOW2))
> + if (chip_major != CHIP_ID_HIGH ||
> + (chip_minor != CHIP_ID_LOW && chip_minor != CHIP_ID_LOW2)) {
> + nvt_pr(KERN_ERR, "%s: chip id mismatch: 0x%02x 0x%02x",
I'd probably go with "unsupported chip, id: " instead, since it makes the
message a bit clearer, but generally speaking, yeah, something along
those lines should be fine.
--
Jarod Wilson
jarod@redhat.com
next prev parent reply other threads:[~2010-11-19 19:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-16 20:19 [PATCH] drivers/media: nuvoton: always true expression Nicolas Kaiser
2010-11-16 21:54 ` Jarod Wilson
2010-11-17 1:51 ` Mauro Carvalho Chehab
2010-11-17 10:35 ` [PATCH] drivers/media: nuvoton: fix chip id probe Nicolas Kaiser
2010-11-19 19:16 ` Jarod Wilson [this message]
2010-11-19 20:42 ` [PATCH] drivers/media: nuvoton: fix chip id probe v2 Nicolas Kaiser
2010-11-19 21:39 ` Jarod Wilson
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=20101119191644.GF5022@redhat.com \
--to=jarod@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=nikai@nikai.net \
/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