diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2011-09-22 10:15:37 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-09-27 14:34:06 -0400 |
commit | 511afa3bfbb421ff0e87086725367f762587ab87 (patch) | |
tree | 6d24e62ac0a15bdbf5df5ba2cc4bee7af5f3a904 /drivers/net/wireless/iwlwifi/iwl-debugfs.c | |
parent | d56da92092c7808fea0b6ad85fd97095067a2616 (diff) |
iwlagn: sparse warning priv->temperature is signed
Since priv->temperature is signed, we cannot use debugfs_create_u32
to refer to it.
Use a regular debugfs file instead.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-debugfs.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index bf2a678970a..6d49dfbee96 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -715,6 +715,20 @@ static ssize_t iwl_dbgfs_disable_ht40_read(struct file *file, | |||
715 | return simple_read_from_buffer(user_buf, count, ppos, buf, pos); | 715 | return simple_read_from_buffer(user_buf, count, ppos, buf, pos); |
716 | } | 716 | } |
717 | 717 | ||
718 | static ssize_t iwl_dbgfs_temperature_read(struct file *file, | ||
719 | char __user *user_buf, | ||
720 | size_t count, loff_t *ppos) | ||
721 | { | ||
722 | struct iwl_priv *priv = file->private_data; | ||
723 | char buf[8]; | ||
724 | int pos = 0; | ||
725 | const size_t bufsz = sizeof(buf); | ||
726 | |||
727 | pos += scnprintf(buf + pos, bufsz - pos, "%d\n", priv->temperature); | ||
728 | return simple_read_from_buffer(user_buf, count, ppos, buf, pos); | ||
729 | } | ||
730 | |||
731 | |||
718 | static ssize_t iwl_dbgfs_sleep_level_override_write(struct file *file, | 732 | static ssize_t iwl_dbgfs_sleep_level_override_write(struct file *file, |
719 | const char __user *user_buf, | 733 | const char __user *user_buf, |
720 | size_t count, loff_t *ppos) | 734 | size_t count, loff_t *ppos) |
@@ -809,6 +823,7 @@ DEBUGFS_READ_WRITE_FILE_OPS(rx_handlers); | |||
809 | DEBUGFS_READ_FILE_OPS(qos); | 823 | DEBUGFS_READ_FILE_OPS(qos); |
810 | DEBUGFS_READ_FILE_OPS(thermal_throttling); | 824 | DEBUGFS_READ_FILE_OPS(thermal_throttling); |
811 | DEBUGFS_READ_WRITE_FILE_OPS(disable_ht40); | 825 | DEBUGFS_READ_WRITE_FILE_OPS(disable_ht40); |
826 | DEBUGFS_READ_FILE_OPS(temperature); | ||
812 | DEBUGFS_READ_WRITE_FILE_OPS(sleep_level_override); | 827 | DEBUGFS_READ_WRITE_FILE_OPS(sleep_level_override); |
813 | DEBUGFS_READ_FILE_OPS(current_sleep_command); | 828 | DEBUGFS_READ_FILE_OPS(current_sleep_command); |
814 | 829 | ||
@@ -2536,7 +2551,7 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name) | |||
2536 | DEBUGFS_ADD_FILE(current_sleep_command, dir_data, S_IRUSR); | 2551 | DEBUGFS_ADD_FILE(current_sleep_command, dir_data, S_IRUSR); |
2537 | DEBUGFS_ADD_FILE(thermal_throttling, dir_data, S_IRUSR); | 2552 | DEBUGFS_ADD_FILE(thermal_throttling, dir_data, S_IRUSR); |
2538 | DEBUGFS_ADD_FILE(disable_ht40, dir_data, S_IWUSR | S_IRUSR); | 2553 | DEBUGFS_ADD_FILE(disable_ht40, dir_data, S_IWUSR | S_IRUSR); |
2539 | DEBUGFS_ADD_U32(temperature, dir_data, &priv->temperature, S_IRUSR); | 2554 | DEBUGFS_ADD_FILE(temperature, dir_data, S_IRUSR); |
2540 | 2555 | ||
2541 | DEBUGFS_ADD_FILE(rx_statistics, dir_debug, S_IRUSR); | 2556 | DEBUGFS_ADD_FILE(rx_statistics, dir_debug, S_IRUSR); |
2542 | DEBUGFS_ADD_FILE(tx_statistics, dir_debug, S_IRUSR); | 2557 | DEBUGFS_ADD_FILE(tx_statistics, dir_debug, S_IRUSR); |