From patchwork Mon Jan 31 12:58:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatolij Gustschin X-Patchwork-Id: 519471 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 p0VCvD1J029021 for ; Mon, 31 Jan 2011 12:57:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755391Ab1AaM5L (ORCPT ); Mon, 31 Jan 2011 07:57:11 -0500 Received: from mail-out.m-online.net ([212.18.0.10]:49614 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753736Ab1AaM5L (ORCPT ); Mon, 31 Jan 2011 07:57:11 -0500 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 1F728188A182; Mon, 31 Jan 2011 13:57:10 +0100 (CET) X-Auth-Info: HQVPmNaqpIclEsbDtpz0qSCpRfh0ZTMR827NRvE3tAo= Received: from localhost (p4FE3DF32.dip.t-dialin.net [79.227.223.50]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA id 5378E1C0010D; Mon, 31 Jan 2011 13:57:10 +0100 (CET) From: Anatolij Gustschin To: linux-media@vger.kernel.org Cc: Guennadi Liakhovetski , Markus Niebel Subject: [PATCH] v4l: mx3_camera.c: correct 'sizeimage' value reporting Date: Mon, 31 Jan 2011 13:58:01 +0100 Message-Id: <1296478681-11119-1-git-send-email-agust@denx.de> X-Mailer: git-send-email 1.7.1 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.6 (demeter1.kernel.org [140.211.167.41]); Mon, 31 Jan 2011 12:57:13 +0000 (UTC) diff --git a/drivers/media/video/mx3_camera.c b/drivers/media/video/mx3_camera.c index 7bcaaf7..6b0b25d 100644 --- a/drivers/media/video/mx3_camera.c +++ b/drivers/media/video/mx3_camera.c @@ -918,6 +918,12 @@ static int mx3_camera_set_fmt(struct soc_camera_device *icd, pix->colorspace = mf.colorspace; icd->current_fmt = xlate; + pix->bytesperline = soc_mbus_bytes_per_line(pix->width, + xlate->host_fmt); + if (pix->bytesperline < 0) + return pix->bytesperline; + pix->sizeimage = pix->height * pix->bytesperline; + dev_dbg(icd->dev.parent, "Sensor set %dx%d\n", pix->width, pix->height); return ret;