aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hamradio/dmascc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/hamradio/dmascc.c')
-rw-r--r--drivers/net/hamradio/dmascc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c
index 950f3bb21f9d..52b14256e2c0 100644
--- a/drivers/net/hamradio/dmascc.c
+++ b/drivers/net/hamradio/dmascc.c
@@ -32,6 +32,7 @@
32#include <linux/kernel.h> 32#include <linux/kernel.h>
33#include <linux/mm.h> 33#include <linux/mm.h>
34#include <linux/netdevice.h> 34#include <linux/netdevice.h>
35#include <linux/slab.h>
35#include <linux/rtnetlink.h> 36#include <linux/rtnetlink.h>
36#include <linux/sockios.h> 37#include <linux/sockios.h>
37#include <linux/workqueue.h> 38#include <linux/workqueue.h>
@@ -331,8 +332,8 @@ static int __init dmascc_init(void)
331 for (i = 0; i < MAX_NUM_DEVS && io[i]; i++) { 332 for (i = 0; i < MAX_NUM_DEVS && io[i]; i++) {
332 j = (io[i] - 333 j = (io[i] -
333 hw[h].io_region) / hw[h].io_delta; 334 hw[h].io_region) / hw[h].io_delta;
334 if (j >= 0 && j < hw[h].num_devs 335 if (j >= 0 && j < hw[h].num_devs &&
335 && hw[h].io_region + 336 hw[h].io_region +
336 j * hw[h].io_delta == io[i]) { 337 j * hw[h].io_delta == io[i]) {
337 base[j] = io[i]; 338 base[j] = io[i];
338 } 339 }
@@ -396,8 +397,8 @@ static int __init dmascc_init(void)
396 t_val = 397 t_val =
397 inb(t1[i]) + (inb(t1[i]) << 8); 398 inb(t1[i]) + (inb(t1[i]) << 8);
398 /* Also check whether counter did wrap */ 399 /* Also check whether counter did wrap */
399 if (t_val == 0 400 if (t_val == 0 ||
400 || t_val > TMR_0_HZ / HZ * 10) 401 t_val > TMR_0_HZ / HZ * 10)
401 counting[i] = 0; 402 counting[i] = 0;
402 delay[i] = jiffies - start[i]; 403 delay[i] = jiffies - start[i];
403 } 404 }