aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhao, Gang <gamerh2o@gmail.com>2014-02-16 09:31:38 -0500
committerJohn W. Linville <linville@tuxdriver.com>2014-02-24 15:21:54 -0500
commit1a2b250bfe32c780fe371feff56c6bd6117097fa (patch)
treeea4d188491ab819fc5d36a261d26e7e7ad638a81
parentcc1ad9d267d336fcb50c26c9e3fe1a9b78302e78 (diff)
b43: return true / false instead of numbers in functions which return bool value
Signed-off-by: Zhao, Gang <gamerh2o@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/b43/debugfs.h2
-rw-r--r--drivers/net/wireless/b43/phy_common.c4
-rw-r--r--drivers/net/wireless/b43/pio.c10
3 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/wireless/b43/debugfs.h b/drivers/net/wireless/b43/debugfs.h
index 822aad8842f4..50517b801cb4 100644
--- a/drivers/net/wireless/b43/debugfs.h
+++ b/drivers/net/wireless/b43/debugfs.h
@@ -86,7 +86,7 @@ void b43_debugfs_log_txstat(struct b43_wldev *dev,
86 86
87static inline bool b43_debug(struct b43_wldev *dev, enum b43_dyndbg feature) 87static inline bool b43_debug(struct b43_wldev *dev, enum b43_dyndbg feature)
88{ 88{
89 return 0; 89 return false;
90} 90}
91 91
92static inline void b43_debugfs_init(void) 92static inline void b43_debugfs_init(void)
diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c
index f01676ac481b..dbaa51890198 100644
--- a/drivers/net/wireless/b43/phy_common.c
+++ b/drivers/net/wireless/b43/phy_common.c
@@ -133,9 +133,9 @@ void b43_phy_exit(struct b43_wldev *dev)
133bool b43_has_hardware_pctl(struct b43_wldev *dev) 133bool b43_has_hardware_pctl(struct b43_wldev *dev)
134{ 134{
135 if (!dev->phy.hardware_power_control) 135 if (!dev->phy.hardware_power_control)
136 return 0; 136 return false;
137 if (!dev->phy.ops->supports_hwpctl) 137 if (!dev->phy.ops->supports_hwpctl)
138 return 0; 138 return false;
139 return dev->phy.ops->supports_hwpctl(dev); 139 return dev->phy.ops->supports_hwpctl(dev);
140} 140}
141 141
diff --git a/drivers/net/wireless/b43/pio.c b/drivers/net/wireless/b43/pio.c
index a73ff8c9deb5..a4ff5e2a42b9 100644
--- a/drivers/net/wireless/b43/pio.c
+++ b/drivers/net/wireless/b43/pio.c
@@ -637,7 +637,7 @@ static bool pio_rx_frame(struct b43_pio_rxqueue *q)
637 637
638 ctl = b43_piorx_read32(q, B43_PIO8_RXCTL); 638 ctl = b43_piorx_read32(q, B43_PIO8_RXCTL);
639 if (!(ctl & B43_PIO8_RXCTL_FRAMERDY)) 639 if (!(ctl & B43_PIO8_RXCTL_FRAMERDY))
640 return 0; 640 return false;
641 b43_piorx_write32(q, B43_PIO8_RXCTL, 641 b43_piorx_write32(q, B43_PIO8_RXCTL,
642 B43_PIO8_RXCTL_FRAMERDY); 642 B43_PIO8_RXCTL_FRAMERDY);
643 for (i = 0; i < 10; i++) { 643 for (i = 0; i < 10; i++) {
@@ -651,7 +651,7 @@ static bool pio_rx_frame(struct b43_pio_rxqueue *q)
651 651
652 ctl = b43_piorx_read16(q, B43_PIO_RXCTL); 652 ctl = b43_piorx_read16(q, B43_PIO_RXCTL);
653 if (!(ctl & B43_PIO_RXCTL_FRAMERDY)) 653 if (!(ctl & B43_PIO_RXCTL_FRAMERDY))
654 return 0; 654 return false;
655 b43_piorx_write16(q, B43_PIO_RXCTL, 655 b43_piorx_write16(q, B43_PIO_RXCTL,
656 B43_PIO_RXCTL_FRAMERDY); 656 B43_PIO_RXCTL_FRAMERDY);
657 for (i = 0; i < 10; i++) { 657 for (i = 0; i < 10; i++) {
@@ -662,7 +662,7 @@ static bool pio_rx_frame(struct b43_pio_rxqueue *q)
662 } 662 }
663 } 663 }
664 b43dbg(q->dev->wl, "PIO RX timed out\n"); 664 b43dbg(q->dev->wl, "PIO RX timed out\n");
665 return 1; 665 return true;
666data_ready: 666data_ready:
667 667
668 /* Get the preamble (RX header) */ 668 /* Get the preamble (RX header) */
@@ -759,7 +759,7 @@ data_ready:
759 759
760 b43_rx(q->dev, skb, rxhdr); 760 b43_rx(q->dev, skb, rxhdr);
761 761
762 return 1; 762 return true;
763 763
764rx_error: 764rx_error:
765 if (err_msg) 765 if (err_msg)
@@ -769,7 +769,7 @@ rx_error:
769 else 769 else
770 b43_piorx_write16(q, B43_PIO_RXCTL, B43_PIO_RXCTL_DATARDY); 770 b43_piorx_write16(q, B43_PIO_RXCTL, B43_PIO_RXCTL_DATARDY);
771 771
772 return 1; 772 return true;
773} 773}
774 774
775void b43_pio_rx(struct b43_pio_rxqueue *q) 775void b43_pio_rx(struct b43_pio_rxqueue *q)