mirror of
https://github.com/torvalds/linux.git
synced 2024-12-19 09:32:32 +00:00
staging: dgnc: remove unused variable named rawreadok
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>
This commit is contained in:
parent
6db43a9c38
commit
ade5b9435b
@ -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;
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user