From patchwork Sun Feb 10 20:05:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Frank_Sch=C3=A4fer?= X-Patchwork-Id: 2122871 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id AC73BDF24C for ; Sun, 10 Feb 2013 20:04:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756836Ab3BJUEm (ORCPT ); Sun, 10 Feb 2013 15:04:42 -0500 Received: from mail-ee0-f43.google.com ([74.125.83.43]:33612 "EHLO mail-ee0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756804Ab3BJUEl (ORCPT ); Sun, 10 Feb 2013 15:04:41 -0500 Received: by mail-ee0-f43.google.com with SMTP id c50so2904739eek.2 for ; Sun, 10 Feb 2013 12:04:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=Rghz7xEGD+pi/4/9JmFrZ1LTkUT7ESOysRt6D/++ZVU=; b=X+/5n3091PWfPa5KATe+xkPAJWYTl/Ff+IXKigfKWtVq/56ZmAGTU0gnQ68D6oqBbc a9B9ejiGofqJMEwiqFpKqkkZ/GsNf7/RBNZ6yXONvEAJsjDRDUfh4/uzwrrUvSz6P4Y1 mwlNyk5o6kbNXn0WB4wxAQbLwTVpt9Gtxsa3958R90d7ZRUk9xBk3danxQi7aJjyX98e m+OJ6nFqF1L6RsAAue808Q8DJgt8TXTO3nY0IZ2Wg+nJZe9h41lX/Eb8uQsSZG6LZ1lX 0JtVUQk73mjixsLzND+AsGbQcOUOukqdc4d5SYwahevkVg51jc5tGgWDIocVkB8EkhBc DiFA== X-Received: by 10.14.220.135 with SMTP id o7mr25519385eep.3.1360526679864; Sun, 10 Feb 2013 12:04:39 -0800 (PST) Received: from Athlon64X2-5000.site (ip-178-201-82-93.unitymediagroup.de. [178.201.82.93]) by mx.google.com with ESMTPS id 3sm58902558eej.6.2013.02.10.12.04.39 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 10 Feb 2013 12:04:39 -0800 (PST) From: =?UTF-8?q?Frank=20Sch=C3=A4fer?= To: mchehab@redhat.com Cc: linux-media@vger.kernel.org, =?UTF-8?q?Frank=20Sch=C3=A4fer?= Subject: [PATCH 2/4] em28xx: rename function get_scale() to size_to_scale() Date: Sun, 10 Feb 2013 21:05:12 +0100 Message-Id: <1360526714-3216-2-git-send-email-fschaefer.oss@googlemail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1360526714-3216-1-git-send-email-fschaefer.oss@googlemail.com> References: <1360526714-3216-1-git-send-email-fschaefer.oss@googlemail.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Signed-off-by: Frank Schäfer --- drivers/media/usb/em28xx/em28xx-video.c | 8 ++++---- 1 Datei geändert, 4 Zeilen hinzugefügt(+), 4 Zeilen entfernt(-) diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c index 9451e1e..197823c 100644 --- a/drivers/media/usb/em28xx/em28xx-video.c +++ b/drivers/media/usb/em28xx/em28xx-video.c @@ -799,7 +799,7 @@ const struct v4l2_ctrl_ops em28xx_ctrl_ops = { .s_ctrl = em28xx_s_ctrl, }; -static void get_scale(struct em28xx *dev, +static void size_to_scale(struct em28xx *dev, unsigned int width, unsigned int height, unsigned int *hscale, unsigned int *vscale) { @@ -889,7 +889,7 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv, 1, 0); } - get_scale(dev, width, height, &hscale, &vscale); + size_to_scale(dev, width, height, &hscale, &vscale); width = (((unsigned long)maxw) << 12) / (hscale + 4096L); height = (((unsigned long)maxh) << 12) / (vscale + 4096L); @@ -923,7 +923,7 @@ static int em28xx_set_video_format(struct em28xx *dev, unsigned int fourcc, dev->height = height; /* set new image size */ - get_scale(dev, dev->width, dev->height, &dev->hscale, &dev->vscale); + size_to_scale(dev, dev->width, dev->height, &dev->hscale, &dev->vscale); em28xx_resolution_set(dev); @@ -986,7 +986,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *norm) /* set new image size */ dev->width = f.fmt.pix.width; dev->height = f.fmt.pix.height; - get_scale(dev, dev->width, dev->height, &dev->hscale, &dev->vscale); + size_to_scale(dev, dev->width, dev->height, &dev->hscale, &dev->vscale); em28xx_resolution_set(dev); v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_std, dev->norm);