ChangeSet 1.779, 2002/12/05 14:19:56-08:00, [EMAIL PROTECTED]

[PATCH] minor fixes for compile warnings in 2.4.20pre11 , usb-2.4 tree

this patch fixes some compile warnings with the 2.4.20pre11 tree.
The rtl8150.c does not compile on ppc32 because linux/init.h is missing,
but the driver uses __init.

The MSR_RI is the machine state register on ppc, it seems to be a modem
state register on the io edge port. The patch does just a rename, maybe
it can be done in a better way..


diff -Nru a/drivers/usb/hpusbscsi.c b/drivers/usb/hpusbscsi.c
--- a/drivers/usb/hpusbscsi.c   Thu Dec  5 14:48:48 2002
+++ b/drivers/usb/hpusbscsi.c   Thu Dec  5 14:48:48 2002
@@ -71,7 +71,7 @@
 
 #ifdef HPUSBSCSI_DEBUG
 #  define PDEBUG(level, fmt, args...) \
-          if (debug >= (level)) info("[" __PRETTY_FUNCTION__ ":%d] " fmt, __LINE__ , \
+          if (debug >= (level)) info("[%s:%d] " fmt, __PRETTY_FUNCTION__, __LINE__ , \
                  ## args)
 #else
 #  define PDEBUG(level, fmt, args...) do {} while(0)
diff -Nru a/drivers/usb/rtl8150.c b/drivers/usb/rtl8150.c
--- a/drivers/usb/rtl8150.c     Thu Dec  5 14:48:48 2002
+++ b/drivers/usb/rtl8150.c     Thu Dec  5 14:48:48 2002
@@ -7,6 +7,7 @@
  */
 
 #include <linux/config.h>
+#include <linux/init.h>
 #include <linux/sched.h>
 #include <linux/signal.h>
 #include <linux/slab.h>
diff -Nru a/drivers/usb/serial/io_16654.h b/drivers/usb/serial/io_16654.h
--- a/drivers/usb/serial/io_16654.h     Thu Dec  5 14:48:48 2002
+++ b/drivers/usb/serial/io_16654.h     Thu Dec  5 14:48:48 2002
@@ -142,14 +142,14 @@
 #define LSR_FIFO_ERR           0x80    // Rx Fifo contains at least 1 erred char
 
 
-#define MSR_DELTA_CTS          0x01    // CTS changed from last read
-#define MSR_DELTA_DSR          0x02    // DSR changed from last read
-#define MSR_DELTA_RI           0x04    // RI  changed from 0 -> 1
-#define MSR_DELTA_CD           0x08    // CD  changed from last read
-#define MSR_CTS                        0x10    // Current state of CTS
-#define MSR_DSR                        0x20    // Current state of DSR
-#define MSR_RI                 0x40    // Current state of RI
-#define MSR_CD                 0x80    // Current state of CD
+#define EDGEPORT_MSR_DELTA_CTS         0x01    // CTS changed from last read
+#define EDGEPORT_MSR_DELTA_DSR         0x02    // DSR changed from last read
+#define EDGEPORT_MSR_DELTA_RI          0x04    // RI  changed from 0 -> 1
+#define EDGEPORT_MSR_DELTA_CD          0x08    // CD  changed from last read
+#define EDGEPORT_MSR_CTS                       0x10    // Current state of CTS
+#define EDGEPORT_MSR_DSR                       0x20    // Current state of DSR
+#define EDGEPORT_MSR_RI                        0x40    // Current state of RI
+#define EDGEPORT_MSR_CD                        0x80    // Current state of CD
 
 
 
diff -Nru a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
--- a/drivers/usb/serial/io_edgeport.c  Thu Dec  5 14:48:48 2002
+++ b/drivers/usb/serial/io_edgeport.c  Thu Dec  5 14:48:48 2002
@@ -1790,10 +1790,10 @@
 
        result = ((mcr & MCR_DTR)       ? TIOCM_DTR: 0)   /* 0x002 */
                  | ((mcr & MCR_RTS)    ? TIOCM_RTS: 0)   /* 0x004 */
-                 | ((msr & MSR_CTS)    ? TIOCM_CTS: 0)   /* 0x020 */
-                 | ((msr & MSR_CD)     ? TIOCM_CAR: 0)   /* 0x040 */
-                 | ((msr & MSR_RI)     ? TIOCM_RI:  0)   /* 0x080 */
-                 | ((msr & MSR_DSR)    ? TIOCM_DSR: 0);  /* 0x100 */
+                 | ((msr & EDGEPORT_MSR_CTS)   ? TIOCM_CTS: 0)   /* 0x020 */
+                 | ((msr & EDGEPORT_MSR_CD)    ? TIOCM_CAR: 0)   /* 0x040 */
+                 | ((msr & EDGEPORT_MSR_RI)    ? TIOCM_RI:  0)   /* 0x080 */
+                 | ((msr & EDGEPORT_MSR_DSR)   ? TIOCM_DSR: 0);  /* 0x100 */
 
 
        dbg("%s -- %x", __FUNCTION__, result);
@@ -2219,20 +2219,20 @@
 
        dbg("%s %02x", __FUNCTION__, newMsr);
 
-       if (newMsr & (MSR_DELTA_CTS | MSR_DELTA_DSR | MSR_DELTA_RI | MSR_DELTA_CD)) {
+       if (newMsr & (EDGEPORT_MSR_DELTA_CTS | EDGEPORT_MSR_DELTA_DSR | 
+EDGEPORT_MSR_DELTA_RI | EDGEPORT_MSR_DELTA_CD)) {
                icount = &edge_port->icount;
 
                /* update input line counters */
-               if (newMsr & MSR_DELTA_CTS) {
+               if (newMsr & EDGEPORT_MSR_DELTA_CTS) {
                        icount->cts++;
                }
-               if (newMsr & MSR_DELTA_DSR) {
+               if (newMsr & EDGEPORT_MSR_DELTA_DSR) {
                        icount->dsr++;
                }
-               if (newMsr & MSR_DELTA_CD) {
+               if (newMsr & EDGEPORT_MSR_DELTA_CD) {
                        icount->dcd++;
                }
-               if (newMsr & MSR_DELTA_RI) {
+               if (newMsr & EDGEPORT_MSR_DELTA_RI) {
                        icount->rng++;
                }
                wake_up_interruptible(&edge_port->delta_msr_wait);
diff -Nru a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c
--- a/drivers/usb/serial/io_ti.c        Thu Dec  5 14:48:48 2002
+++ b/drivers/usb/serial/io_ti.c        Thu Dec  5 14:48:48 2002
@@ -1549,17 +1549,17 @@
 
        dbg ("%s - %02x", __FUNCTION__, msr);
 
-       if (msr & (MSR_DELTA_CTS | MSR_DELTA_DSR | MSR_DELTA_RI | MSR_DELTA_CD)) {
+       if (msr & (EDGEPORT_MSR_DELTA_CTS | EDGEPORT_MSR_DELTA_DSR | 
+EDGEPORT_MSR_DELTA_RI | EDGEPORT_MSR_DELTA_CD)) {
                icount = &edge_port->icount;
 
                /* update input line counters */
-               if (msr & MSR_DELTA_CTS)
+               if (msr & EDGEPORT_MSR_DELTA_CTS)
                        icount->cts++;
-               if (msr & MSR_DELTA_DSR)
+               if (msr & EDGEPORT_MSR_DELTA_DSR)
                        icount->dsr++;
-               if (msr & MSR_DELTA_CD)
+               if (msr & EDGEPORT_MSR_DELTA_CD)
                        icount->dcd++;
-               if (msr & MSR_DELTA_RI)
+               if (msr & EDGEPORT_MSR_DELTA_RI)
                        icount->rng++;
                wake_up_interruptible (&edge_port->delta_msr_wait);
        }
@@ -2416,10 +2416,10 @@
 
        result = ((mcr & MCR_DTR)       ? TIOCM_DTR: 0)   /* 0x002 */
                  | ((mcr & MCR_RTS)    ? TIOCM_RTS: 0)   /* 0x004 */
-                 | ((msr & MSR_CTS)    ? TIOCM_CTS: 0)   /* 0x020 */
-                 | ((msr & MSR_CD)     ? TIOCM_CAR: 0)   /* 0x040 */
-                 | ((msr & MSR_RI)     ? TIOCM_RI:  0)   /* 0x080 */
-                 | ((msr & MSR_DSR)    ? TIOCM_DSR: 0);  /* 0x100 */
+                 | ((msr & EDGEPORT_MSR_CTS)   ? TIOCM_CTS: 0)   /* 0x020 */
+                 | ((msr & EDGEPORT_MSR_CD)    ? TIOCM_CAR: 0)   /* 0x040 */
+                 | ((msr & EDGEPORT_MSR_RI)    ? TIOCM_RI:  0)   /* 0x080 */
+                 | ((msr & EDGEPORT_MSR_DSR)   ? TIOCM_DSR: 0);  /* 0x100 */
 
 
        dbg("%s -- %x", __FUNCTION__, result);
diff -Nru a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
--- a/drivers/usb/serial/keyspan.c      Thu Dec  5 14:48:48 2002
+++ b/drivers/usb/serial/keyspan.c      Thu Dec  5 14:48:48 2002
@@ -530,6 +530,7 @@
                dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
        }
 exit:
+       ;
 }
 
 static void    usa26_glocont_callback(struct urb *urb)
@@ -665,6 +666,7 @@
                dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
        }
 exit:  
+       ;
 }
 
 static void    usa28_glocont_callback(struct urb *urb)
@@ -758,6 +760,7 @@
                dbg("%s - resubmit read urb failed. (%d)", __FUNCTION__, err);
        }
 exit:  
+       ;
 }
 
 static void    usa49_inack_callback(struct urb *urb)


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to