linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / isdn / hysdn / boardergo.c
index 73afebd..e19a01a 100644 (file)
@@ -14,6 +14,7 @@
  *
  */
 
+#include <linux/config.h>
 #include <linux/sched.h>
 #include <linux/signal.h>
 #include <linux/kernel.h>
@@ -37,8 +38,8 @@ ergo_interrupt(int intno, void *dev_id, struct pt_regs *regs)
 {
        hysdn_card *card = dev_id;      /* parameter from irq */
        tErgDpram *dpr;
-       unsigned long flags;
-       unsigned char volatile b;
+       ulong flags;
+       uchar volatile b;
 
        if (!card)
                return IRQ_NONE;                /* error -> spurious interrupt */
@@ -76,7 +77,7 @@ ergo_irq_bh(hysdn_card * card)
 {
        tErgDpram *dpr;
        int again;
-       unsigned long flags;
+       ulong flags;
 
        if (card->state != CARD_STATE_RUN)
                return;         /* invalid call */
@@ -130,8 +131,8 @@ ergo_irq_bh(hysdn_card * card)
 static void
 ergo_stopcard(hysdn_card * card)
 {
-       unsigned long flags;
-       unsigned char val;
+       ulong flags;
+       uchar val;
 
        hysdn_net_release(card);        /* first release the net device if existing */
 #ifdef CONFIG_HYSDN_CAPI
@@ -156,7 +157,7 @@ ergo_stopcard(hysdn_card * card)
 static void
 ergo_set_errlog_state(hysdn_card * card, int on)
 {
-       unsigned long flags;
+       ulong flags;
 
        if (card->state != CARD_STATE_RUN) {
                card->err_log_state = ERRLOG_STATE_OFF;         /* must be off */
@@ -216,10 +217,9 @@ ergo_testram(hysdn_card * card)
 /* Negative return values are interpreted as errors.                         */
 /*****************************************************************************/
 static int
-ergo_writebootimg(struct HYSDN_CARD *card, unsigned char *buf,
-                       unsigned long offs)
+ergo_writebootimg(struct HYSDN_CARD *card, uchar * buf, ulong offs)
 {
-       unsigned char *dst;
+       uchar *dst;
        tErgDpram *dpram;
        int cnt = (BOOT_IMG_SIZE >> 2);         /* number of words to move and swap (byte order!) */
        
@@ -264,14 +264,14 @@ ergo_writebootimg(struct HYSDN_CARD *card, unsigned char *buf,
 /* case of errors a negative error value is returned.                           */
 /********************************************************************************/
 static int
-ergo_writebootseq(struct HYSDN_CARD *card, unsigned char *buf, int len)
+ergo_writebootseq(struct HYSDN_CARD *card, uchar * buf, int len)
 {
        tDpramBootSpooler *sp = (tDpramBootSpooler *) card->dpram;
-       unsigned char *dst;
-       unsigned char buflen;
+       uchar *dst;
+       uchar buflen;
        int nr_write;
-       unsigned char tmp_rdptr;
-       unsigned char wr_mirror;
+       uchar tmp_rdptr;
+       uchar wr_mirror;
        int i;
 
        if (card->debug_flags & LOG_POF_CARD)
@@ -330,7 +330,7 @@ ergo_waitpofready(struct HYSDN_CARD *card)
 {
        tErgDpram *dpr = card->dpram;   /* pointer to DPRAM structure */
        int timecnt = 10000 / 50;       /* timeout is 10 secs max. */
-       unsigned long flags;
+       ulong flags;
        int msg_size;
        int i;
 
@@ -345,7 +345,7 @@ ergo_waitpofready(struct HYSDN_CARD *card)
                        if ((dpr->ToPcChannel != CHAN_SYSTEM) ||
                            (dpr->ToPcSize < MIN_RDY_MSG_SIZE) ||
                            (dpr->ToPcSize > MAX_RDY_MSG_SIZE) ||
-                           ((*(unsigned long *) dpr->ToPcBuf) != RDY_MAGIC))
+                           ((*(ulong *) dpr->ToPcBuf) != RDY_MAGIC))
                                break;  /* an error occurred */
 
                        /* Check for additional data delivered during SysReady */
@@ -435,7 +435,7 @@ ergo_inithardware(hysdn_card * card)
        }
 
        ergo_stopcard(card);    /* disable interrupts */
-       if (request_irq(card->irq, ergo_interrupt, IRQF_SHARED, "HYSDN", card)) {
+       if (request_irq(card->irq, ergo_interrupt, SA_SHIRQ, "HYSDN", card)) {
                ergo_releasehardware(card); /* return the acquired hardware */
                return (-1);
        }