summaryrefslogtreecommitdiffstats
path: root/drivers/staging/sb105x/sb_pci_mp.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-01-09 10:12:14 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-17 16:43:20 -0800
commitc803dd48f0539cb6adcbbcf41c758502e1e102cb (patch)
treeb4d00deaf012755543025cd1a62ba87dc6daeda0 /drivers/staging/sb105x/sb_pci_mp.c
parent8441bf5e063e03e5d307ffb32fd5f77e81c0d397 (diff)
downloadlinux-c803dd48f0539cb6adcbbcf41c758502e1e102cb.tar.bz2
staging: sb105x: clean up interface type test
IIR_RS232 is zero so "if (IIR_RS232 == (b_ret & IIR_RS232))" is always true so RS232 was always chosen by default. The test should be "if (0 == (b_ret & 0x30)) { ". The other tests should also be in that format. This does change how the code works... If 0x30 is set then it now defaults to RS232 instead of RS485. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/sb105x/sb_pci_mp.c')
-rw-r--r--drivers/staging/sb105x/sb_pci_mp.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/staging/sb105x/sb_pci_mp.c b/drivers/staging/sb105x/sb_pci_mp.c
index c34ebff6bb04..3da44dff24bf 100644
--- a/drivers/staging/sb105x/sb_pci_mp.c
+++ b/drivers/staging/sb105x/sb_pci_mp.c
@@ -2851,18 +2851,12 @@ static void __init multi_init_ports(void)
printk("IIR_RET = %x\n",b_ret);
}
- if(IIR_RS232 == (b_ret & IIR_RS232))
- {
- mtpt->interface = RS232;
- }
- if(IIR_RS422 == (b_ret & IIR_RS422))
- {
+ /* default to RS232 */
+ mtpt->interface = RS232;
+ if (IIR_RS422 == (b_ret & IIR_TYPE_MASK))
mtpt->interface = RS422PTP;
- }
- if(IIR_RS485 == (b_ret & IIR_RS485))
- {
+ if (IIR_RS485 == (b_ret & IIR_TYPE_MASK))
mtpt->interface = RS485NE;
- }
}
}
}