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: 442971 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p019a2Mt012550 for ; Sat, 1 Jan 2011 09:36:02 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751284Ab1AAJfk (ORCPT ); Sat, 1 Jan 2011 04:35:40 -0500 Received: from mail-ey0-f174.google.com ([209.85.215.174]:41338 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750758Ab1AAJfk (ORCPT ); Sat, 1 Jan 2011 04:35:40 -0500 Received: by eye27 with SMTP id 27so5458453eye.19 for ; Sat, 01 Jan 2011 01:35:39 -0800 (PST) Received: by 10.213.16.137 with SMTP id o9mr21253eba.31.1293874538926; Sat, 01 Jan 2011 01:35:38 -0800 (PST) Received: from useri.localnet ([93.125.74.3]) by mx.google.com with ESMTPS id t5sm12966414eeh.14.2011.01.01.01.35.37 (version=SSLv3 cipher=RC4-MD5); Sat, 01 Jan 2011 01:35:38 -0800 (PST) Message-ID: <4d1ef56a.857a0e0a.5005.0d21@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: , , Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sat, 01 Jan 2011 09:36:03 +0000 (UTC) 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,