summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
diff options
context:
space:
mode:
authorChaya Rachel Ivgi2015-12-27 12:45:42 +0100
committerEmmanuel Grumbach2016-02-01 15:40:21 +0100
commit7869318e4296e27d4cb97505e8739d62b48b2d58 (patch)
tree3ab99f8991516cdfedb6755dbd9d8140942afee7 /drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
parentiwlwifi: mvm: fix debugfs signedness warning (diff)
downloadkernel-qcow2-linux-7869318e4296e27d4cb97505e8739d62b48b2d58.tar.gz
kernel-qcow2-linux-7869318e4296e27d4cb97505e8739d62b48b2d58.tar.xz
kernel-qcow2-linux-7869318e4296e27d4cb97505e8739d62b48b2d58.zip
iwlwifi: mvm: add support for negative temperatures
The driver should support also negative temperatures. So there is a need to separate between the return value and temperature in order to be able to distinguish between a negative temperature and error value. Signed-off-by: Chaya Rachel Ivgi <chaya.rachel.ivgi@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
index 8059efafcb80..5c0f93997b7b 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
@@ -261,17 +261,18 @@ static ssize_t iwl_dbgfs_nic_temp_read(struct file *file,
{
struct iwl_mvm *mvm = file->private_data;
char buf[16];
- int pos, temp;
+ int pos, ret;
+ s32 temp;
if (!mvm->ucode_loaded)
return -EIO;
mutex_lock(&mvm->mutex);
- temp = iwl_mvm_get_temp(mvm);
+ ret = iwl_mvm_get_temp(mvm, &temp);
mutex_unlock(&mvm->mutex);
- if (temp < 0)
- return temp;
+ if (ret)
+ return -EIO;
pos = scnprintf(buf , sizeof(buf), "%d\n", temp);