From patchwork Sat Aug 8 17:46:04 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Klimov X-Patchwork-Id: 1473 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Sat, 08 Aug 2009 17:46:08 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra.chehab.org with IMAP (fetchmail-6.3.6) for (single-drop); Sat, 08 Aug 2009 14:46:05 -0300 (BRT) Received: from vger.kernel.org ([209.132.176.167]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1MZpzc-0005kZ-DG; Sat, 08 Aug 2009 17:46:08 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752676AbZHHRqF (ORCPT + 1 other); Sat, 8 Aug 2009 13:46:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752680AbZHHRqF (ORCPT ); Sat, 8 Aug 2009 13:46:05 -0400 Received: from ey-out-2122.google.com ([74.125.78.25]:39763 "EHLO ey-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752676AbZHHRqD (ORCPT ); Sat, 8 Aug 2009 13:46:03 -0400 Received: by ey-out-2122.google.com with SMTP id 9so676556eyd.37 for ; Sat, 08 Aug 2009 10:46:03 -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=XWRh/JKVvceaqNu8k73ILMoOm6TVK4Q6hh4NJNFGTyc=; b=XgoIwb8mQWhMocZ47eJ7Wv2HhJahy+uWS9+q3GxysUqlyeXTm1lpRUjHo0cXLhX5Vr OPxhFT/DNkLtrg6vujDuW1Mkw5Nd2J1ByMNWnRH+d0Ljoclh/9B1NQK6PrcxM/l1J3Kc f4Gc+WQ93/Mv5YdOarZB3dVa8IduCrs+TjksE= 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=wdtJFYXsYFED+JBzlpd5G6QH1brlf6X3K2AY8+Hczmg08LPH2dkc/awVyUBA7G9sBp VBhVC/dP4a2i+PQA1TR5u6v3BwfOtEsFz8E1bHysUuhWeppBdBdjtBMCxahIwHJQdT21 bjFqVkVqezMUs5f9DoB2Us/l+oEk+WkaNBXEo= Received: by 10.210.68.17 with SMTP id q17mr3006717eba.58.1249753563683; Sat, 08 Aug 2009 10:46:03 -0700 (PDT) Received: from ?95.78.132.126? ([95.78.132.126]) by mx.google.com with ESMTPS id 5sm6277920eyh.16.2009.08.08.10.46.03 (version=SSLv3 cipher=RC4-MD5); Sat, 08 Aug 2009 10:46:03 -0700 (PDT) Subject: [patch review 3/6] radio-mr800: no need to pass curfreq value to amradio_setfreq() From: Alexey Klimov To: Douglas Schilling Landgraf Cc: linux-media@vger.kernel.org Date: Sat, 08 Aug 2009 21:46:04 +0400 Message-Id: <1249753564.15160.248.camel@tux.localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Small cleanup of amradio_setfreq(). No need to pass radio->curfreq value to this function. Signed-off-by: Alexey Klimov diff -r 5f3329bebfe4 linux/drivers/media/radio/radio-mr800.c --- a/linux/drivers/media/radio/radio-mr800.c Wed Jul 29 12:36:46 2009 +0400 +++ b/linux/drivers/media/radio/radio-mr800.c Wed Jul 29 12:41:51 2009 +0400 @@ -202,11 +202,11 @@ } /* set a frequency, freq is defined by v4l's TUNER_LOW, i.e. 1/16th kHz */ -static int amradio_setfreq(struct amradio_device *radio, int freq) +static int amradio_setfreq(struct amradio_device *radio) { int retval; int size; - unsigned short freq_send = 0x10 + (freq >> 3) / 25; + unsigned short freq_send = 0x10 + (radio->curfreq >> 3) / 25; /* safety check */ if (radio->removed) @@ -413,7 +413,7 @@ radio->curfreq = f->frequency; mutex_unlock(&radio->lock); - retval = amradio_setfreq(radio, radio->curfreq); + retval = amradio_setfreq(radio); if (retval < 0) amradio_dev_warn(&radio->videodev->dev, "set frequency failed\n");