From patchwork Tue Jun 7 09:58:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 855572 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 p579wDHV004416 for ; Tue, 7 Jun 2011 09:58:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752716Ab1FGJ6I (ORCPT ); Tue, 7 Jun 2011 05:58:08 -0400 Received: from moutng.kundenserver.de ([212.227.126.187]:59152 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752715Ab1FGJ6F (ORCPT ); Tue, 7 Jun 2011 05:58:05 -0400 Received: from axis700.grange (dslb-094-221-030-184.pools.arcor-ip.net [94.221.30.184]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MXTpy-1Q7DBt3puo-00WTxt; Tue, 07 Jun 2011 11:58:04 +0200 Received: by axis700.grange (Postfix, from userid 1000) id 8C0AB189B78; Tue, 7 Jun 2011 11:58:03 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id 89691189B77; Tue, 7 Jun 2011 11:58:03 +0200 (CEST) Date: Tue, 7 Jun 2011 11:58:03 +0200 (CEST) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: Linux Media Mailing List cc: Robert Jarzmik Subject: [PATCH 1/3 v2] V4L: pxa_camera: remove redundant calculations In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-Provags-ID: V02:K0:CjBo5n6O/0tVN5iZUAdXbYs45ESrgFDrFPtsK8K2uTm 6M+Me+aWoXqN+jC+NlpAU8GNldh+t/Qq361IkFGmD6sLI1hu7m j7S9+09QCgqVX6VZqHOqdsm1/2+oZMkmre3lRNVZ+f6PJvFZHD 4y4nQA4BMrqSpHhjtGBj/9AF4ug+1ye7lHyqcali6W4mjhFCl2 kXaGWnbOx0jXuDl12auT5p5njNBMANblFbFkERk180= 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]); Tue, 07 Jun 2011 09:58:14 +0000 (UTC) soc_camera core now performs the standard .bytesperline and .sizeimage calculations internally, no need to duplicate in drivers. Signed-off-by: Guennadi Liakhovetski --- drivers/media/video/pxa_camera.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c index b42bfa5..c7f84da 100644 --- a/drivers/media/video/pxa_camera.c +++ b/drivers/media/video/pxa_camera.c @@ -1499,12 +1499,6 @@ static int pxa_camera_try_fmt(struct soc_camera_device *icd, &pix->height, 32, 2048, 0, pixfmt == V4L2_PIX_FMT_YUV422P ? 4 : 0); - 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; - /* limit to sensor capabilities */ mf.width = pix->width; mf.height = pix->height;