From patchwork Thu May 28 20:44:33 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Klimov X-Patchwork-Id: 1673 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Thu, 28 May 2009 20:44:40 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra.chehab.org with IMAP (fetchmail-6.3.6) for (single-drop); Thu, 28 May 2009 22:06:50 -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 1M9mSu-0004KJ-1O; Thu, 28 May 2009 20:44:40 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753588AbZE1Uog (ORCPT + 1 other); Thu, 28 May 2009 16:44:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755852AbZE1Uog (ORCPT ); Thu, 28 May 2009 16:44:36 -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 S1753588AbZE1Uof (ORCPT ); Thu, 28 May 2009 16:44:35 -0400 Received: by fg-out-1718.google.com with SMTP id d23so1612889fga.17 for ; Thu, 28 May 2009 13:44:35 -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=UeaEoqVLeUw+RwQBBPQ74aZhWguivQERfBrFXmHGJy0=; b=rrT8bzippg0zMdsfi5MurGbZpwDbpExRQ9iFdI3kA3jrz0WoERCBfAcraRC1umHlCv WD96LCVhf8CdYpH9n0DUY1OTTQjvcpvxM2quC45BZmIRCp820KhrGQqO1tZVGLmLSi2t rbu+3ZJ8P0oMaxvPKI2Im/7eFKhb01ruMwXgU= 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=ODkpzmcXoUc8CD16Ky1HyiqTvyY1xD+NDfsxmQAUBLip9exa/Y/J6De/POkr9RQ1di /jeJt8A9TnF0Xxu7DVJV/qzF1YzMWD6w7iIg00wziu9ddjKt4DsQRanxR1cuy/xnvypE rfmRHDeP1O1/mDLrPbTTCXJbP1z6K1T72w4Z4= Received: by 10.86.79.6 with SMTP id c6mr1998313fgb.52.1243543475557; Thu, 28 May 2009 13:44:35 -0700 (PDT) Received: from ?192.168.1.102? (gw.zunet.ru [217.67.117.64]) by mx.google.com with ESMTPS id 4sm6222402fge.13.2009.05.28.13.44.32 (version=SSLv3 cipher=RC4-MD5); Thu, 28 May 2009 13:44:33 -0700 (PDT) Subject: [patch review 1/4] dsbr100: remove radio->users counter From: Alexey Klimov To: Linux Media Cc: Douglas Schilling Landgraf Date: Fri, 29 May 2009 00:44:33 +0400 Message-Id: <1243543473.6713.41.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 Patch removes radio->users counter because it is not in use. Signed-off-by: Alexey Klimov diff -r 315bc4b65b4f linux/drivers/media/radio/dsbr100.c --- a/linux/drivers/media/radio/dsbr100.c Sun May 17 12:28:55 2009 +0000 +++ b/linux/drivers/media/radio/dsbr100.c Tue May 19 15:05:02 2009 +0400 @@ -146,7 +146,6 @@ struct mutex lock; /* buffer locking */ int curfreq; int stereo; - int users; int removed; int muted; }; @@ -552,14 +551,12 @@ int retval; lock_kernel(); - radio->users = 1; radio->muted = 1; retval = dsbr100_start(radio); if (retval < 0) { dev_warn(&radio->usbdev->dev, "Radio did not start up properly\n"); - radio->users = 0; unlock_kernel(); return -EIO; } @@ -581,10 +578,6 @@ if (!radio) return -ENODEV; - mutex_lock(&radio->lock); - radio->users = 0; - mutex_unlock(&radio->lock); - if (!radio->removed) { retval = dsbr100_stop(radio); if (retval < 0) { @@ -698,7 +691,6 @@ mutex_init(&radio->lock); radio->removed = 0; - radio->users = 0; radio->usbdev = interface_to_usbdev(intf); radio->curfreq = FREQ_MIN * FREQ_MUL;