mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Igor M. Liplianin" <liplianin@me.by>
To: <mchehab@infradead.org>, <linux-media@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH 14/18] cx25840: Fix subdev registration in cx25840-core.c
Date: Fri, 31 Dec 2010 13:37:00 +0200	[thread overview]
Message-ID: <4d1ef56a.857a0e0a.5005.0d21@mx.google.com> (raw)

On my system, cx23885 based card reports default volume value above 70000.
So, register cx25840 subdev fails. Although, the card don't have a/v inputs
it needs a/v firmware to be loaded.

Signed-off-by: Igor M. Liplianin <liplianin@netup.ru>
---
 drivers/media/video/cx25840/cx25840-core.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c
index dfb198d..dc0cec7 100644
--- a/drivers/media/video/cx25840/cx25840-core.c
+++ b/drivers/media/video/cx25840/cx25840-core.c
@@ -1991,6 +1991,8 @@ static int cx25840_probe(struct i2c_client *client,
 	if (!is_cx2583x(state)) {
 		default_volume = 228 - cx25840_read(client, 0x8d4);
 		default_volume = ((default_volume / 2) + 23) << 9;
+		if (default_volume > 65535)
+			default_volume = 65535;
 
 		state->volume = v4l2_ctrl_new_std(&state->hdl,
 			&cx25840_audio_ctrl_ops, V4L2_CID_AUDIO_VOLUME,
-- 
1.7.1


             reply	other threads:[~2011-01-01  9:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-31 11:37 Igor M. Liplianin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-01-01 12:58 Andy Walls
2011-01-01 13:44 ` Igor M. Liplianin
2010-12-31 11:37 Igor M. Liplianin

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=4d1ef56a.857a0e0a.5005.0d21@mx.google.com \
    --to=liplianin@me.by \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@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

all inboxes | Powered by JetHome®