*
* */
-
-#define RCS_ID "$Id: rio.c,v 1.1 1999/07/11 10:13:54 wolff Exp wolff $"
-#define RCS_REV "$Revision: 1.1 $"
-
-
#include <linux/module.h>
#include <linux/config.h>
#include <linux/kdev_t.h>
unsigned int cmd, unsigned long arg);
static int rio_init_drivers(void);
-void my_hd (void *addr, int len);
+static void my_hd (void *addr, int len);
static struct tty_driver *rio_driver, *rio_driver2;
sources use all over the place. */
struct rio_info *p;
-/* struct rio_board boards[RIO_HOSTS]; */
-struct rio_port *rio_ports;
-
-int rio_initialized;
-int rio_nports;
int rio_debug;
- Set rio_poll to 1 to poll every timer tick (10ms on Intel).
This is used when the card cannot use an interrupt for some reason.
*/
-int rio_poll = 1;
+static int rio_poll = 1;
/* These are the only open spaces in my computer. Yours may have more
or less.... */
-int rio_probe_addrs[]= {0xc0000, 0xd0000, 0xe0000};
+static int rio_probe_addrs[]= {0xc0000, 0xd0000, 0xe0000};
#define NR_RIO_ADDRS (sizeof(rio_probe_addrs)/sizeof (int))
MODULE_AUTHOR("Rogier Wolff <R.E.Wolff@bitwizard.nl>, Patrick van de Lageweg <patrick@bitwizard.nl>");
MODULE_DESCRIPTION("RIO driver");
MODULE_LICENSE("GPL");
-MODULE_PARM(rio_poll, "i");
-MODULE_PARM(rio_debug, "i");
-MODULE_PARM(rio_irqmask, "i");
+module_param(rio_poll, int, 0);
+module_param(rio_debug, int, 0644);
+module_param(rio_irqmask, long, 0);
static struct real_driver rio_real_driver = {
rio_disable_tx_interrupts,
.ioctl = rio_fw_ioctl,
};
-struct miscdevice rio_fw_device = {
+static struct miscdevice rio_fw_device = {
RIOCTL_MISC_MINOR, "rioctl", &rio_fw_fops
};
#ifdef DEBUG
-void my_hd (void *ad, int len)
+static void my_hd (void *ad, int len)
{
int i, j, ch;
unsigned char *addr = ad;
func_enter ();
rio_dprintk (RIO_DEBUG_DELAY, "delaying %d jiffies\n", njiffies);
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(njiffies);
+ msleep_interruptible(jiffies_to_msecs(njiffies));
func_exit();
if (signal_pending(current))
func_enter ();
rio_dprintk (RIO_DEBUG_DELAY, "delaying %d jiffies (ni)\n", njiffies);
- current->state = TASK_UNINTERRUPTIBLE;
- schedule_timeout(njiffies);
+ msleep(jiffies_to_msecs(njiffies));
func_exit();
return !RIO_FAIL;
}
}
-void rio_reset_interrupt (struct Host *HostP)
+static void rio_reset_interrupt (struct Host *HostP)
{
func_enter();
* ********************************************************************** */
-struct vpd_prom *get_VPD_PROM (struct Host *hp)
+static struct vpd_prom *get_VPD_PROM (struct Host *hp)
{
static struct vpd_prom vpdp;
char *p;
port->gs.close_delay = HZ/2;
port->gs.closing_wait = 30 * HZ;
port->gs.rd = &rio_real_driver;
- port->portSem = SPIN_LOCK_UNLOCKED;
+ spin_lock_init(&port->portSem);
/*
* Initializing wait queue
*/
EEprom. As the bit is read/write for the CPU, we can fix it here,
if we detect that it isn't set correctly. -- REW */
-void fix_rio_pci (struct pci_dev *pdev)
+static void fix_rio_pci (struct pci_dev *pdev)
{
unsigned int hwbase;
unsigned long rebase;
hp->Type = RIO_PCI;
hp->Copy = rio_pcicopy;
hp->Mode = RIO_PCI_BOOT_FROM_RAM;
- hp->HostLock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init(&hp->HostLock);
rio_reset_interrupt (hp);
rio_start_card_running (hp);
hp->Type = RIO_PCI;
hp->Copy = rio_pcicopy;
hp->Mode = RIO_PCI_BOOT_FROM_RAM;
- hp->HostLock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init(&hp->HostLock);
rio_dprintk (RIO_DEBUG_PROBE, "Ivec: %x\n", hp->Ivec);
rio_dprintk (RIO_DEBUG_PROBE, "Mode: %x\n", hp->Mode);
* Moreover, the ISA card will work with the
* special PCI copy anyway. -- REW */
hp->Mode = 0;
- hp->HostLock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init(&hp->HostLock);
vpdp = get_VPD_PROM (hp);
rio_dprintk (RIO_DEBUG_PROBE, "Got VPD ROM\n");