From patchwork Tue Dec 28 00:04:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 435411 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBS05SKC028005 for ; Tue, 28 Dec 2010 00:05:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752188Ab0L1AFO (ORCPT ); Mon, 27 Dec 2010 19:05:14 -0500 Received: from mail-ww0-f42.google.com ([74.125.82.42]:60934 "EHLO mail-ww0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752068Ab0L1AFM (ORCPT ); Mon, 27 Dec 2010 19:05:12 -0500 Received: by wwi17 with SMTP id 17so9148114wwi.1 for ; Mon, 27 Dec 2010 16:05:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=zY7PBIV7Rp99iGEhFWUTUwaM1QMb9j6FbW4LKgw2gQg=; b=nrWZoxI3iqqHWH4JZLtM3bDCCzHjeml3UeguqRFjMw/ldi72te+pjb8UwV57+vv+u+ D990F1BEEfzYxNH3tc+Dcp7MzAy/X8dwJMSYXaj++ICLg5BrV0n692EtDqegim3jTiPx rXN6rcJvxEpq0F3UyevZB5bLdq2WAxV4dMTlc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=DhIgz//U5ge8/ryQrMV2bWyEIR6poVZW92Fgw4T9SVCm1V0VOjZCRpaVU/AqklILLq Fl/XzMPwjCfEpkd59gdmvk/b34D8cMCeh4pN7Asc23XRuFANy25SE5DnFerpH11wM5f6 KzLozFWj0gYRLGt2I29ATeUFwD9kJOlsVlYzE= Received: by 10.216.211.92 with SMTP id v70mr13971606weo.23.1293494710936; Mon, 27 Dec 2010 16:05:10 -0800 (PST) Received: from bicker ([41.202.225.147]) by mx.google.com with ESMTPS id n78sm6205583weq.27.2010.12.27.16.05.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 27 Dec 2010 16:05:09 -0800 (PST) Date: Tue, 28 Dec 2010 03:04:58 +0300 From: Dan Carpenter To: Mauro Carvalho Chehab Cc: Devin Heitmueller , Sri Deevi , Palash Bandyopadhyay , Michael Krufky , linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] [media] cx231xx: use bitwise negate instead of logical Message-ID: <20101228000458.GX1936@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 28 Dec 2010 00:05:28 +0000 (UTC) diff --git a/drivers/media/video/cx231xx/cx231xx-avcore.c b/drivers/media/video/cx231xx/cx231xx-avcore.c index d52955c..c53e972 100644 --- a/drivers/media/video/cx231xx/cx231xx-avcore.c +++ b/drivers/media/video/cx231xx/cx231xx-avcore.c @@ -274,7 +274,7 @@ int cx231xx_afe_set_input_mux(struct cx231xx *dev, u32 input_mux) if (ch1_setting != 0) { status = afe_read_byte(dev, ADC_INPUT_CH1, &value); - value &= (!INPUT_SEL_MASK); + value &= ~INPUT_SEL_MASK; value |= (ch1_setting - 1) << 4; value &= 0xff; status = afe_write_byte(dev, ADC_INPUT_CH1, value); @@ -282,7 +282,7 @@ int cx231xx_afe_set_input_mux(struct cx231xx *dev, u32 input_mux) if (ch2_setting != 0) { status = afe_read_byte(dev, ADC_INPUT_CH2, &value); - value &= (!INPUT_SEL_MASK); + value &= ~INPUT_SEL_MASK; value |= (ch2_setting - 1) << 4; value &= 0xff; status = afe_write_byte(dev, ADC_INPUT_CH2, value); @@ -292,7 +292,7 @@ int cx231xx_afe_set_input_mux(struct cx231xx *dev, u32 input_mux) 7 less than the input number */ if (ch3_setting != 0) { status = afe_read_byte(dev, ADC_INPUT_CH3, &value); - value &= (!INPUT_SEL_MASK); + value &= ~INPUT_SEL_MASK; value |= (ch3_setting - 1) << 4; value &= 0xff; status = afe_write_byte(dev, ADC_INPUT_CH3, value);