summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir@cohens.org.il>2010-08-01 00:45:42 +0300
committerTzafrir Cohen <tzafrir@cohens.org.il>2010-08-01 00:45:42 +0300
commit2ce7c8db81593ac05c35951b18ea5b4406f87d2c (patch)
tree2191d9cabb91cac432fdada46458d1032124765b
parent31dfb9afaf2e29b783b03dc7b1e5d3ab330f8ea3 (diff)
bool type instead of TRUE/FALSE
Replace #define-s of TRUE and FALSE with the built-in type bool. We still need to carry around the ugly legacy ifdefs for using int instead.
-rw-r--r--drivers/dahdi/zaphfc/base.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/drivers/dahdi/zaphfc/base.c b/drivers/dahdi/zaphfc/base.c
index d0af1f9..6adabfd 100644
--- a/drivers/dahdi/zaphfc/base.c
+++ b/drivers/dahdi/zaphfc/base.c
@@ -64,11 +64,13 @@ static struct proc_dir_entry *hfc_proc_zaphfc_dir;
int debug_level;
#endif
-#ifndef FALSE
-#define FALSE 0
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+/* Also don't define this for later RHEL >= 5.2 . hex_asc is from the
+ * same linux-2.6-net-infrastructure-updates-to-mac80211-iwl4965.patch
+ * as is the bool typedef. */
+#if LINUX_VERSION_CODE != KERNEL_VERSION(2,6,18) || ! defined(hex_asc)
+typedef int bool;
#endif
-#ifndef TRUE
-#define TRUE (!FALSE)
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30)
@@ -343,7 +345,7 @@ static void hfc_update_fifo_state(struct hfc_card *card)
static inline void hfc_suspend_fifo(struct hfc_card *card)
{
- card->fifo_suspended = TRUE;
+ card->fifo_suspended = true;
hfc_update_fifo_state(card);
@@ -368,7 +370,7 @@ static inline void hfc_suspend_fifo(struct hfc_card *card)
static inline void hfc_resume_fifo(struct hfc_card *card)
{
- card->fifo_suspended = FALSE;
+ card->fifo_suspended = false;
hfc_update_fifo_state(card);
@@ -437,7 +439,7 @@ static int hfc_zap_open(struct dahdi_chan *zaptel_chan)
break;
}
- chan->open_by_zaptel = TRUE;
+ chan->open_by_zaptel = true;
try_module_get(THIS_MODULE);
spin_unlock(&chan->lock);
@@ -516,7 +518,7 @@ static int hfc_zap_close(struct dahdi_chan *zaptel_chan)
}
chan->status = free;
- chan->open_by_zaptel = FALSE;
+ chan->open_by_zaptel = false;
spin_unlock(&chan->lock);
@@ -898,7 +900,7 @@ static irqreturn_t hfc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
"sync lost, pci performance too low!\n",
card->cardnum);
- card->sync_loss_reported = TRUE;
+ card->sync_loss_reported = true;
}
}
@@ -931,7 +933,7 @@ static irqreturn_t hfc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static void hfc_handle_timer_interrupt(struct hfc_card *card)
{
if (card->ignore_first_timer_interrupt) {
- card->ignore_first_timer_interrupt = FALSE;
+ card->ignore_first_timer_interrupt = false;
return;
}
@@ -1009,7 +1011,7 @@ static void hfc_handle_state_interrupt(struct hfc_card *card)
* interrupt immediately, we
* obviously need to ignore it
*/
- card->ignore_first_timer_interrupt = TRUE;
+ card->ignore_first_timer_interrupt = true;
}
if (new_state != 7 && card->l1_state == 7) {
@@ -1405,14 +1407,14 @@ static int __devinit hfc_probe(struct pci_dev *pci_dev,
goto err_request_irq;
}
- card->nt_mode = FALSE;
+ card->nt_mode = false;
if (modes & (1 << card->cardnum))
- card->nt_mode = TRUE;
+ card->nt_mode = true;
for (i = 0; i < nt_modes_count; i++) {
if (nt_modes[i] == card->cardnum)
- card->nt_mode = TRUE;
+ card->nt_mode = true;
}
/*