/*
* 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
*/
static char *adi_names[] = { "WingMan Extreme Digital", "ThunderPad Digital", "SideCar", "CyberMan 2",
- "WingMan Interceptor", "WingMan Formula", "WingMan GamePad",
- "WingMan Extreme Digital 3D", "WingMan GamePad Extreme",
+ "WingMan Interceptor", "WingMan Formula", "WingMan GamePad",
+ "WingMan Extreme Digital 3D", "WingMan GamePad Extreme",
"WingMan GamePad USB", "Unknown Device %#x" };
static char adi_wmgpe_abs[] = { ABS_X, ABS_Y, ABS_HAT0X, ABS_HAT0Y };
/*
* adi_move_bits() detects a possible 2-stream mode, and moves
- * the bits accordingly.
+ * the bits accordingly.
*/
static void adi_move_bits(struct adi_port *port, int length)
int i;
if ((adi->idx += count) > adi->ret) return 0;
for (i = 0; i < count; i++)
- bits |= ((adi->data[adi->idx - i] >> 5) & 1) << i;
+ bits |= ((adi->data[adi->idx - i] >> 5) & 1) << i;
return bits;
}
int i, t;
if (adi->ret < adi->length || adi->id != (adi_get_bits(adi, 4) | (adi_get_bits(adi, 4) << 4)))
- return -1;
+ return -1;
- for (i = 0; i < adi->axes10; i++)
+ for (i = 0; i < adi->axes10; i++)
input_report_abs(dev, *abs++, adi_get_bits(adi, 10));
- for (i = 0; i < adi->axes8; i++)
+ for (i = 0; i < adi->axes8; i++)
input_report_abs(dev, *abs++, adi_get_bits(adi, 8));
for (i = 0; i < adi->buttons && i < 63; i++) {
for (i = 63; i < adi->buttons; i++)
input_report_key(dev, *key++, adi_get_bits(adi, 1));
-
+
input_sync(dev);
return 0;
{
struct adi_port *port = dev->private;
if (!port->used++)
- mod_timer(&port->timer, jiffies + ADI_REFRESH_TIME);
+ mod_timer(&port->timer, jiffies + ADI_REFRESH_TIME);
return 0;
}
for (i = 0; seq[i]; i++) {
gameport_trigger(gameport);
- if (seq[i] > 0) wait_ms(seq[i]);
+ if (seq[i] > 0) msleep(seq[i]);
if (seq[i] < 0) mdelay(-seq[i]);
}
}
return;
if (adi->ret < (t = adi_get_bits(adi, 10))) {
- printk(KERN_WARNING "adi: Short ID packet: reported: %d != read: %d\n", t, adi->ret);
+ printk(KERN_WARNING "adi: Short ID packet: reported: %d != read: %d\n", t, adi->ret);
return;
}
adi_init_digital(gameport);
adi_read_packet(port);
-
+
if (port->adi[0].ret >= ADI_MIN_LEN_LENGTH)
adi_move_bits(port, adi_get_bits(port->adi, 10));
return;
}
- wait_ms(ADI_INIT_DELAY);
+ msleep(ADI_INIT_DELAY);
if (adi_read(port)) {
- wait_ms(ADI_DATA_DELAY);
+ msleep(ADI_DATA_DELAY);
adi_read(port);
}