]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: dgnc: remove debug symbols
authorAya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Sat, 25 Oct 2014 21:46:03 +0000 (23:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Oct 2014 08:12:39 +0000 (16:12 +0800)
This patch removes all of the debug symbols and the variable dgnc_debug
since they are not used anywhere in the code.

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgnc/dgnc_driver.c
drivers/staging/dgnc/dgnc_driver.h
drivers/staging/dgnc/dgnc_sysfs.c

index bf8632841c2e0fa32e0e278a20ebbfd0624aeaa4..ba98ff348112032314a6124c5d8d2f300388ef1d 100644 (file)
@@ -49,14 +49,6 @@ MODULE_AUTHOR("Digi International, http://www.digi.com");
 MODULE_DESCRIPTION("Driver for the Digi International Neo and Classic PCI based product line");
 MODULE_SUPPORTED_DEVICE("dgnc");
 
-/*
- * insmod command line overrideable parameters
- *
- * NOTE: we use a set of macros to create the variables, which allows
- * us to specify the variable type, name, initial value, and description.
- */
-PARM_INT(debug,                0x00,           0644,   "Driver debugging level");
-
 /**************************************************************************
  *
  * protos for this file
@@ -740,7 +732,6 @@ static void dgnc_init_globals(void)
 {
        int i = 0;
 
-       dgnc_debug              = debug;
        dgnc_NumBoards          = 0;
 
        for (i = 0; i < MAXBOARDS; i++)
index e67b913224ecb71094396db4e8097ac61e7228a5..a8157eba28dac470ac5ae5c5d92c9843bd7f096b 100644 (file)
  *
  *************************************************************************/
 
-/* Driver identification, error and debugging statments */
+/* Driver identification and error statments */
 #define        PROCSTR         "dgnc"                  /* /proc entries         */
 #define        DEVSTR          "/dev/dg/dgnc"          /* /dev entries          */
 #define        DRVSTR          "dgnc"                  /* Driver name string    */
 
 #define TRC_TO_CONSOLE 1
 
-/*
- * Debugging levels can be set using debug insmod variable
- * They can also be compiled out completely.
- */
-
-#define        DBG_INIT                (dgnc_debug & 0x01)
-#define        DBG_BASIC               (dgnc_debug & 0x02)
-#define        DBG_CORE                (dgnc_debug & 0x04)
-
-#define        DBG_OPEN                (dgnc_debug & 0x08)
-#define        DBG_CLOSE               (dgnc_debug & 0x10)
-#define        DBG_READ                (dgnc_debug & 0x20)
-#define        DBG_WRITE               (dgnc_debug & 0x40)
-
-#define        DBG_IOCTL               (dgnc_debug & 0x80)
-
-#define        DBG_PROC                (dgnc_debug & 0x100)
-#define        DBG_PARAM               (dgnc_debug & 0x200)
-#define        DBG_PSCAN               (dgnc_debug & 0x400)
-#define        DBG_EVENT               (dgnc_debug & 0x800)
-
-#define        DBG_DRAIN               (dgnc_debug & 0x1000)
-#define        DBG_MSIGS               (dgnc_debug & 0x2000)
-
-#define        DBG_MGMT                (dgnc_debug & 0x4000)
-#define        DBG_INTR                (dgnc_debug & 0x8000)
-
-#define        DBG_CARR                (dgnc_debug & 0x10000)
-
 /* Number of boards we support at once. */
 #define        MAXBOARDS       20
 #define        MAXPORTS        8
@@ -428,7 +399,6 @@ struct channel_t {
  * Our Global Variables.
  */
 extern uint            dgnc_Major;             /* Our driver/mgmt major        */
-extern int             dgnc_debug;             /* Debug variable               */
 extern int             dgnc_poll_tick;         /* Poll interval - 20 ms        */
 extern spinlock_t      dgnc_global_lock;       /* Driver global spinlock       */
 extern uint            dgnc_NumBoards;         /* Total number of boards       */
index ba0d8ac2d32ad5bf7aaca54b61d880749fb704e3..2fd34ca70c599a260c0a9bacdea3923a86c9a032 100644 (file)
@@ -63,22 +63,6 @@ static ssize_t dgnc_driver_maxboards_show(struct device_driver *ddp, char *buf)
 }
 static DRIVER_ATTR(maxboards, S_IRUSR, dgnc_driver_maxboards_show, NULL);
 
-static ssize_t dgnc_driver_debug_show(struct device_driver *ddp, char *buf)
-{
-       return snprintf(buf, PAGE_SIZE, "0x%x\n", dgnc_debug);
-}
-
-static ssize_t dgnc_driver_debug_store(struct device_driver *ddp, const char *buf, size_t count)
-{
-       int ret;
-
-       ret = sscanf(buf, "0x%x\n", &dgnc_debug);
-       if (ret != 1)
-               return -EINVAL;
-       return count;
-}
-static DRIVER_ATTR(debug, (S_IRUSR | S_IWUSR), dgnc_driver_debug_show, dgnc_driver_debug_store);
-
 
 static ssize_t dgnc_driver_pollrate_show(struct device_driver *ddp, char *buf)
 {
@@ -105,7 +89,6 @@ void dgnc_create_driver_sysfiles(struct pci_driver *dgnc_driver)
        rc |= driver_create_file(driverfs, &driver_attr_version);
        rc |= driver_create_file(driverfs, &driver_attr_boards);
        rc |= driver_create_file(driverfs, &driver_attr_maxboards);
-       rc |= driver_create_file(driverfs, &driver_attr_debug);
        rc |= driver_create_file(driverfs, &driver_attr_pollrate);
        if (rc)
                printk(KERN_ERR "DGNC: sysfs driver_create_file failed!\n");
@@ -119,7 +102,6 @@ void dgnc_remove_driver_sysfiles(struct pci_driver *dgnc_driver)
        driver_remove_file(driverfs, &driver_attr_version);
        driver_remove_file(driverfs, &driver_attr_boards);
        driver_remove_file(driverfs, &driver_attr_maxboards);
-       driver_remove_file(driverfs, &driver_attr_debug);
        driver_remove_file(driverfs, &driver_attr_pollrate);
 }