]> git.hungrycats.org Git - linux/commitdiff
[PATCH] get rid of some kdevname abuse
authorChristoph Hellwig <hch@sgi.com>
Wed, 19 Feb 2003 09:07:20 +0000 (01:07 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Wed, 19 Feb 2003 09:07:20 +0000 (01:07 -0800)
Use cdevname instead in the serial driver printk cut & pasted into about
a dozend places.

20 files changed:
arch/mips/au1000/common/serial.c
arch/mips/baget/vacserial.c
arch/ppc/8260_io/uart.c
arch/ppc/8xx_io/uart.c
drivers/char/amiserial.c
drivers/char/cyclades.c
drivers/char/esp.c
drivers/char/ip2main.c
drivers/char/isicom.c
drivers/char/pcmcia/synclink_cs.c
drivers/char/rio/rio_linux.c
drivers/char/riscom8.c
drivers/char/specialix.c
drivers/char/sx.c
drivers/char/synclink.c
drivers/char/synclinkmp.c
drivers/char/tpqic02.c
drivers/char/tty_io.c
drivers/sbus/char/aurora.c
drivers/serial/68360serial.c

index 52438fc03f935eb0a14ef2fff8b5e5064c29aeed..64d0ae0299edb4fcf70dbca185f062027e15d180 100644 (file)
@@ -195,7 +195,7 @@ static struct termios *serial_termios_locked[NR_PORTS];
 
 #if defined(MODULE) && defined(SERIAL_DEBUG_MCOUNT)
 #define DBG_CNT(s) printk("(%s): [%x] refc=%d, serc=%d, ttyc=%d -> %s\n", \
- kdevname(tty->device), (info->flags), serial_refcount,info->count,tty->count,s)
+ cdevname(tty->device), (info->flags), serial_refcount,info->count,tty->count,s)
 #else
 #define DBG_CNT(s)
 #endif
@@ -227,11 +227,11 @@ static inline int serial_paranoia_check(struct async_struct *info,
                "Warning: null async_struct for (%s) in %s\n";
 
        if (!info) {
-               printk(badinfo, kdevname(device), routine);
+               printk(badinfo, cdevname(device), routine);
                return 1;
        }
        if (info->magic != SERIAL_MAGIC) {
-               printk(badmagic, kdevname(device), routine);
+               printk(badmagic, cdevname(device), routine);
                return 1;
        }
 #endif
index 26da0aa7b85ad905df0849eef7acd7eb9857622f..5d3a5374408b2d88639c70461c1661e191218886 100644 (file)
@@ -29,7 +29,7 @@
   
 #if defined(MODULE) && defined(SERIAL_DEBUG_MCOUNT)
 #define DBG_CNT(s) baget_printk("(%s):[%x] refc=%d, serc=%d, ttyc=%d-> %s\n", \
-  kdevname(tty->device),(info->flags),serial_refcount,info->count,tty->count,s)
+  cdevname(tty->device),(info->flags),serial_refcount,info->count,tty->count,s)
 #else
 #define DBG_CNT(s)
 #endif
