From patchwork Wed Jan 13 06:59:15 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 72515 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0D70QZi006179 for ; Wed, 13 Jan 2010 07:00:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755052Ab0AMG7y (ORCPT ); Wed, 13 Jan 2010 01:59:54 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751863Ab0AMG7e (ORCPT ); Wed, 13 Jan 2010 01:59:34 -0500 Received: from mail.perches.com ([173.55.12.10]:1086 "EHLO mail.perches.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754987Ab0AMG7S (ORCPT ); Wed, 13 Jan 2010 01:59:18 -0500 Received: from localhost.localdomain (Joe-Laptop.home [192.168.1.151]) by mail.perches.com (Postfix) with ESMTP id 6CE212436C; Tue, 12 Jan 2010 22:59:07 -0800 (PST) From: Joe Perches To: linux-kernel@vger.kernel.org Cc: Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [PATCH 3/3] drivers/media/dvb/frontends/si21xx.c: Remove #define TRUE/FALSE, use bool Date: Tue, 12 Jan 2010 22:59:15 -0800 Message-Id: <2b78279a02083e0f1e32bd91ca0b6362ac5fcf97.1263365754.git.joe@perches.com> X-Mailer: git-send-email 1.6.6.rc0.57.gad7a In-Reply-To: References: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff --git a/drivers/media/dvb/frontends/si21xx.c b/drivers/media/dvb/frontends/si21xx.c index 9552a22..d21a327 100644 --- a/drivers/media/dvb/frontends/si21xx.c +++ b/drivers/media/dvb/frontends/si21xx.c @@ -97,8 +97,6 @@ #define LNB_SUPPLY_CTRL_REG_4 0xce #define LNB_SUPPLY_STATUS_REG 0xcf -#define FALSE 0 -#define TRUE 1 #define FAIL -1 #define PASS 0 @@ -718,7 +716,7 @@ static int si21xx_set_frontend(struct dvb_frontend *fe, int fine_tune_freq; unsigned char sample_rate = 0; /* boolean */ - unsigned int inband_interferer_ind; + bool inband_interferer_ind; /* INTERMEDIATE VALUES */ int icoarse_tune_freq; /* MHz */ @@ -728,15 +726,8 @@ static int si21xx_set_frontend(struct dvb_frontend *fe, unsigned int x1; unsigned int x2; int i; - unsigned int inband_interferer_div2[ALLOWABLE_FS_COUNT] = { - FALSE, FALSE, FALSE, FALSE, FALSE, - FALSE, FALSE, FALSE, FALSE, FALSE - }; - unsigned int inband_interferer_div4[ALLOWABLE_FS_COUNT] = { - FALSE, FALSE, FALSE, FALSE, FALSE, - FALSE, FALSE, FALSE, FALSE, FALSE - }; - + bool inband_interferer_div2[ALLOWABLE_FS_COUNT]; + bool inband_interferer_div4[ALLOWABLE_FS_COUNT]; int status; /* allowable sample rates for ADC in MHz */ @@ -762,7 +753,7 @@ static int si21xx_set_frontend(struct dvb_frontend *fe, } for (i = 0; i < ALLOWABLE_FS_COUNT; ++i) - inband_interferer_div2[i] = inband_interferer_div4[i] = FALSE; + inband_interferer_div2[i] = inband_interferer_div4[i] = false; if_limit_high = -700000; if_limit_low = -100000; @@ -798,7 +789,7 @@ static int si21xx_set_frontend(struct dvb_frontend *fe, if (((band_low < x1) && (x1 < band_high)) || ((band_low < x2) && (x2 < band_high))) - inband_interferer_div4[i] = TRUE; + inband_interferer_div4[i] = true; } @@ -811,25 +802,28 @@ static int si21xx_set_frontend(struct dvb_frontend *fe, if (((band_low < x1) && (x1 < band_high)) || ((band_low < x2) && (x2 < band_high))) - inband_interferer_div2[i] = TRUE; + inband_interferer_div2[i] = true; } - inband_interferer_ind = TRUE; - for (i = 0; i < ALLOWABLE_FS_COUNT; ++i) - inband_interferer_ind &= inband_interferer_div2[i] | - inband_interferer_div4[i]; + inband_interferer_ind = true; + for (i = 0; i < ALLOWABLE_FS_COUNT; ++i) { + if (inband_interferer_div2[i] || inband_interferer_div4[i]) { + inband_interferer_ind = false; + break; + } + } if (inband_interferer_ind) { for (i = 0; i < ALLOWABLE_FS_COUNT; ++i) { - if (inband_interferer_div2[i] == FALSE) { + if (!inband_interferer_div2[i]) { sample_rate = (u8) afs[i]; break; } } } else { for (i = 0; i < ALLOWABLE_FS_COUNT; ++i) { - if ((inband_interferer_div2[i] | - inband_interferer_div4[i]) == FALSE) { + if ((inband_interferer_div2[i] || + !inband_interferer_div4[i])) { sample_rate = (u8) afs[i]; break; }