aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/irda/w83977af_ir.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/irda/w83977af_ir.c')
-rw-r--r--drivers/net/irda/w83977af_ir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c
index 0ea65c4c6f85..8421597072a7 100644
--- a/drivers/net/irda/w83977af_ir.c
+++ b/drivers/net/irda/w83977af_ir.c
@@ -117,7 +117,7 @@ static int __init w83977af_init(void)
117 117
118 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 118 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
119 119
120 for (i=0; (io[i] < 2000) && (i < 4); i++) { 120 for (i=0; (io[i] < 2000) && (i < ARRAY_SIZE(dev_self)); i++) {
121 if (w83977af_open(i, io[i], irq[i], dma[i]) == 0) 121 if (w83977af_open(i, io[i], irq[i], dma[i]) == 0)
122 return 0; 122 return 0;
123 } 123 }
@@ -136,7 +136,7 @@ static void __exit w83977af_cleanup(void)
136 136
137 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 137 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ );
138 138
139 for (i=0; i < 4; i++) { 139 for (i=0; i < ARRAY_SIZE(dev_self); i++) {
140 if (dev_self[i]) 140 if (dev_self[i])
141 w83977af_close(dev_self[i]); 141 w83977af_close(dev_self[i]);
142 } 142 }