From patchwork Thu May 28 20:44:45 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Klimov X-Patchwork-Id: 26787 X-Patchwork-Delegate: dougsland@redhat.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4SKj2pU000761 for ; Thu, 28 May 2009 20:45:02 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754857AbZE1Uoq (ORCPT ); Thu, 28 May 2009 16:44:46 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760302AbZE1Uoq (ORCPT ); Thu, 28 May 2009 16:44:46 -0400 Received: from fg-out-1718.google.com ([72.14.220.157]:56843 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754857AbZE1Uop (ORCPT ); Thu, 28 May 2009 16:44:45 -0400 Received: by fg-out-1718.google.com with SMTP id d23so1612889fga.17 for ; Thu, 28 May 2009 13:44:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=eV7kcDPa+6hr4bHHWZ+eIVMEqTSayPT4yuWUyM25FKA=; b=d/mCDuXWwyLwDUiyMXkxQBjOYBdg3J9vc+FN5EF4sKZjySTTuQYVZuQmlxHGzWztIR b9KKzgPfDOdHCaCJx/7mkQSyBEedZaiGuCojs3c6IY1pPFcwiW6soYckGcipJLuAlZJl 2Mho4AmSNrRKEUg2a29H4jyKCRnijwGMsw4pg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=dkkrHEF6OzVmy1thxyKEyeYvGe7N+DeCMTjJTqvjMi9Z8VzuF8jBIeF03krnGumxL7 UA+mVM93t/ShKDg5b4+UcDmWFUfpcuq1qNfkFmT0KeMAtttQX6aoNBvr7R7Z69l3go7O +9ynfzIrIf9DgS0JNtDVr88RdOIW3Yn0EigpU= Received: by 10.86.90.2 with SMTP id n2mr1990431fgb.61.1243543487145; Thu, 28 May 2009 13:44:47 -0700 (PDT) Received: from ?192.168.1.102? (gw.zunet.ru [217.67.117.64]) by mx.google.com with ESMTPS id 4sm916346fgg.18.2009.05.28.13.44.44 (version=SSLv3 cipher=RC4-MD5); Thu, 28 May 2009 13:44:45 -0700 (PDT) Subject: [patch review 3/4] dsbr100: no need to pass curfreq value to dsbr100_setfreq() From: Alexey Klimov To: Linux Media Cc: Douglas Schilling Landgraf Date: Fri, 29 May 2009 00:44:45 +0400 Message-Id: <1243543485.6713.43.camel@tux.localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.26.2 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Small cleanup of dsbr100_setfreq(). No need to pass radio->curfreq value to this function. Signed-off-by: Alexey Klimov diff -r d7322837a62c linux/drivers/media/radio/dsbr100.c --- a/linux/drivers/media/radio/dsbr100.c Tue May 19 15:18:56 2009 +0400 +++ b/linux/drivers/media/radio/dsbr100.c Tue May 19 15:59:39 2009 +0400 @@ -258,12 +258,12 @@ } /* set a frequency, freq is defined by v4l's TUNER_LOW, i.e. 1/16th kHz */ -static int dsbr100_setfreq(struct dsbr100_device *radio, int freq) +static int dsbr100_setfreq(struct dsbr100_device *radio) { int retval; int request; + int freq = (radio->curfreq / 16 * 80) / 1000 + 856; - freq = (freq / 16 * 80) / 1000 + 856; mutex_lock(&radio->lock); retval = usb_control_msg(radio->usbdev, @@ -431,7 +431,7 @@ radio->curfreq = f->frequency; mutex_unlock(&radio->lock); - retval = dsbr100_setfreq(radio, radio->curfreq); + retval = dsbr100_setfreq(radio); if (retval < 0) dev_warn(&radio->usbdev->dev, "Set frequency failed\n"); return 0;