diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-05-27 00:08:25 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2006-05-27 02:26:14 -0400 |
commit | d886cb586f60a5ccf156392f96a39bc52db925d0 (patch) | |
tree | 5862de796cf8dfd2f38e30d36cc589a07b5f9d88 /drivers/char/rio/rio_linux.c | |
parent | a8bd60705aa17a998516837d9c1e503ad4cbd7fc (diff) |
[PATCH] trivial annotations in rio
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/char/rio/rio_linux.c')
-rw-r--r-- | drivers/char/rio/rio_linux.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/char/rio/rio_linux.c b/drivers/char/rio/rio_linux.c index 78dd856534ce..39277e53d9a8 100644 --- a/drivers/char/rio/rio_linux.c +++ b/drivers/char/rio/rio_linux.c | |||
@@ -333,7 +333,7 @@ int RIODelay_ni(struct Port *PortP, int njiffies) | |||
333 | return !RIO_FAIL; | 333 | return !RIO_FAIL; |
334 | } | 334 | } |
335 | 335 | ||
336 | void rio_copy_to_card(void *to, void *from, int len) | 336 | void rio_copy_to_card(void __iomem *to, void *from, int len) |
337 | { | 337 | { |
338 | rio_memcpy_toio(NULL, to, from, len); | 338 | rio_memcpy_toio(NULL, to, from, len); |
339 | } | 339 | } |
@@ -573,7 +573,7 @@ static int rio_fw_ioctl(struct inode *inode, struct file *filp, unsigned int cmd | |||
573 | func_enter(); | 573 | func_enter(); |
574 | 574 | ||
575 | /* The "dev" argument isn't used. */ | 575 | /* The "dev" argument isn't used. */ |
576 | rc = riocontrol(p, 0, cmd, (void *) arg, capable(CAP_SYS_ADMIN)); | 576 | rc = riocontrol(p, 0, cmd, arg, capable(CAP_SYS_ADMIN)); |
577 | 577 | ||
578 | func_exit(); | 578 | func_exit(); |
579 | return rc; | 579 | return rc; |
@@ -583,6 +583,7 @@ extern int RIOShortCommand(struct rio_info *p, struct Port *PortP, int command, | |||
583 | 583 | ||
584 | static int rio_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd, unsigned long arg) | 584 | static int rio_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd, unsigned long arg) |
585 | { | 585 | { |
586 | void __user *argp = (void __user *)arg; | ||
586 | int rc; | 587 | int rc; |
587 | struct Port *PortP; | 588 | struct Port *PortP; |
588 | int ival; | 589 | int ival; |
@@ -594,14 +595,14 @@ static int rio_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd | |||
594 | rc = 0; | 595 | rc = 0; |
595 | switch (cmd) { | 596 | switch (cmd) { |
596 | case TIOCSSOFTCAR: | 597 | case TIOCSSOFTCAR: |
597 | if ((rc = get_user(ival, (unsigned int *) arg)) == 0) { | 598 | if ((rc = get_user(ival, (unsigned __user *) argp)) == 0) { |
598 | tty->termios->c_cflag = (tty->termios->c_cflag & ~CLOCAL) | (ival ? CLOCAL : 0); | 599 | tty->termios->c_cflag = (tty->termios->c_cflag & ~CLOCAL) | (ival ? CLOCAL : 0); |
599 | } | 600 | } |
600 | break; | 601 | break; |
601 | case TIOCGSERIAL: | 602 | case TIOCGSERIAL: |
602 | rc = -EFAULT; | 603 | rc = -EFAULT; |
603 | if (access_ok(VERIFY_WRITE, (void *) arg, sizeof(struct serial_struct))) | 604 | if (access_ok(VERIFY_WRITE, argp, sizeof(struct serial_struct))) |
604 | rc = gs_getserial(&PortP->gs, (struct serial_struct *) arg); | 605 | rc = gs_getserial(&PortP->gs, argp); |
605 | break; | 606 | break; |
606 | case TCSBRK: | 607 | case TCSBRK: |
607 | if (PortP->State & RIO_DELETED) { | 608 | if (PortP->State & RIO_DELETED) { |
@@ -631,8 +632,8 @@ static int rio_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd | |||
631 | break; | 632 | break; |
632 | case TIOCSSERIAL: | 633 | case TIOCSSERIAL: |
633 | rc = -EFAULT; | 634 | rc = -EFAULT; |
634 | if (access_ok(VERIFY_READ, (void *) arg, sizeof(struct serial_struct))) | 635 | if (access_ok(VERIFY_READ, argp, sizeof(struct serial_struct))) |
635 | rc = gs_setserial(&PortP->gs, (struct serial_struct *) arg); | 636 | rc = gs_setserial(&PortP->gs, argp); |
636 | break; | 637 | break; |
637 | default: | 638 | default: |
638 | rc = -ENOIOCTLCMD; | 639 | rc = -ENOIOCTLCMD; |
@@ -919,7 +920,7 @@ static void __exit rio_release_drivers(void) | |||
919 | static void fix_rio_pci(struct pci_dev *pdev) | 920 | static void fix_rio_pci(struct pci_dev *pdev) |
920 | { | 921 | { |
921 | unsigned long hwbase; | 922 | unsigned long hwbase; |
922 | unsigned char *rebase; | 923 | unsigned char __iomem *rebase; |
923 | unsigned int t; | 924 | unsigned int t; |
924 | 925 | ||
925 | #define CNTRL_REG_OFFSET 0x50 | 926 | #define CNTRL_REG_OFFSET 0x50 |
@@ -999,7 +1000,7 @@ static int __init rio_init(void) | |||
999 | if (((1 << hp->Ivec) & rio_irqmask) == 0) | 1000 | if (((1 << hp->Ivec) & rio_irqmask) == 0) |
1000 | hp->Ivec = 0; | 1001 | hp->Ivec = 0; |
1001 | hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN); | 1002 | hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN); |
1002 | hp->CardP = (struct DpRam *) hp->Caddr; | 1003 | hp->CardP = (struct DpRam __iomem *) hp->Caddr; |
1003 | hp->Type = RIO_PCI; | 1004 | hp->Type = RIO_PCI; |
1004 | hp->Copy = rio_copy_to_card; | 1005 | hp->Copy = rio_copy_to_card; |
1005 | hp->Mode = RIO_PCI_BOOT_FROM_RAM; | 1006 | hp->Mode = RIO_PCI_BOOT_FROM_RAM; |
@@ -1021,7 +1022,7 @@ static int __init rio_init(void) | |||
1021 | p->RIONumHosts++; | 1022 | p->RIONumHosts++; |
1022 | found++; | 1023 | found++; |
1023 | } else { | 1024 | } else { |
1024 | iounmap((char *) (p->RIOHosts[p->RIONumHosts].Caddr)); | 1025 | iounmap(p->RIOHosts[p->RIONumHosts].Caddr); |
1025 | } | 1026 | } |
1026 | } | 1027 | } |
1027 | 1028 | ||
@@ -1047,7 +1048,7 @@ static int __init rio_init(void) | |||
1047 | hp->Ivec = 0; | 1048 | hp->Ivec = 0; |
1048 | hp->Ivec |= 0x8000; /* Mark as non-sharable */ | 1049 | hp->Ivec |= 0x8000; /* Mark as non-sharable */ |
1049 | hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN); | 1050 | hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN); |
1050 | hp->CardP = (struct DpRam *) hp->Caddr; | 1051 | hp->CardP = (struct DpRam __iomem *) hp->Caddr; |
1051 | hp->Type = RIO_PCI; | 1052 | hp->Type = RIO_PCI; |
1052 | hp->Copy = rio_copy_to_card; | 1053 | hp->Copy = rio_copy_to_card; |
1053 | hp->Mode = RIO_PCI_BOOT_FROM_RAM; | 1054 | hp->Mode = RIO_PCI_BOOT_FROM_RAM; |
@@ -1070,7 +1071,7 @@ static int __init rio_init(void) | |||
1070 | p->RIONumHosts++; | 1071 | p->RIONumHosts++; |
1071 | found++; | 1072 | found++; |
1072 | } else { | 1073 | } else { |
1073 | iounmap((char *) (p->RIOHosts[p->RIONumHosts].Caddr)); | 1074 | iounmap(p->RIOHosts[p->RIONumHosts].Caddr); |
1074 | } | 1075 | } |
1075 | #else | 1076 | #else |
1076 | printk(KERN_ERR "Found an older RIO PCI card, but the driver is not " "compiled to support it.\n"); | 1077 | printk(KERN_ERR "Found an older RIO PCI card, but the driver is not " "compiled to support it.\n"); |
@@ -1085,7 +1086,7 @@ static int __init rio_init(void) | |||
1085 | /* There was something about the IRQs of these cards. 'Forget what.--REW */ | 1086 | /* There was something about the IRQs of these cards. 'Forget what.--REW */ |
1086 | hp->Ivec = 0; | 1087 | hp->Ivec = 0; |
1087 | hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN); | 1088 | hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN); |
1088 | hp->CardP = (struct DpRam *) hp->Caddr; | 1089 | hp->CardP = (struct DpRam __iomem *) hp->Caddr; |
1089 | hp->Type = RIO_AT; | 1090 | hp->Type = RIO_AT; |
1090 | hp->Copy = rio_copy_to_card; /* AT card PCI???? - PVDL | 1091 | hp->Copy = rio_copy_to_card; /* AT card PCI???? - PVDL |
1091 | * -- YES! this is now a normal copy. Only the | 1092 | * -- YES! this is now a normal copy. Only the |
@@ -1111,7 +1112,7 @@ static int __init rio_init(void) | |||
1111 | } | 1112 | } |
1112 | 1113 | ||
1113 | if (!okboard) | 1114 | if (!okboard) |
1114 | iounmap((char *) (hp->Caddr)); | 1115 | iounmap(hp->Caddr); |
1115 | } | 1116 | } |
1116 | } | 1117 | } |
1117 | 1118 | ||