qcacld-3.0: Rename file name and function name for sysfs 'temperature'

Rename file name and modify function names to keep it inline
with sysfs attribute name 'temperature'

Change-Id: I8f31d59be9954d3ffe1ff7c11d16dd24b9e2644d
CRs-Fixed: 2731064
This commit is contained in:
Srinivas Girigowda
2020-07-09 11:33:49 -07:00
committed by snandini
parent 57d6d48573
commit 0770581b30
5 changed files with 33 additions and 33 deletions

6
Kbuild
View File

@@ -343,8 +343,8 @@ endif
ifeq ($(CONFIG_WLAN_GET_TDLS_PEERS), y) ifeq ($(CONFIG_WLAN_GET_TDLS_PEERS), y)
HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_sysfs_get_tdls_peers.o HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_sysfs_get_tdls_peers.o
endif endif
ifeq ($(CONFIG_WLAN_GET_TEMP), y) ifeq ($(CONFIG_WLAN_SYSFS_TEMPERATURE), y)
HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_sysfs_get_temp.o HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_sysfs_temperature.o
endif endif
ifeq ($(CONFIG_WLAN_THERMAL_CFG), y) ifeq ($(CONFIG_WLAN_THERMAL_CFG), y)
HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_sysfs_thermal_cfg.o HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_sysfs_thermal_cfg.o
@@ -2658,7 +2658,7 @@ cppflags-$(CONFIG_WLAN_TXRX_STATS) += -DCONFIG_WLAN_TXRX_STATS
cppflags-$(CONFIG_WLAN_SYSFS_DP_TRACE) += -DWLAN_SYSFS_DP_TRACE cppflags-$(CONFIG_WLAN_SYSFS_DP_TRACE) += -DWLAN_SYSFS_DP_TRACE
cppflags-$(CONFIG_WLAN_SYSFS_STATS) += -DWLAN_SYSFS_STATS cppflags-$(CONFIG_WLAN_SYSFS_STATS) += -DWLAN_SYSFS_STATS
cppflags-$(CONFIG_WLAN_GET_RANGE_EXT) += -DCONFIG_WLAN_GET_RANGE_EXT cppflags-$(CONFIG_WLAN_GET_RANGE_EXT) += -DCONFIG_WLAN_GET_RANGE_EXT
cppflags-$(CONFIG_WLAN_GET_TEMP) += -DCONFIG_WLAN_GET_TEMP cppflags-$(CONFIG_WLAN_SYSFS_TEMPERATURE) += -DCONFIG_WLAN_SYSFS_TEMPERATURE
cppflags-$(CONFIG_WLAN_THERMAL_CFG) += -DCONFIG_WLAN_THERMAL_CFG cppflags-$(CONFIG_WLAN_THERMAL_CFG) += -DCONFIG_WLAN_THERMAL_CFG
cppflags-$(CONFIG_FEATURE_UNIT_TEST_SUSPEND) += -DWLAN_SUSPEND_RESUME_TEST cppflags-$(CONFIG_FEATURE_UNIT_TEST_SUSPEND) += -DWLAN_SUSPEND_RESUME_TEST
cppflags-$(CONFIG_FEATURE_WLM_STATS) += -DFEATURE_WLM_STATS cppflags-$(CONFIG_FEATURE_WLM_STATS) += -DFEATURE_WLM_STATS

View File

@@ -224,7 +224,7 @@ ifeq ($(CONFIG_WLAN_SYSFS), y)
ifeq ($(CONFIG_QCOM_TDLS), y) ifeq ($(CONFIG_QCOM_TDLS), y)
CONFIG_WLAN_GET_TDLS_PEERS := y CONFIG_WLAN_GET_TDLS_PEERS := y
endif endif
CONFIG_WLAN_GET_TEMP := y CONFIG_WLAN_SYSFS_TEMPERATURE := y
CONFIG_WLAN_THERMAL_CFG := y CONFIG_WLAN_THERMAL_CFG := y
endif endif

View File

