diff options
author | hayeswang <hayeswang@realtek.com> | 2014-02-18 08:49:00 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-18 16:40:00 -0500 |
commit | b97027233db74a24eb3aca693ed3f85461c7f440 (patch) | |
tree | feec3dbbfe076bee4fd26d44c1275e893a50fb90 | |
parent | 00a5e360c54ada2fbd58bacbb1c1fd79d2fde80d (diff) |
r8152: replace some types from int to bool
Modify the following functions.
- r8153_u1u2en
- r8153_u2p3en
- r8153_power_cut_en
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/usb/r8152.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 2d5e76159ca7..4888e4f4dd8f 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c | |||
@@ -1989,7 +1989,7 @@ static void r8153_hw_phy_cfg(struct r8152 *tp) | |||
1989 | sram_write(tp, SRAM_10M_AMP2, data); | 1989 | sram_write(tp, SRAM_10M_AMP2, data); |
1990 | } | 1990 | } |
1991 | 1991 | ||
1992 | static void r8153_u1u2en(struct r8152 *tp, int enable) | 1992 | static void r8153_u1u2en(struct r8152 *tp, bool enable) |
1993 | { | 1993 | { |
1994 | u8 u1u2[8]; | 1994 | u8 u1u2[8]; |
1995 | 1995 | ||
@@ -2001,7 +2001,7 @@ static void r8153_u1u2en(struct r8152 *tp, int enable) | |||
2001 | usb_ocp_write(tp, USB_TOLERANCE, BYTE_EN_SIX_BYTES, sizeof(u1u2), u1u2); | 2001 | usb_ocp_write(tp, USB_TOLERANCE, BYTE_EN_SIX_BYTES, sizeof(u1u2), u1u2); |
2002 | } | 2002 | } |
2003 | 2003 | ||
2004 | static void r8153_u2p3en(struct r8152 *tp, int enable) | 2004 | static void r8153_u2p3en(struct r8152 *tp, bool enable) |
2005 | { | 2005 | { |
2006 | u32 ocp_data; | 2006 | u32 ocp_data; |
2007 | 2007 | ||
@@ -2013,7 +2013,7 @@ static void r8153_u2p3en(struct r8152 *tp, int enable) | |||
2013 | ocp_write_word(tp, MCU_TYPE_USB, USB_U2P3_CTRL, ocp_data); | 2013 | ocp_write_word(tp, MCU_TYPE_USB, USB_U2P3_CTRL, ocp_data); |
2014 | } | 2014 | } |
2015 | 2015 | ||
2016 | static void r8153_power_cut_en(struct r8152 *tp, int enable) | 2016 | static void r8153_power_cut_en(struct r8152 *tp, bool enable) |
2017 | { | 2017 | { |
2018 | u32 ocp_data; | 2018 | u32 ocp_data; |
2019 | 2019 | ||
@@ -2261,8 +2261,8 @@ static void rtl8152_down(struct r8152 *tp) | |||
2261 | 2261 | ||
2262 | static void rtl8153_down(struct r8152 *tp) | 2262 | static void rtl8153_down(struct r8152 *tp) |
2263 | { | 2263 | { |
2264 | r8153_u1u2en(tp, 0); | 2264 | r8153_u1u2en(tp, false); |
2265 | r8153_power_cut_en(tp, 0); | 2265 | r8153_power_cut_en(tp, false); |
2266 | r8153_disable_aldps(tp); | 2266 | r8153_disable_aldps(tp); |
2267 | r8153_enter_oob(tp); | 2267 | r8153_enter_oob(tp); |
2268 | r8153_enable_aldps(tp); | 2268 | r8153_enable_aldps(tp); |
@@ -2455,7 +2455,7 @@ static void r8153_init(struct r8152 *tp) | |||
2455 | u32 ocp_data; | 2455 | u32 ocp_data; |
2456 | int i; | 2456 | int i; |
2457 | 2457 | ||
2458 | r8153_u1u2en(tp, 0); | 2458 | r8153_u1u2en(tp, false); |
2459 | 2459 | ||
2460 | for (i = 0; i < 500; i++) { | 2460 | for (i = 0; i < 500; i++) { |
2461 | if (ocp_read_word(tp, MCU_TYPE_PLA, PLA_BOOT_CTRL) & | 2461 | if (ocp_read_word(tp, MCU_TYPE_PLA, PLA_BOOT_CTRL) & |
@@ -2471,7 +2471,7 @@ static void r8153_init(struct r8152 *tp) | |||
2471 | msleep(20); | 2471 | msleep(20); |
2472 | } | 2472 | } |
2473 | 2473 | ||
2474 | r8153_u2p3en(tp, 0); | 2474 | r8153_u2p3en(tp, false); |
2475 | 2475 | ||
2476 | ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_WDT11_CTRL); | 2476 | ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_WDT11_CTRL); |
2477 | ocp_data &= ~TIMER11_EN; | 2477 | ocp_data &= ~TIMER11_EN; |
@@ -2496,8 +2496,8 @@ static void r8153_init(struct r8152 *tp) | |||
2496 | ocp_data |= SEN_VAL_NORMAL | SEL_RXIDLE; | 2496 | ocp_data |= SEN_VAL_NORMAL | SEL_RXIDLE; |
2497 | ocp_write_word(tp, MCU_TYPE_USB, USB_AFE_CTRL2, ocp_data); | 2497 | ocp_write_word(tp, MCU_TYPE_USB, USB_AFE_CTRL2, ocp_data); |
2498 | 2498 | ||
2499 | r8153_power_cut_en(tp, 0); | 2499 | r8153_power_cut_en(tp, false); |
2500 | r8153_u1u2en(tp, 1); | 2500 | r8153_u1u2en(tp, true); |
2501 | 2501 | ||
2502 | r8153_first_init(tp); | 2502 | r8153_first_init(tp); |
2503 | 2503 | ||
@@ -2677,7 +2677,7 @@ static void rtl8152_unload(struct r8152 *tp) | |||
2677 | 2677 | ||
2678 | static void rtl8153_unload(struct r8152 *tp) | 2678 | static void rtl8153_unload(struct r8152 *tp) |
2679 | { | 2679 | { |
2680 | r8153_power_cut_en(tp, 1); | 2680 | r8153_power_cut_en(tp, true); |
2681 | } | 2681 | } |
2682 | 2682 | ||
2683 | static int rtl_ops_init(struct r8152 *tp, const struct usb_device_id *id) | 2683 | static int rtl_ops_init(struct r8152 *tp, const struct usb_device_id *id) |