* */
#include <linux/module.h>
+#include <linux/config.h>
#include <linux/kdev_t.h>
#include <asm/io.h>
#include <linux/kernel.h>
*
*/
-static const struct file_operations rio_fw_fops = {
+static struct file_operations rio_fw_fops = {
.owner = THIS_MODULE,
.ioctl = rio_fw_ioctl,
};
return !RIO_FAIL;
}
-void rio_copy_to_card(void *from, void __iomem *to, int len)
+void rio_copy_to_card(void *to, void *from, int len)
{
- rio_copy_toio(to, from, len);
+ rio_memcpy_toio(NULL, to, from, len);
}
int rio_minor(struct tty_struct *tty)
func_enter();
/* The "dev" argument isn't used. */
- rc = riocontrol(p, 0, cmd, arg, capable(CAP_SYS_ADMIN));
+ rc = riocontrol(p, 0, cmd, (void *) arg, capable(CAP_SYS_ADMIN));
func_exit();
return rc;
static int rio_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd, unsigned long arg)
{
- void __user *argp = (void __user *)arg;
int rc;
struct Port *PortP;
int ival;
rc = 0;
switch (cmd) {
case TIOCSSOFTCAR:
- if ((rc = get_user(ival, (unsigned __user *) argp)) == 0) {
+ if ((rc = get_user(ival, (unsigned int *) arg)) == 0) {
tty->termios->c_cflag = (tty->termios->c_cflag & ~CLOCAL) | (ival ? CLOCAL : 0);
}
break;
case TIOCGSERIAL:
rc = -EFAULT;
- if (access_ok(VERIFY_WRITE, argp, sizeof(struct serial_struct)))
- rc = gs_getserial(&PortP->gs, argp);
+ if (access_ok(VERIFY_WRITE, (void *) arg, sizeof(struct serial_struct)))
+ rc = gs_getserial(&PortP->gs, (struct serial_struct *) arg);
break;
case TCSBRK:
if (PortP->State & RIO_DELETED) {
break;
case TIOCSSERIAL:
rc = -EFAULT;
- if (access_ok(VERIFY_READ, argp, sizeof(struct serial_struct)))
- rc = gs_setserial(&PortP->gs, argp);
+ if (access_ok(VERIFY_READ, (void *) arg, sizeof(struct serial_struct)))
+ rc = gs_setserial(&PortP->gs, (struct serial_struct *) arg);
break;
default:
rc = -ENOIOCTLCMD;
static void fix_rio_pci(struct pci_dev *pdev)
{
unsigned long hwbase;
- unsigned char __iomem *rebase;
+ unsigned char *rebase;
unsigned int t;
#define CNTRL_REG_OFFSET 0x50
if (((1 << hp->Ivec) & rio_irqmask) == 0)
hp->Ivec = 0;
hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN);
- hp->CardP = (struct DpRam __iomem *) hp->Caddr;
+ hp->CardP = (struct DpRam *) hp->Caddr;
hp->Type = RIO_PCI;
hp->Copy = rio_copy_to_card;
hp->Mode = RIO_PCI_BOOT_FROM_RAM;
p->RIONumHosts++;
found++;
} else {
- iounmap(p->RIOHosts[p->RIONumHosts].Caddr);
+ iounmap((char *) (p->RIOHosts[p->RIONumHosts].Caddr));
}
}
hp->Ivec = 0;
hp->Ivec |= 0x8000; /* Mark as non-sharable */
hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN);
- hp->CardP = (struct DpRam __iomem *) hp->Caddr;
+ hp->CardP = (struct DpRam *) hp->Caddr;
hp->Type = RIO_PCI;
hp->Copy = rio_copy_to_card;
hp->Mode = RIO_PCI_BOOT_FROM_RAM;
p->RIONumHosts++;
found++;
} else {
- iounmap(p->RIOHosts[p->RIONumHosts].Caddr);
+ iounmap((char *) (p->RIOHosts[p->RIONumHosts].Caddr));
}
#else
printk(KERN_ERR "Found an older RIO PCI card, but the driver is not " "compiled to support it.\n");
/* There was something about the IRQs of these cards. 'Forget what.--REW */
hp->Ivec = 0;
hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN);
- hp->CardP = (struct DpRam __iomem *) hp->Caddr;
+ hp->CardP = (struct DpRam *) hp->Caddr;
hp->Type = RIO_AT;
hp->Copy = rio_copy_to_card; /* AT card PCI???? - PVDL
* -- YES! this is now a normal copy. Only the
}
if (!okboard)
- iounmap(hp->Caddr);
+ iounmap((char *) (hp->Caddr));
}
}
for (i = 0; i < p->RIONumHosts; i++) {
hp = &p->RIOHosts[i];
if (hp->Ivec) {
- int mode = IRQF_SHARED;
+ int mode = SA_SHIRQ;
if (hp->Ivec & 0x8000) {
mode = 0;
hp->Ivec &= 0x7fff;