iwlwifi: pcie: remove pointless debugfs parsing for csr file
authorJohannes Berg <johannes.berg@intel.com>
Tue, 25 Apr 2017 09:38:29 +0000 (11:38 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 22 Jun 2017 21:13:02 +0000 (00:13 +0300)
We don't actually care about the value at all, just making sure
that we can successfully parse a single integer value, but that's
entirely pointless - remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/trans.c

index 959a3d5ece67a89bb5334469e259238f89389309..280b14ace175a94161e0c3cea466fd1e0080c9c1 100644 (file)
@@ -2450,16 +2450,6 @@ static ssize_t iwl_dbgfs_csr_write(struct file *file,
                                   size_t count, loff_t *ppos)
 {
        struct iwl_trans *trans = file->private_data;
-       char buf[8];
-       int buf_size;
-       int csr;
-
-       memset(buf, 0, sizeof(buf));
-       buf_size = min(count, sizeof(buf) -  1);
-       if (copy_from_user(buf, user_buf, buf_size))
-               return -EFAULT;
-       if (sscanf(buf, "%d", &csr) != 1)
-               return -EFAULT;
 
        iwl_pcie_dump_csr(trans);