/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ *
* Should you need to contact me, the author, you can do so either by
* e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
* Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
#include <linux/ioport.h>
#include <linux/config.h>
#include <linux/init.h>
+#include <linux/delay.h>
#include <linux/gameport.h>
#include <linux/slab.h>
#include <linux/pnp.h>
char phys[32];
char name[32];
};
-
+
static LIST_HEAD(ns558_list);
/*
i = 0;
goto out;
}
- wait_ms(3);
+ msleep(3);
/*
* After some time (4ms) the axes shouldn't change anymore.
*/
i = 0;
goto out;
}
-/*
+/*
* And now find the number of mirrors of the port.
*/
outb(0xff, io & (-1 << i));
for (j = b = 0; j < 1000; j++)
if (inb(io & (-1 << i)) != inb((io & (-1 << i)) + (1 << i) - 1)) b++;
- wait_ms(3);
+ msleep(3);
if (b > 300) { /* We allow 30% difference */
release_region(io & (-1 << i), (1 << i));
release_region(port->gameport.io & ~(port->size - 1), port->size);
kfree(port);
break;
-
+
default:
break;
}