drm: add flag for mapping PCI DMA buffers read-only.
[safe/jmp/linux-2.6] / drivers / char / stallion.c
index ed7b8ea..5e2de62 100644 (file)
@@ -500,7 +500,7 @@ static int  stl_echatintr(stlbrd_t *brdp);
 static int     stl_echmcaintr(stlbrd_t *brdp);
 static int     stl_echpciintr(stlbrd_t *brdp);
 static int     stl_echpci64intr(stlbrd_t *brdp);
-static void    stl_offintr(void *private);
+static void    stl_offintr(struct work_struct *);
 static stlbrd_t *stl_allocbrd(void);
 static stlport_t *stl_getport(int brdnr, int panelnr, int portnr);
 
@@ -707,7 +707,7 @@ static unsigned int sc26198_baudtable[] = {
  *     Define the driver info for a user level control device. Used mainly
  *     to get at port stats - only not using the port device itself.
  */
-static struct file_operations  stl_fsiomem = {
+static const struct file_operations    stl_fsiomem = {
        .owner          = THIS_MODULE,
        .ioctl          = stl_memioctl,
 };
@@ -1927,13 +1927,12 @@ stl_readdone:
  *     calls off to the approrpriate board interrupt handlers.
  */
 
-static irqreturn_t stl_intr(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t stl_intr(int irq, void *dev_id)
 {
        stlbrd_t        *brdp = (stlbrd_t *) dev_id;
 
 #ifdef DEBUG
-       printk("stl_intr(brdp=%x,irq=%d,regs=%x)\n", (int) brdp, irq,
-           (int) regs);
+       printk("stl_intr(brdp=%x,irq=%d)\n", (int) brdp, irq);
 #endif
 
        return IRQ_RETVAL((* brdp->isr)(brdp));
@@ -2082,14 +2081,12 @@ static int stl_echpci64intr(stlbrd_t *brdp)
 /*
  *     Service an off-level request for some channel.
  */
-static void stl_offintr(void *private)
+static void stl_offintr(struct work_struct *work)
 {
-       stlport_t               *portp;
+       stlport_t               *portp = container_of(work, stlport_t, tqueue);
        struct tty_struct       *tty;
        unsigned int            oldsigs;
 
-       portp = private;
-
 #ifdef DEBUG
        printk("stl_offintr(portp=%x)\n", (int) portp);
 #endif
@@ -2157,7 +2154,7 @@ static int __init stl_initports(stlbrd_t *brdp, stlpanel_t *panelp)
                portp->baud_base = STL_BAUDBASE;
                portp->close_delay = STL_CLOSEDELAY;
                portp->closing_wait = 30 * HZ;
-               INIT_WORK(&portp->tqueue, stl_offintr, portp);
+               INIT_WORK(&portp->tqueue, stl_offintr);
                init_waitqueue_head(&portp->open_wait);
                init_waitqueue_head(&portp->close_wait);
                portp->stats.brd = portp->brdnr;
@@ -2993,7 +2990,7 @@ static int stl_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, uns
        return(rc);
 }
 
-static struct tty_operations stl_ops = {
+static const struct tty_operations stl_ops = {
        .open = stl_open,
        .close = stl_close,
        .write = stl_write,