@@ -173,11 +173,11 @@ static inline int serial_paranoia_check(struct async_struct *info,
                "Warning: null async_struct for (%s) in %s\n";
 
        if (!info) {
-               printk(badinfo, kdevname(device), routine);
+               printk(badinfo, cdevname(device), routine);
                return 1;
        }
        if (info->magic != SERIAL_MAGIC) {
-               printk(badmagic, kdevname(device), routine);
+               printk(badmagic, cdevname(device), routine);
                return 1;
        }
 #endif
index 4633b43f381bd3a1749b19773d8aad41ab8d6086..f7fecd25612f8532648a1046a5d336fb40e02532 100644 (file)
@@ -227,11 +227,11 @@ static inline int serial_paranoia_check(ser_info_t *info,
                "Warning: null async_struct for (%s) in %s\n";
 
        if (!info) {
-               printk(badinfo, kdevname(device), routine);
+               printk(badinfo, cdevname(device), routine);
                return 1;
        }
        if (info->magic != SERIAL_MAGIC) {
-               printk(badmagic, kdevname(device), routine);
+               printk(badmagic, cdevname(device), routine);
                return 1;
        }
 #endif
index 690c4e501aa9b35ca670c57e2a701652176009c1..5d13e6393dbbdaea3f8457db9dac4289df81d239 100644 (file)
@@ -242,11 +242,11 @@ static inline int serial_paranoia_check(ser_info_t *info,
                "Warning: null async_struct for (%s) in %s\n";
 
        if (!info) {
-               printk(badinfo, kdevname(device), routine);
+               printk(badinfo, cdevname(device), routine);
                return 1;
        }
        if (info->magic != SERIAL_MAGIC) {
-               printk(badmagic, kdevname(device), routine);
+               printk(badmagic, cdevname(device), routine);
                return 1;
        }
 #endif
index ed775912bac905aad4eb573d1b3d1acb0486e9a5..ab621dbb77dcaddba1d5405dbba95b1df9e0aed6 100644 (file)
@@ -50,7 +50,7 @@
   
 #if defined(MODULE) && defined(SERIAL_DEBUG_MCOUNT)
 #define DBG_CNT(s) printk("(%s): [%x] refc=%d, serc=%d, ttyc=%d -> %s\n", \
- kdevname(tty->device), (info->flags), serial_refcount,info->count,tty->count,s)
+ cdevname(tty->device), (info->flags), serial_refcount,info->count,tty->count,s)
 #else
 #define DBG_CNT(s)
 #endif
@@ -164,11 +164,11 @@ static inline int serial_paranoia_check(struct async_struct *info,
                "Warning: null async_struct for (%s) in %s\n";
 
        if (!info) {
-               printk(badinfo, kdevname(device), routine);
+               printk(badinfo, cdevname(device), routine);
                return 1;
        }
        if (info->magic != SERIAL_MAGIC) {
-               printk(badmagic, kdevname(device), routine);
+               printk(badmagic, cdevname(device), routine);
                return 1;
        }
 #endif
index 9842c7a62afd729e10fca58bf23bb1affd489e96..181c84c9760efe27289d7390b5407a06d9c2af41 100644 (file)
@@ -903,18 +903,18 @@ serial_paranoia_check(struct cyclades_port *info,
         "cyc Warning: cyclades_port out of range for (%s) in %s\n";
 
     if (!info) {
-        printk(badinfo, kdevname(device), routine);
+        printk(badinfo, cdevname(device), routine);
         return 1;
     }
 
     if( (long)info < (long)(&cy_port[0])
     || (long)(&cy_port[NR_PORTS]) < (long)info ){
-        printk(badrange, kdevname(device), routine);
+        printk(badrange, cdevname(device), routine);
         return 1;
     }
 
     if (info->magic != CYCLADES_MAGIC) {
-        printk(badmagic, kdevname(device), routine);
+        printk(badmagic, cdevname(device), routine);
         return 1;
     }
 #endif
index 726f659b96fb9bf2bf6673e0ed36e3a53d0085c0..3f5021d4b86fccbf841f47f82ac836379782f832 100644 (file)
@@ -135,7 +135,7 @@ static int serial_refcount;
   
 #if defined(MODULE) && defined(SERIAL_DEBUG_MCOUNT)
 #define DBG_CNT(s) printk("(%s): [%x] refc=%d, serc=%d, ttyc=%d -> %s\n", \
- kdevname(tty->device), (info->flags), serial_refcount,info->count,tty->count,s)
+ cdevname(tty->device), (info->flags), serial_refcount,info->count,tty->count,s)
 #else
 #define DBG_CNT(s)
 #endif
@@ -184,11 +184,11 @@ static inline int serial_paranoia_check(struct esp_struct *info,
                "Warning: null esp_struct for (%s) in %s\n";
 
        if (!info) {
-               printk(badinfo, kdevname(device), routine);
+               printk(badinfo, cdevname(device), routine);
                return 1;
        }
        if (info->magic != ESP_MAGIC) {
-               printk(badmagic, kdevname(device), routine);
+               printk(badmagic, cdevname(device), routine);
                return 1;
        }
 #endif
index 7ca1e640b7cc8bc96226ddf947b15a0b3292f8f0..45aed6f25cf46b782447b8f379af1559a7de29e5 100644 (file)
@@ -366,7 +366,7 @@ static int tracewrap;
 
 #if defined(MODULE) && defined(IP2DEBUG_OPEN)
 #define DBG_CNT(s) printk(KERN_DEBUG "(%s): [%x] refc=%d, ttyc=%d, modc=%x -> %s\n", \
-                   kdevname(tty->device),(pCh->flags),ref_count, \
+                   cdevname(tty->device),(pCh->flags),ref_count, \
                    tty->count,/*GET_USE_COUNT(module)*/0,s)
 #else
 #define DBG_CNT(s)
index fa7143f6f824f4a62b2d91a6621b88b06853607a..11851a8ad1e43b77c7f99973ce54547e22a1d21f 100644 (file)
@@ -347,11 +347,11 @@ static inline int isicom_paranoia_check(struct isi_port const * port, kdev_t dev
        static const char * badport = 
                        KERN_WARNING "ISICOM: Warning: NULL isicom port for dev %s in %s.\n";           
        if (!port) {
-               printk(badport, kdevname(dev), routine);
+               printk(badport, cdevname(dev), routine);
                return 1;
        }
        if (port->magic != ISICOM_MAGIC) {
-               printk(badmagic, kdevname(dev), routine);
+               printk(badmagic, cdevname(dev), routine);
                return 1;
        }       
 #endif 
index b687a9508f504e0e14c8be388dd83096b0f023bc..478df388a7cfb679971cdd1190da388177c8a5e2 100644 (file)
@@ -860,11 +860,11 @@ static inline int mgslpc_paranoia_check(MGSLPC_INFO *info,
                "Warning: null mgslpc_info for (%s) in %s\n";
 
        if (!info) {
-               printk(badinfo, kdevname(device), routine);
+               printk(badinfo, cdevname(device), routine);
                return 1;
        }
        if (info->magic != MGSLPC_MAGIC) {
-               printk(badmagic, kdevname(device), routine);
+               printk(badmagic, cdevname(device), routine);
                return 1;
        }
 #endif
index 64592553af38f54cec4a5f9e7c8d8585aa0575ef..418be1ff84b87c2386599ad6581262f312cf99b4 100644 (file)
@@ -302,11 +302,11 @@ static inline int rio_paranoia_check(struct rio_port const * port,
     KERN_ERR "rio: Warning: null rio port for device %s in %s\n";
  
   if (!port) {
-    printk (badinfo, kdevname(device), routine);
+    printk (badinfo, cdevname(device), routine);
     return 1;
   }
   if (port->magic != RIO_MAGIC) {
-    printk (badmagic, kdevname(device), routine);
+    printk (badmagic, cdevname(device), routine);
     return 1;
   }
 
index 501534e6a10991b727ead77e40e7a14918aef57f..1522f1f82f9fdb94fffc7a52c5829f37f6172808 100644 (file)
@@ -140,11 +140,11 @@ static inline int rc_paranoia_check(struct riscom_port const * port,
                "rc: Warning: null riscom port for device %s in %s\n";
 
        if (!port) {
-               printk(badinfo, kdevname(device), routine);
+               printk(badinfo, cdevname(device), routine);
                return 1;
        }
        if (port->magic != RISCOM8_MAGIC) {
-               printk(badmagic, kdevname(device), routine);
+               printk(badmagic, cdevname(device), routine);
                return 1;
        }
 #endif
index b2ffbcbd4a04918c7aa1d29ddbca67df7d417e5f..98b3dbb07e74d66819033b8da38409af7cc86dba 100644 (file)
@@ -219,11 +219,11 @@ static inline int sx_paranoia_check(struct specialix_port const * port,
                KERN_ERR "sx: Warning: null specialix port for device %s in %s\n";
  
        if (!port) {
-               printk(badinfo, kdevname(device), routine);
+               printk(badinfo, cdevname(device), routine);
                return 1;
        }
        if (port->magic != SPECIALIX_MAGIC) {
-               printk(badmagic, kdevname(device), routine);
+               printk(badmagic, cdevname(device), routine);
                return 1;
        }
 #endif
index 117aff1f56d6246529dd52ccb5cbe7032952c631..445a73d134f891bec6b5ec66303b628a9de8986b 100644 (file)
@@ -448,11 +448,11 @@ static inline int sx_paranoia_check(struct sx_port const * port,
          KERN_ERR "sx: Warning: null sx port for device %s in %s\n";
  
        if (!port) {
-               printk(badinfo, kdevname(device), routine);
+               printk(badinfo, cdevname(device), routine);
                return 1;
        }
        if (port->magic != SX_MAGIC) {
-               printk(badmagic, kdevname(device), routine);
+               printk(badmagic, cdevname(device), routine);
                return 1;
        }
 
index 65a83c982a44940c845a2b48613abb6a68f01f09..65cc412b4582c397312b656f212b10fbab300189 100644 (file)
@@ -987,11 +987,11 @@ static inline int mgsl_paranoia_check(struct mgsl_struct *info,
                "Warning: null mgsl_struct for (%s) in %s\n";
 
        if (!info) {
-               printk(badinfo, kdevname(device), routine);
+               printk(badinfo, cdevname(device), routine);
                return 1;
        }
        if (info->magic != MGSL_MAGIC) {
-               printk(badmagic, kdevname(device), routine);
+               printk(badmagic, cdevname(device), routine);
                return 1;
        }
 #endif
index f631c1920a5ca1b5fad2b8bad7da6caa49731e97..69e4a0e1da20a6a2b11becfd8ab3cd6bb939137b 100644 (file)
@@ -718,11 +718,11 @@ static inline int sanity_check(SLMP_INFO *info,
                "Warning: null synclinkmp_struct for (%s) in %s\n";
 
        if (!info) {
-               printk(badinfo, kdevname(device), routine);
+               printk(badinfo, cdevname(device), routine);
                return 1;
        }
        if (info->magic != MGSL_MAGIC) {
-               printk(badmagic, kdevname(device), routine);
+               printk(badmagic, cdevname(device), routine);
                return 1;
        }
 #endif
index e85106fe3cfd561859934bce90622f1ae95de2fc..23b89aa8f8f4652ee90ef57399b5fbcdb87c1867 100644 (file)
@@ -2076,7 +2076,7 @@ static int qic02_tape_open_no_use_count(struct inode *inode,
 
 
        if (TP_DIAGS(dev)) {
-               printk("qic02_tape_open: dev=%s, flags=%x     ", kdevname(dev), flags);
+               printk("qic02_tape_open: dev=%s, flags=%x     ", cdevname(dev), flags);
        }
 
        if (minor(dev) == 255) {        /* special case for resetting */
@@ -2266,7 +2266,7 @@ static int qic02_tape_release(struct inode *inode, struct file *filp)
        kdev_t dev = inode->i_rdev;
 
        if (TP_DIAGS(dev)) {
-               printk("qic02_tape_release: dev=%s\n", kdevname(dev));
+               printk("qic02_tape_release: dev=%s\n", cdevname(dev));
        }
 
        if (status_zombie == NO) {      /* don't rewind in zombie mode */
index 3d3ffdebb7ba53f3cac7188a4e101e9f250377b2..6ae0176177f09b26cf141a20ffeac6bbf3f107e7 100644 (file)
@@ -214,11 +214,11 @@ inline int tty_paranoia_check(struct tty_struct *tty, kdev_t device,
                "Warning: null TTY for (%s) in %s\n";
 
        if (!tty) {
-               printk(badtty, kdevname(device), routine);
+               printk(badtty, cdevname(device), routine);
                return 1;
        }
        if (tty->magic != TTY_MAGIC) {
-               printk(badmagic, kdevname(device), routine);
+               printk(badmagic, cdevname(device), routine);
                return 1;
        }
 #endif
@@ -244,7 +244,7 @@ static int check_tty_count(struct tty_struct *tty, const char *routine)
        if (tty->count != count) {
                printk(KERN_WARNING "Warning: dev (%s) tty->count(%d) "
                                    "!= #fd's(%d) in %s\n",
-                      kdevname(tty->device), tty->count, count, routine);
+                      cdevname(tty->device), tty->count, count, routine);
                return count;
        }       
 #endif
@@ -1098,24 +1098,24 @@ static void release_dev(struct file * filp)
 #ifdef TTY_PARANOIA_CHECK
        if (idx < 0 || idx >= tty->driver.num) {
                printk(KERN_DEBUG "release_dev: bad idx when trying to "
-                                 "free (%s)\n", kdevname(tty->device));
+                                 "free (%s)\n", cdevname(tty->device));
                return;
        }
        if (tty != tty->driver.table[idx]) {
                printk(KERN_DEBUG "release_dev: driver.table[%d] not tty "
-                                 "for (%s)\n", idx, kdevname(tty->device));
+                                 "for (%s)\n", idx, cdevname(tty->device));
                return;
        }
        if (tty->termios != tty->driver.termios[idx]) {
                printk(KERN_DEBUG "release_dev: driver.termios[%d] not termios "
                       "for (%s)\n",
-                      idx, kdevname(tty->device));
+                      idx, cdevname(tty->device));
                return;
        }
        if (tty->termios_locked != tty->driver.termios_locked[idx]) {
                printk(KERN_DEBUG "release_dev: driver.termios_locked[%d] not "
                       "termios_locked for (%s)\n",
-                      idx, kdevname(tty->device));
+                      idx, cdevname(tty->device));
                return;
        }
 #endif
@@ -1130,20 +1130,20 @@ static void release_dev(struct file * filp)
                if (o_tty != tty->driver.other->table[idx]) {
                        printk(KERN_DEBUG "release_dev: other->table[%d] "
                                          "not o_tty for (%s)\n",
-                              idx, kdevname(tty->device));
+                              idx, cdevname(tty->device));
                        return;
                }
                if (o_tty->termios != tty->driver.other->termios[idx]) {
                        printk(KERN_DEBUG "release_dev: other->termios[%d] "
                                          "not o_termios for (%s)\n",
-                              idx, kdevname(tty->device));
+                              idx, cdevname(tty->device));
                        return;
                }
                if (o_tty->termios_locked != 
                      tty->driver.other->termios_locked[idx]) {
                        printk(KERN_DEBUG "release_dev: other->termios_locked["
                                          "%d] not o_termios_locked for (%s)\n",
-                              idx, kdevname(tty->device));
+                              idx, cdevname(tty->device));
                        return;
                }
                if (o_tty->link != tty) {
index 1a27aa713c88f07691f89b0ebb4798490df3734f..5cf0fed15c95dae7fb8844623e1719367c6c278d 100644 (file)
@@ -116,11 +116,11 @@ static inline int aurora_paranoia_check(struct Aurora_port const * port,
                KERN_DEBUG "aurora: Warning: null aurora port for device %s in %s\n";
 
        if (!port) {
-               printk(badinfo, kdevname(device), routine);
+               printk(badinfo, cdevname(device), routine);
                return 1;
        }
        if (port->magic != AURORA_MAGIC) {
-               printk(badmagic, kdevname(device), routine);
+               printk(badmagic, cdevname(device), routine);
                return 1;
        }
 #endif
index c67967ff8ce0ad52640055956c17c0d41508601f..5143fac1514165c433e9a8052b996ee857a4561f 100644 (file)
@@ -296,11 +296,11 @@ static inline int serial_paranoia_check(ser_info_t *info,
                "Warning: null async_struct for (%s) in %s\n";
 
        if (!info) {
-               printk(badinfo, kdevname(device), routine);
+               printk(badinfo, cdevname(device), routine);
                return 1;
        }
        if (info->magic != SERIAL_MAGIC) {
-               printk(badmagic, kdevname(device), routine);
+               printk(badmagic, cdevname(device), routine);
                return 1;
        }
 #endif