@@ -69,7 +69,7 @@
#include <wlan_hdd_sysfs_stats.h> #include <wlan_hdd_sysfs_stats.h>
#include <wlan_hdd_sysfs_get_range_ext.h> #include <wlan_hdd_sysfs_get_range_ext.h>
#include <wlan_hdd_sysfs_get_tdls_peers.h> #include <wlan_hdd_sysfs_get_tdls_peers.h>
#include <wlan_hdd_sysfs_get_temp.h> #include <wlan_hdd_sysfs_temperature.h>
#include <wlan_hdd_sysfs_thermal_cfg.h> #include <wlan_hdd_sysfs_thermal_cfg.h>
#include <wlan_hdd_sysfs_motion_detection.h> #include <wlan_hdd_sysfs_motion_detection.h>
#include <wlan_hdd_sysfs_ipa.h> #include <wlan_hdd_sysfs_ipa.h>
@@ -666,7 +666,7 @@ hdd_sysfs_create_sta_adapter_root_obj(struct hdd_adapter *adapter)
hdd_sysfs_txrx_stats_create(adapter); hdd_sysfs_txrx_stats_create(adapter);
hdd_sysfs_get_range_ext_create(adapter); hdd_sysfs_get_range_ext_create(adapter);
hdd_sysfs_get_tdls_peers_interface_create(adapter); hdd_sysfs_get_tdls_peers_interface_create(adapter);
hdd_sysfs_get_temp_create(adapter); hdd_sysfs_temperature_create(adapter);
hdd_sysfs_motion_detection_create(adapter); hdd_sysfs_motion_detection_create(adapter);
hdd_sysfs_range_ext_create(adapter); hdd_sysfs_range_ext_create(adapter);
} }
@@ -676,7 +676,7 @@ hdd_sysfs_destroy_sta_adapter_root_obj(struct hdd_adapter *adapter)
{ {
hdd_sysfs_range_ext_destroy(adapter); hdd_sysfs_range_ext_destroy(adapter);
hdd_sysfs_motion_detection_destroy(adapter); hdd_sysfs_motion_detection_destroy(adapter);
hdd_sysfs_get_temp_destroy(adapter); hdd_sysfs_temperature_destroy(adapter);
hdd_sysfs_get_tdls_peers_interface_destroy(adapter); hdd_sysfs_get_tdls_peers_interface_destroy(adapter);
hdd_sysfs_get_range_ext_destroy(adapter); hdd_sysfs_get_range_ext_destroy(adapter);
hdd_sysfs_txrx_stats_destroy(adapter); hdd_sysfs_txrx_stats_destroy(adapter);
@@ -721,7 +721,7 @@ hdd_sysfs_create_sap_adapter_root_obj(struct hdd_adapter *adapter)
hdd_sysfs_he_bss_color_create(adapter); hdd_sysfs_he_bss_color_create(adapter);
hdd_sysfs_txrx_fw_stats_create(adapter); hdd_sysfs_txrx_fw_stats_create(adapter);
hdd_sysfs_txrx_stats_create(adapter); hdd_sysfs_txrx_stats_create(adapter);
hdd_sysfs_get_temp_create(adapter); hdd_sysfs_temperature_create(adapter);
hdd_sysfs_range_ext_create(adapter); hdd_sysfs_range_ext_create(adapter);
hdd_sysfs_ipa_create(adapter); hdd_sysfs_ipa_create(adapter);
} }
@@ -731,7 +731,7 @@ hdd_sysfs_destroy_sap_adapter_root_obj(struct hdd_adapter *adapter)
{ {
hdd_sysfs_ipa_destroy(adapter); hdd_sysfs_ipa_destroy(adapter);
hdd_sysfs_range_ext_destroy(adapter); hdd_sysfs_range_ext_destroy(adapter);
hdd_sysfs_get_temp_destroy(adapter); hdd_sysfs_temperature_destroy(adapter);
hdd_sysfs_txrx_stats_destroy(adapter); hdd_sysfs_txrx_stats_destroy(adapter);
hdd_sysfs_txrx_fw_stats_destroy(adapter); hdd_sysfs_txrx_fw_stats_destroy(adapter);
hdd_sysfs_he_bss_color_destroy(adapter); hdd_sysfs_he_bss_color_destroy(adapter);

View File

@@ -15,19 +15,19 @@
*/ */
/** /**
* DOC: wlan_hdd_sysfs_get_temp.c * DOC: wlan_hdd_sysfs_temperature.c
* *
* implementation for creating sysfs file temp * Implementation for creating sysfs file temperature
*/ */
#include <wlan_hdd_includes.h> #include <wlan_hdd_includes.h>
#include <wlan_hdd_sysfs.h> #include <wlan_hdd_sysfs.h>
#include "osif_vdev_sync.h" #include "osif_vdev_sync.h"
#include <wlan_hdd_sysfs_get_temp.h> #include <wlan_hdd_sysfs_temperature.h>
#include <wlan_hdd_stats.h> #include <wlan_hdd_stats.h>
static ssize_t static ssize_t
__hdd_sysfs_get_temp_show(struct net_device *net_dev, char *buf) __hdd_sysfs_temperature_show(struct net_device *net_dev, char *buf)
{ {
struct hdd_adapter *adapter = netdev_priv(net_dev); struct hdd_adapter *adapter = netdev_priv(net_dev);
struct hdd_context *hdd_ctx; struct hdd_context *hdd_ctx;
@@ -59,9 +59,9 @@ __hdd_sysfs_get_temp_show(struct net_device *net_dev, char *buf)
} }
static ssize_t static ssize_t
hdd_sysfs_get_temp_show(struct device *dev, hdd_sysfs_temperature_show(struct device *dev,
struct device_attribute *attr, struct device_attribute *attr,
char *buf) char *buf)
{ {
struct net_device *net_dev = container_of(dev, struct net_device, dev); struct net_device *net_dev = container_of(dev, struct net_device, dev);
struct osif_vdev_sync *vdev_sync; struct osif_vdev_sync *vdev_sync;
@@ -71,7 +71,7 @@ hdd_sysfs_get_temp_show(struct device *dev,
if (err_size) if (err_size)
return err_size; return err_size;
err_size = __hdd_sysfs_get_temp_show(net_dev, buf); err_size = __hdd_sysfs_temperature_show(net_dev, buf);
osif_vdev_sync_op_stop(vdev_sync); osif_vdev_sync_op_stop(vdev_sync);
@@ -79,21 +79,21 @@ hdd_sysfs_get_temp_show(struct device *dev,
} }
static DEVICE_ATTR(temperature, 0440, static DEVICE_ATTR(temperature, 0440,
hdd_sysfs_get_temp_show, NULL); hdd_sysfs_temperature_show, NULL);
int hdd_sysfs_get_temp_create(struct hdd_adapter *adapter) int hdd_sysfs_temperature_create(struct hdd_adapter *adapter)
{ {
int error; int error;
error = device_create_file(&adapter->dev->dev, error = device_create_file(&adapter->dev->dev,
&dev_attr_temperature); &dev_attr_temperature);
if (error) if (error)
hdd_err("could not create temp sysfs file"); hdd_err("could not create temperature sysfs file");
return error; return error;
} }
void hdd_sysfs_get_temp_destroy(struct hdd_adapter *adapter) void hdd_sysfs_temperature_destroy(struct hdd_adapter *adapter)
{ {
device_remove_file(&adapter->dev->dev, &dev_attr_temperature); device_remove_file(&adapter->dev->dev, &dev_attr_temperature);
} }

View File

@@ -15,17 +15,17 @@
*/ */
/** /**
* DOC: wlan_hdd_sysfs_get_temp.h * DOC: wlan_hdd_sysfs_temperature.h
* *
* implementation for creating sysfs file temperature * Implementation for creating sysfs file temperature
*/ */
#ifndef _WLAN_HDD_SYSFS_GET_TEMP_H #ifndef _WLAN_HDD_SYSFS_TEMPERATURE_H
#define _WLAN_HDD_SYSFS_GET_TEMP_H #define _WLAN_HDD_SYSFS_TEMPERATURE_H
#if defined(WLAN_SYSFS) && defined(CONFIG_WLAN_GET_TEMP) #if defined(WLAN_SYSFS) && defined(CONFIG_WLAN_SYSFS_TEMPERATURE)
/** /**
* hdd_sysfs_get_temp_create() - API to create temperature sysfs file * hdd_sysfs_temperature_create() - API to create temperature sysfs file
* @adapter: pointer to adapter * @adapter: pointer to adapter
* *
* this file is created per adapter. * this file is created per adapter.
@@ -37,26 +37,26 @@
* *
* Return: 0 on success and errno on failure * Return: 0 on success and errno on failure
*/ */
int hdd_sysfs_get_temp_create(struct hdd_adapter *adapter); int hdd_sysfs_temperature_create(struct hdd_adapter *adapter);
/** /**
* hdd_sysfs_get_temp_destroy() - * hdd_sysfs_temperature_destroy() -
* API to destroy temperature sysfs file * API to destroy temperature sysfs file
* @adapter: pointer to adapter * @adapter: pointer to adapter
* *
* Return: none * Return: none
*/ */
void hdd_sysfs_get_temp_destroy(struct hdd_adapter *adapter); void hdd_sysfs_temperature_destroy(struct hdd_adapter *adapter);
#else #else
static inline int static inline int
hdd_sysfs_get_temp_create(struct hdd_adapter *adapter) hdd_sysfs_temperature_create(struct hdd_adapter *adapter)
{ {
return 0; return 0;
} }
static inline void static inline void
hdd_sysfs_get_temp_destroy(struct hdd_adapter *adapter) hdd_sysfs_temperature_destroy(struct hdd_adapter *adapter)
{ {
} }
#endif #endif
#endif /* #ifndef _WLAN_HDD_SYSFS_GET_TEMP_H */ #endif /* #ifndef _WLAN_HDD_SYSFS_TEMPERATURE_H */