diff options
author | Richard Knutsson <ricknu-0@student.ltu.se> | 2007-02-12 03:53:25 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:35 -0500 |
commit | a871fe858c5437ff8798fbaef52b6a88110b64a1 (patch) | |
tree | 2e93927962c087c48b371c3494550f4c27e74a25 /drivers/isdn | |
parent | 986c4bb8c4a7bf248378954782553334a003d80a (diff) |
[PATCH] drivers/isdn/hisax/: Convert to generic boolean-values
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/hisax/hfc_usb.c | 40 | ||||
-rw-r--r-- | drivers/isdn/hisax/hfc_usb.h | 3 |
2 files changed, 20 insertions, 23 deletions
diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c index 5a6989f23fcf..42bbae2a646c 100644 --- a/drivers/isdn/hisax/hfc_usb.c +++ b/drivers/isdn/hisax/hfc_usb.c | |||
@@ -183,7 +183,7 @@ typedef struct hfcusb_data { | |||
183 | int vend_idx; /* vendor found */ | 183 | int vend_idx; /* vendor found */ |
184 | int b_mode[2]; /* B-channel mode */ | 184 | int b_mode[2]; /* B-channel mode */ |
185 | int l1_activated; /* layer 1 activated */ | 185 | int l1_activated; /* layer 1 activated */ |
186 | int disc_flag; /* TRUE if device was disonnected to avoid some USB actions */ | 186 | int disc_flag; /* 'true' if device was disonnected to avoid some USB actions */ |
187 | int packet_size, iso_packet_size; | 187 | int packet_size, iso_packet_size; |
188 | 188 | ||
189 | /* control pipe background handling */ | 189 | /* control pipe background handling */ |
@@ -392,7 +392,7 @@ l1_timer_expire_t3(hfcusb_data * hfc) | |||
392 | DBG(ISDN_DBG, | 392 | DBG(ISDN_DBG, |
393 | "HFC-S USB: PH_DEACTIVATE | INDICATION sent (T3 expire)"); | 393 | "HFC-S USB: PH_DEACTIVATE | INDICATION sent (T3 expire)"); |
394 | #endif | 394 | #endif |
395 | hfc->l1_activated = FALSE; | 395 | hfc->l1_activated = false; |
396 | handle_led(hfc, LED_S0_OFF); | 396 | handle_led(hfc, LED_S0_OFF); |
397 | /* deactivate : */ | 397 | /* deactivate : */ |
398 | queue_control_request(hfc, HFCUSB_STATES, 0x10, 1); | 398 | queue_control_request(hfc, HFCUSB_STATES, 0x10, 1); |
@@ -411,7 +411,7 @@ l1_timer_expire_t4(hfcusb_data * hfc) | |||
411 | DBG(ISDN_DBG, | 411 | DBG(ISDN_DBG, |
412 | "HFC-S USB: PH_DEACTIVATE | INDICATION sent (T4 expire)"); | 412 | "HFC-S USB: PH_DEACTIVATE | INDICATION sent (T4 expire)"); |
413 | #endif | 413 | #endif |
414 | hfc->l1_activated = FALSE; | 414 | hfc->l1_activated = false; |
415 | handle_led(hfc, LED_S0_OFF); | 415 | handle_led(hfc, LED_S0_OFF); |
416 | } | 416 | } |
417 | 417 | ||
@@ -452,7 +452,7 @@ state_handler(hfcusb_data * hfc, __u8 state) | |||
452 | #ifdef CONFIG_HISAX_DEBUG | 452 | #ifdef CONFIG_HISAX_DEBUG |
453 | DBG(ISDN_DBG, "HFC-S USB: PH_ACTIVATE | INDICATION sent"); | 453 | DBG(ISDN_DBG, "HFC-S USB: PH_ACTIVATE | INDICATION sent"); |
454 | #endif | 454 | #endif |
455 | hfc->l1_activated = TRUE; | 455 | hfc->l1_activated = true; |
456 | handle_led(hfc, LED_S0_ON); | 456 | handle_led(hfc, LED_S0_ON); |
457 | } else if (state <= 3 /* && activated */ ) { | 457 | } else if (state <= 3 /* && activated */ ) { |
458 | if (old_state == 7 || old_state == 8) { | 458 | if (old_state == 7 || old_state == 8) { |
@@ -472,7 +472,7 @@ state_handler(hfcusb_data * hfc, __u8 state) | |||
472 | DBG(ISDN_DBG, | 472 | DBG(ISDN_DBG, |
473 | "HFC-S USB: PH_DEACTIVATE | INDICATION sent"); | 473 | "HFC-S USB: PH_DEACTIVATE | INDICATION sent"); |
474 | #endif | 474 | #endif |
475 | hfc->l1_activated = FALSE; | 475 | hfc->l1_activated = false; |
476 | handle_led(hfc, LED_S0_OFF); | 476 | handle_led(hfc, LED_S0_OFF); |
477 | } | 477 | } |
478 | } | 478 | } |
@@ -622,7 +622,7 @@ tx_iso_complete(struct urb *urb) | |||
622 | if (fifo->active && !status) { | 622 | if (fifo->active && !status) { |
623 | transp_mode = 0; | 623 | transp_mode = 0; |
624 | if (fifon < 4 && hfc->b_mode[fifon / 2] == L1_MODE_TRANS) | 624 | if (fifon < 4 && hfc->b_mode[fifon / 2] == L1_MODE_TRANS) |
625 | transp_mode = TRUE; | 625 | transp_mode = true; |
626 | 626 | ||
627 | /* is FifoFull-threshold set for our channel? */ | 627 | /* is FifoFull-threshold set for our channel? */ |
628 | threshbit = threshtable[fifon] & hfc->threshold_mask; | 628 | threshbit = threshtable[fifon] & hfc->threshold_mask; |
@@ -640,7 +640,7 @@ tx_iso_complete(struct urb *urb) | |||
640 | tx_iso_complete, urb->context); | 640 | tx_iso_complete, urb->context); |
641 | memset(context_iso_urb->buffer, 0, | 641 | memset(context_iso_urb->buffer, 0, |
642 | sizeof(context_iso_urb->buffer)); | 642 | sizeof(context_iso_urb->buffer)); |
643 | frame_complete = FALSE; | 643 | frame_complete = false; |
644 | /* Generate next Iso Packets */ | 644 | /* Generate next Iso Packets */ |
645 | for (k = 0; k < num_isoc_packets; ++k) { | 645 | for (k = 0; k < num_isoc_packets; ++k) { |
646 | if (fifo->skbuff) { | 646 | if (fifo->skbuff) { |
@@ -666,7 +666,7 @@ tx_iso_complete(struct urb *urb) | |||
666 | /* add 2 byte flags and 16bit CRC at end of ISDN frame */ | 666 | /* add 2 byte flags and 16bit CRC at end of ISDN frame */ |
667 | fifo->bit_line += 32; | 667 | fifo->bit_line += 32; |
668 | } | 668 | } |
669 | frame_complete = TRUE; | 669 | frame_complete = true; |
670 | } | 670 | } |
671 | 671 | ||
672 | memcpy(context_iso_urb->buffer + | 672 | memcpy(context_iso_urb->buffer + |
@@ -693,7 +693,7 @@ tx_iso_complete(struct urb *urb) | |||
693 | } | 693 | } |
694 | 694 | ||
695 | if (frame_complete) { | 695 | if (frame_complete) { |
696 | fifo->delete_flg = TRUE; | 696 | fifo->delete_flg = true; |
697 | fifo->hif->l1l2(fifo->hif, | 697 | fifo->hif->l1l2(fifo->hif, |
698 | PH_DATA | CONFIRM, | 698 | PH_DATA | CONFIRM, |
699 | (void *) (unsigned long) fifo->skbuff-> | 699 | (void *) (unsigned long) fifo->skbuff-> |
@@ -701,9 +701,9 @@ tx_iso_complete(struct urb *urb) | |||
701 | if (fifo->skbuff && fifo->delete_flg) { | 701 | if (fifo->skbuff && fifo->delete_flg) { |
702 | dev_kfree_skb_any(fifo->skbuff); | 702 | dev_kfree_skb_any(fifo->skbuff); |
703 | fifo->skbuff = NULL; | 703 | fifo->skbuff = NULL; |
704 | fifo->delete_flg = FALSE; | 704 | fifo->delete_flg = false; |
705 | } | 705 | } |
706 | frame_complete = FALSE; | 706 | frame_complete = false; |
707 | } | 707 | } |
708 | } | 708 | } |
709 | errcode = usb_submit_urb(urb, GFP_ATOMIC); | 709 | errcode = usb_submit_urb(urb, GFP_ATOMIC); |
@@ -837,7 +837,7 @@ collect_rx_frame(usb_fifo * fifo, __u8 * data, int len, int finish) | |||
837 | fifon = fifo->fifonum; | 837 | fifon = fifo->fifonum; |
838 | transp_mode = 0; | 838 | transp_mode = 0; |
839 | if (fifon < 4 && hfc->b_mode[fifon / 2] == L1_MODE_TRANS) | 839 | if (fifon < 4 && hfc->b_mode[fifon / 2] == L1_MODE_TRANS) |
840 | transp_mode = TRUE; | 840 | transp_mode = true; |
841 | 841 | ||
842 | if (!fifo->skbuff) { | 842 | if (!fifo->skbuff) { |
843 | fifo->skbuff = dev_alloc_skb(fifo->max_size + 3); | 843 | fifo->skbuff = dev_alloc_skb(fifo->max_size + 3); |
@@ -1176,7 +1176,7 @@ hfc_usb_l2l1(struct hisax_if *my_hisax_if, int pr, void *arg) | |||
1176 | if (fifo->skbuff && fifo->delete_flg) { | 1176 | if (fifo->skbuff && fifo->delete_flg) { |
1177 | dev_kfree_skb_any(fifo->skbuff); | 1177 | dev_kfree_skb_any(fifo->skbuff); |
1178 | fifo->skbuff = NULL; | 1178 | fifo->skbuff = NULL; |
1179 | fifo->delete_flg = FALSE; | 1179 | fifo->delete_flg = false; |
1180 | } | 1180 | } |
1181 | fifo->skbuff = arg; /* we have a new buffer */ | 1181 | fifo->skbuff = arg; /* we have a new buffer */ |
1182 | break; | 1182 | break; |
@@ -1262,8 +1262,8 @@ usb_init(hfcusb_data * hfc) | |||
1262 | hfc->b_mode[0] = L1_MODE_NULL; | 1262 | hfc->b_mode[0] = L1_MODE_NULL; |
1263 | hfc->b_mode[1] = L1_MODE_NULL; | 1263 | hfc->b_mode[1] = L1_MODE_NULL; |
1264 | 1264 | ||
1265 | hfc->l1_activated = FALSE; | 1265 | hfc->l1_activated = false; |
1266 | hfc->disc_flag = FALSE; | 1266 | hfc->disc_flag = false; |
1267 | hfc->led_state = 0; | 1267 | hfc->led_state = 0; |
1268 | hfc->led_new_data = 0; | 1268 | hfc->led_new_data = 0; |
1269 | hfc->old_led_state = 0; | 1269 | hfc->old_led_state = 0; |
@@ -1404,7 +1404,7 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1404 | 1404 | ||
1405 | /* check for config EOL element */ | 1405 | /* check for config EOL element */ |
1406 | while (validconf[cfg_used][0]) { | 1406 | while (validconf[cfg_used][0]) { |
1407 | cfg_found = TRUE; | 1407 | cfg_found = true; |
1408 | vcf = validconf[cfg_used]; | 1408 | vcf = validconf[cfg_used]; |
1409 | /* first endpoint descriptor */ | 1409 | /* first endpoint descriptor */ |
1410 | ep = iface->endpoint; | 1410 | ep = iface->endpoint; |
@@ -1426,7 +1426,7 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1426 | idx++; | 1426 | idx++; |
1427 | attr = ep->desc.bmAttributes; | 1427 | attr = ep->desc.bmAttributes; |
1428 | if (cmptbl[idx] == EP_NUL) { | 1428 | if (cmptbl[idx] == EP_NUL) { |
1429 | cfg_found = FALSE; | 1429 | cfg_found = false; |
1430 | } | 1430 | } |
1431 | if (attr == USB_ENDPOINT_XFER_INT | 1431 | if (attr == USB_ENDPOINT_XFER_INT |
1432 | && cmptbl[idx] == EP_INT) | 1432 | && cmptbl[idx] == EP_INT) |
@@ -1448,7 +1448,7 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1448 | "HFC-S USB: Interrupt Endpoint interval < %d found - skipping config", | 1448 | "HFC-S USB: Interrupt Endpoint interval < %d found - skipping config", |
1449 | vcf[17]); | 1449 | vcf[17]); |
1450 | #endif | 1450 | #endif |
1451 | cfg_found = FALSE; | 1451 | cfg_found = false; |
1452 | } | 1452 | } |
1453 | ep++; | 1453 | ep++; |
1454 | } | 1454 | } |
@@ -1456,7 +1456,7 @@ hfc_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
1456 | /* all entries must be EP_NOP or EP_NUL for a valid config */ | 1456 | /* all entries must be EP_NOP or EP_NUL for a valid config */ |
1457 | if (cmptbl[i] != EP_NOP | 1457 | if (cmptbl[i] != EP_NOP |
1458 | && cmptbl[i] != EP_NUL) | 1458 | && cmptbl[i] != EP_NUL) |
1459 | cfg_found = FALSE; | 1459 | cfg_found = false; |
1460 | } | 1460 | } |
1461 | if (cfg_found) { | 1461 | if (cfg_found) { |
1462 | if (cfg_used < small_match) { | 1462 | if (cfg_used < small_match) { |
@@ -1656,7 +1656,7 @@ hfc_usb_disconnect(struct usb_interface | |||
1656 | hfcusb_data *context = usb_get_intfdata(intf); | 1656 | hfcusb_data *context = usb_get_intfdata(intf); |
1657 | int i; | 1657 | int i; |
1658 | printk(KERN_INFO "HFC-S USB: device disconnect\n"); | 1658 | printk(KERN_INFO "HFC-S USB: device disconnect\n"); |
1659 | context->disc_flag = TRUE; | 1659 | context->disc_flag = true; |
1660 | usb_set_intfdata(intf, NULL); | 1660 | usb_set_intfdata(intf, NULL); |
1661 | if (!context) | 1661 | if (!context) |
1662 | return; | 1662 | return; |
diff --git a/drivers/isdn/hisax/hfc_usb.h b/drivers/isdn/hisax/hfc_usb.h index 6349367ed480..471f2354dfde 100644 --- a/drivers/isdn/hisax/hfc_usb.h +++ b/drivers/isdn/hisax/hfc_usb.h | |||
@@ -12,9 +12,6 @@ | |||
12 | 12 | ||
13 | #define VERBOSE_USB_DEBUG | 13 | #define VERBOSE_USB_DEBUG |
14 | 14 | ||
15 | #define TRUE 1 | ||
16 | #define FALSE 0 | ||
17 | |||
18 | 15 | ||
19 | /***********/ | 16 | /***********/ |
20 | /* defines */ | 17 | /* defines */ |