From patchwork Fri Dec 31 11:37:00 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Igor M. Liplianin" X-Patchwork-Id: 5401 Return-path: Envelope-to: mchehab@gaivota Delivery-date: Sat, 01 Jan 2011 07:57:45 -0200 Received: from mchehab by gaivota with local (Exim 4.72) (envelope-from ) id 1PYyDZ-0001tn-5J for mchehab@gaivota; Sat, 01 Jan 2011 07:57:45 -0200 Received: from casper.infradead.org [85.118.1.10] by gaivota with IMAP (fetchmail-6.3.17) for (single-drop); Sat, 01 Jan 2011 07:57:45 -0200 (BRST) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1PYxtA-0005N4-LO; Sat, 01 Jan 2011 09:36:40 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751510Ab1AAJgT (ORCPT + 1 other); Sat, 1 Jan 2011 04:36:19 -0500 Received: from mail-ew0-f46.google.com ([209.85.215.46]:65324 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750892Ab1AAJgS (ORCPT ); Sat, 1 Jan 2011 04:36:18 -0500 Received: by ewy5 with SMTP id 5so5608873ewy.19 for ; Sat, 01 Jan 2011 01:36:17 -0800 (PST) Received: by 10.213.28.66 with SMTP id l2mr15391170ebc.71.1293874577036; Sat, 01 Jan 2011 01:36:17 -0800 (PST) Received: from useri.localnet ([93.125.74.3]) by mx.google.com with ESMTPS id b52sm12967135eei.13.2011.01.01.01.36.15 (version=SSLv3 cipher=RC4-MD5); Sat, 01 Jan 2011 01:36:16 -0800 (PST) Message-ID: <4d1ef590.cc7e0e0a.7c81.08b4@mx.google.com> From: "Igor M. Liplianin" Date: Fri, 31 Dec 2010 13:37:00 +0200 Subject: [PATCH 14/18] cx25840: Fix subdev registration in cx25840-core.c To: , , Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sender: Mauro Carvalho Chehab 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 --- 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,