From patchwork Sat Aug 8 17:46:00 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Klimov X-Patchwork-Id: 1472 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Sat, 08 Aug 2009 17:46:03 +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:04 -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 1MZpzW-0005kZ-Q9; Sat, 08 Aug 2009 17:46:03 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751809AbZHHRqA (ORCPT + 1 other); Sat, 8 Aug 2009 13:46:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752676AbZHHRqA (ORCPT ); Sat, 8 Aug 2009 13:46:00 -0400 Received: from mail-ew0-f214.google.com ([209.85.219.214]:51190 "EHLO mail-ew0-f214.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751809AbZHHRp7 (ORCPT ); Sat, 8 Aug 2009 13:45:59 -0400 Received: by mail-ew0-f214.google.com with SMTP id 10so2174216ewy.37 for ; Sat, 08 Aug 2009 10:46:00 -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=BzDqrVNjhYONvNLbVB4dsGVVnq3OK3EQEWHMIlvm+Qg=; b=K5yB76UPrLG6dySzIOEAOsVqf9VHv4XwRPUctpX3NUV5WH9fCuQcaunjVwTC1XrzdV Gz3xdo1Ssvow1Hh3vZf6A+slARFOX9BLibtdydZrbKfEPkJomX0yz2VvtXHcwrztX06p kMnXsF7rXU5wrxvnb6lJb/ERQ8ePve1TrWWYc= 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=Okd0AkYbpLitCB7egiR2ktyn2hWzdhesU3RN7j58gawonYDaPN+tSMD+OaAikRUlP4 QXR1HBN8JW3YMBhqgmwk9yQBPZ2vMkRy3nYPKmXuzc4ikBjTgenoP2KYcv2Nl63jXzcw 44CI3Zl3buH66FAOjqvnpetr+nxdA7CLlSx0k= Received: by 10.210.134.20 with SMTP id h20mr3026418ebd.41.1249753560250; Sat, 08 Aug 2009 10:46:00 -0700 (PDT) Received: from ?95.78.132.126? ([95.78.132.126]) by mx.google.com with ESMTPS id 28sm2879729eye.4.2009.08.08.10.45.59 (version=SSLv3 cipher=RC4-MD5); Sat, 08 Aug 2009 10:45:59 -0700 (PDT) Subject: [patch review 2/6] radio-mr800: cleanup of usb_amradio_open/close From: Alexey Klimov To: Douglas Schilling Landgraf Cc: linux-media@vger.kernel.org Date: Sat, 08 Aug 2009 21:46:00 +0400 Message-Id: <1249753560.15160.247.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 Patch removes functions that shouldn't be in usb_amradio_open/close: amradio_set_mute(), amradio_set_stereo(), amradio_setfreq(). Signed-off-by: Alexey Klimov diff -r 34b4e5c9d5c2 linux/drivers/media/radio/radio-mr800.c --- a/linux/drivers/media/radio/radio-mr800.c Wed Jul 29 10:44:51 2009 +0400 +++ b/linux/drivers/media/radio/radio-mr800.c Wed Jul 29 12:36:37 2009 +0400 @@ -538,29 +538,10 @@ static int usb_amradio_open(struct file *file) { struct amradio_device *radio = video_get_drvdata(video_devdata(file)); - int retval; radio->users = 1; radio->muted = 1; - retval = amradio_set_mute(radio, AMRADIO_START); - if (retval < 0) { - amradio_dev_warn(&radio->videodev->dev, - "radio did not start up properly\n"); - radio->users = 0; - return -EIO; - } - - retval = amradio_set_stereo(radio, WANT_STEREO); - if (retval < 0) - amradio_dev_warn(&radio->videodev->dev, - "set stereo failed\n"); - - retval = amradio_setfreq(radio, radio->curfreq); - if (retval < 0) - amradio_dev_warn(&radio->videodev->dev, - "set frequency failed\n"); - return 0; } @@ -568,7 +549,6 @@ static int usb_amradio_close(struct file *file) { struct amradio_device *radio = video_get_drvdata(video_devdata(file)); - int retval; if (!radio) return -ENODEV; @@ -577,13 +557,6 @@ radio->users = 0; mutex_unlock(&radio->lock); - if (!radio->removed) { - retval = amradio_set_mute(radio, AMRADIO_STOP); - if (retval < 0) - amradio_dev_warn(&radio->videodev->dev, - "amradio_stop failed\n"); - } - return 0; }