diff options
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/mux.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/serial/mux.c b/drivers/serial/mux.c index f5b17f5333fb..ea9cbda77965 100644 --- a/drivers/serial/mux.c +++ b/drivers/serial/mux.c | |||
@@ -83,19 +83,20 @@ static struct timer_list mux_timer; | |||
83 | */ | 83 | */ |
84 | static int __init get_mux_port_count(struct parisc_device *dev) | 84 | static int __init get_mux_port_count(struct parisc_device *dev) |
85 | { | 85 | { |
86 | int status; | ||
86 | u8 iodc_data[32]; | 87 | u8 iodc_data[32]; |
87 | unsigned long bytecnt; | 88 | unsigned long bytecnt; |
88 | 89 | ||
89 | int status = pdc_iodc_read(&bytecnt, dev->hpa.start, 0, iodc_data, 32); | ||
90 | BUG_ON(status != PDC_OK); | ||
91 | |||
92 | /* If this is the built-in Mux for the K-Class (Eole CAP/MUX), | 90 | /* If this is the built-in Mux for the K-Class (Eole CAP/MUX), |
93 | * we only need to allocate resources for 1 port since the | 91 | * we only need to allocate resources for 1 port since the |
94 | * other 7 ports are not connected. | 92 | * other 7 ports are not connected. |
95 | */ | 93 | */ |
96 | if(((iodc_data[0] << 4) | ((iodc_data[1] & 0xf0) >> 4)) == 0x15) | 94 | if(dev->id.hversion == 0x15) |
97 | return 1; | 95 | return 1; |
98 | 96 | ||
97 | status = pdc_iodc_read(&bytecnt, dev->hpa.start, 0, iodc_data, 32); | ||
98 | BUG_ON(status != PDC_OK); | ||
99 | |||
99 | /* Return the number of ports specified in the iodc data. */ | 100 | /* Return the number of ports specified in the iodc data. */ |
100 | return ((((iodc_data)[4] & 0xf0) >> 4) * 8) + 8; | 101 | return ((((iodc_data)[4] & 0xf0) >> 4) * 8) + 8; |
101 | } | 102 | } |