From patchwork Sat Jun 14 11:37:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4352381 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 00BD89F3BC for ; Sat, 14 Jun 2014 11:36:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2DC782026D for ; Sat, 14 Jun 2014 11:36:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 490F82028D for ; Sat, 14 Jun 2014 11:36:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754616AbaFNLgk (ORCPT ); Sat, 14 Jun 2014 07:36:40 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:51309 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754077AbaFNLgN (ORCPT ); Sat, 14 Jun 2014 07:36:13 -0400 Received: by mail-wg0-f47.google.com with SMTP id k14so3690641wgh.18 for ; Sat, 14 Jun 2014 04:36:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=L0m0lWhQ15uVD7W7L/DIbhh1gRaJxBW0whHTtWMJi3c=; b=MHJlDBOtitAgSpEN/9UK50WiFNd7bIOGVeWa7zeU6rBlHfh8DlxIACpibq4DCUDhaI ikSwWZCTTzGavrMbZrq7b50ZKVbqUdaDmYkzQ6bPA2evQ13WGm5Su0BdZF5DawJkj1Vw /xIp8rqYsqKLUxxeQteaww/TSCBqwJeao3GgiZSt+3ReWe1T46N83yDsS5K1RNhSQ2R3 7N7hQaP3pQviJwsIGwxXwgAWSKoOXSKRAs5/daT7GZmEjZ7WFCsb1rRwfRA97iYuf06s mY/9fjbCA8q2Ajp5kJ8CgUNARuKzdEzoKZPaeIkUUAY3K6aeCAmira1EA4MzAYlOTndS cplw== X-Gm-Message-State: ALoCoQlF6Yt88Htm0RrFZ7xENcUGNOtxD216Fyy5Al/FYsdki9HhHhohRE4xYMCiO0+97IqQRfvI X-Received: by 10.180.39.66 with SMTP id n2mr12105839wik.17.1402745771967; Sat, 14 Jun 2014 04:36:11 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id v47sm18583205eel.22.2014.06.14.04.36.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Jun 2014 04:36:11 -0700 (PDT) From: Rickard Strandqvist To: Mauro Carvalho Chehab , Hans Verkuil Cc: Rickard Strandqvist , "Lad, Prabhakar" , Martin Bugge , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] media: v4l2-core: v4l2-dv-timings.c: Cleaning up code wrong value used in aspect ratio. Date: Sat, 14 Jun 2014 13:37:09 +0200 Message-Id: <1402745829-12895-2-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1402745829-12895-1-git-send-email-rickard_strandqvist@spectrumdigital.se> References: <1402745829-12895-1-git-send-email-rickard_strandqvist@spectrumdigital.se> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Wrong value used in same cases for the aspect ratio. Signed-off-by: Rickard Strandqvist --- drivers/media/v4l2-core/v4l2-dv-timings.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-dv-timings.c b/drivers/media/v4l2-core/v4l2-dv-timings.c index 48b20df..eb3850c 100644 --- a/drivers/media/v4l2-core/v4l2-dv-timings.c +++ b/drivers/media/v4l2-core/v4l2-dv-timings.c @@ -599,10 +599,10 @@ struct v4l2_fract v4l2_calc_aspect_ratio(u8 hor_landscape, u8 vert_portrait) aspect.denominator = 9; } else if (ratio == 34) { aspect.numerator = 4; - aspect.numerator = 3; + aspect.denominator = 3; } else if (ratio == 68) { aspect.numerator = 15; - aspect.numerator = 9; + aspect.denominator = 9; } else { aspect.numerator = hor_landscape + 99; aspect.denominator = 100;