staging: dgnc: remove unused variable named rawreadok
authorAya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Sat, 25 Oct 2014 21:43:33 +0000 (23:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Oct 2014 08:12:39 +0000 (16:12 +0800)
This patch removes the variable rawreadok since it is only intialized
but not used in any of the driver functions.

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 62843d6f8d05e8dc72783ad6618d4718b4c618c9..bf8632841c2e0fa32e0e278a20ebbfd0624aeaa4 100644 (file)
@@ -56,7 +56,6 @@ MODULE_SUPPORTED_DEVICE("dgnc");
  * us to specify the variable type, name, initial value, and description.
  */
 PARM_INT(debug,                0x00,           0644,   "Driver debugging level");
-PARM_INT(rawreadok,    1,              0644,   "Bypass flip buffers on input");
 
 /**************************************************************************
  *
@@ -741,7 +740,6 @@ static void dgnc_init_globals(void)
 {
        int i = 0;
 
-       dgnc_rawreadok          = rawreadok;
        dgnc_debug              = debug;
        dgnc_NumBoards          = 0;
 
index f1b15645a82fc506adcf075e63e0c415acc832e5..e67b913224ecb71094396db4e8097ac61e7228a5 100644 (file)
@@ -429,7 +429,6 @@ struct channel_t {
  */
 extern uint            dgnc_Major;             /* Our driver/mgmt major        */
 extern int             dgnc_debug;             /* Debug variable               */
-extern int             dgnc_rawreadok;         /* Set if user wants rawreads   */
 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 6c3b387622e993b16cad1b39bbd956f8fcf12145..ba0d8ac2d32ad5bf7aaca54b61d880749fb704e3 100644 (file)
@@ -80,23 +80,6 @@ static ssize_t dgnc_driver_debug_store(struct device_driver *ddp, const char *bu
 static DRIVER_ATTR(debug, (S_IRUSR | S_IWUSR), dgnc_driver_debug_show, dgnc_driver_debug_store);
 
 
-static ssize_t dgnc_driver_rawreadok_show(struct device_driver *ddp, char *buf)
-{
-       return snprintf(buf, PAGE_SIZE, "0x%x\n", dgnc_rawreadok);
-}
-
-static ssize_t dgnc_driver_rawreadok_store(struct device_driver *ddp, const char *buf, size_t count)
-{
-       int ret;
-
-       ret = sscanf(buf, "0x%x\n", &dgnc_rawreadok);
-       if (ret != 1)
-               return -EINVAL;
-       return count;
-}
-static DRIVER_ATTR(rawreadok, (S_IRUSR | S_IWUSR), dgnc_driver_rawreadok_show, dgnc_driver_rawreadok_store);
-
-
 static ssize_t dgnc_driver_pollrate_show(struct device_driver *ddp, char *buf)
 {
        return snprintf(buf, PAGE_SIZE, "%dms\n", dgnc_poll_tick);
@@ -123,7 +106,6 @@ void dgnc_create_driver_sysfiles(struct pci_driver *dgnc_driver)
        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_rawreadok);
        rc |= driver_create_file(driverfs, &driver_attr_pollrate);
        if (rc)
                printk(KERN_ERR "DGNC: sysfs driver_create_file failed!\n");
@@ -138,7 +120,6 @@ void dgnc_remove_driver_sysfiles(struct pci_driver *dgnc_driver)
        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_rawreadok);
        driver_remove_file(driverfs, &driver_attr_pollrate);
 }