projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d4dde5
)
usb: pegasus: cleanup a couple conditions
author
Dan Carpenter
<dan.carpenter@oracle.com>
Fri, 23 Dec 2011 00:44:36 +0000
(
00:44
+0000)
committer
David S. Miller
<davem@davemloft.net>
Fri, 23 Dec 2011 21:51:18 +0000
(16:51 -0500)
We recently made loopback a bool type instead of an int, so the bitwise
AND is redundent.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/pegasus.c
patch
|
blob
|
history
diff --git
a/drivers/net/usb/pegasus.c
b/drivers/net/usb/pegasus.c
index 908b42710399589dedafb60c51e13430be906606..5d99b8cacd7d01065007f625459edc2329e46e8a 100644
(file)
--- a/
drivers/net/usb/pegasus.c
+++ b/
drivers/net/usb/pegasus.c
@@
-517,7
+517,7
@@
static inline int reset_mac(pegasus_t *pegasus)
for (i = 0; i < REG_TIMEOUT; i++) {
get_registers(pegasus, EthCtrl1, 1, &data);
if (~data & 0x08) {
- if (loopback
& 1
)
+ if (loopback)
break;
if (mii_mode && (pegasus->features & HAS_HOME_PNA))
set_register(pegasus, Gpio1, 0x34);
@@
-561,7
+561,7
@@
static int enable_net_traffic(struct net_device *dev, struct usb_device *usb)
data[1] |= 0x10; /* set 100 Mbps */
if (mii_mode)
data[1] = 0;
- data[2] =
(loopback & 1)
? 0x09 : 0x01;
+ data[2] =
loopback
? 0x09 : 0x01;
memcpy(pegasus->eth_regs, data, sizeof(data));
ret = set_registers(pegasus, EthCtrl0, 3, data);