From 0770581b302fe19d5f60685882b7028802992478 Mon Sep 17 00:00:00 2001 From: Srinivas Girigowda Date: Thu, 9 Jul 2020 11:33:49 -0700 Subject: [PATCH] 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 --- Kbuild | 6 ++--- configs/default_defconfig | 2 +- core/hdd/src/wlan_hdd_sysfs.c | 10 ++++---- ...et_temp.c => wlan_hdd_sysfs_temperature.c} | 24 +++++++++---------- ...et_temp.h => wlan_hdd_sysfs_temperature.h} | 24 +++++++++---------- 5 files changed, 33 insertions(+), 33 deletions(-) rename core/hdd/src/{wlan_hdd_sysfs_get_temp.c => wlan_hdd_sysfs_temperature.c} (78%) rename core/hdd/src/{wlan_hdd_sysfs_get_temp.h => wlan_hdd_sysfs_temperature.h} (66%) diff --git a/Kbuild b/Kbuild index 921ed8b67fe3..c016431d4e7d 100644 --- a/Kbuild +++ b/Kbuild @@ -343,8 +343,8 @@ endif ifeq ($(CONFIG_WLAN_GET_TDLS_PEERS), y) HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_sysfs_get_tdls_peers.o endif -ifeq ($(CONFIG_WLAN_GET_TEMP), y) -HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_sysfs_get_temp.o +ifeq ($(CONFIG_WLAN_SYSFS_TEMPERATURE), y) +HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_sysfs_temperature.o endif ifeq ($(CONFIG_WLAN_THERMAL_CFG), y) 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_STATS) += -DWLAN_SYSFS_STATS 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_FEATURE_UNIT_TEST_SUSPEND) += -DWLAN_SUSPEND_RESUME_TEST cppflags-$(CONFIG_FEATURE_WLM_STATS) += -DFEATURE_WLM_STATS diff --git a/configs/default_defconfig b/configs/default_defconfig index 918509e21c8b..3cf87d43bda9 100644 --- a/configs/default_defconfig +++ b/configs/default_defconfig @@ -224,7 +224,7 @@ ifeq ($(CONFIG_WLAN_SYSFS), y) ifeq ($(CONFIG_QCOM_TDLS), y) CONFIG_WLAN_GET_TDLS_PEERS := y endif - CONFIG_WLAN_GET_TEMP := y + CONFIG_WLAN_SYSFS_TEMPERATURE := y CONFIG_WLAN_THERMAL_CFG := y endif diff --git a/core/hdd/src/wlan_hdd_sysfs.c b/core/hdd/src/wlan_hdd_sysfs.c index 02b10da19add..5f8c68ab84ff 100644 --- a/core/hdd/src/wlan_hdd_sysfs.c +++ b/core/hdd/src/wlan_hdd_sysfs.c @@ -69,7 +69,7 @@ #include #include #include -#include +#include #include #include #include @@ -666,7 +666,7 @@ hdd_sysfs_create_sta_adapter_root_obj(struct hdd_adapter *adapter) hdd_sysfs_txrx_stats_create(adapter); hdd_sysfs_get_range_ext_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_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_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_range_ext_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_txrx_fw_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_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_range_ext_destroy(adapter); - hdd_sysfs_get_temp_destroy(adapter); + hdd_sysfs_temperature_destroy(adapter); hdd_sysfs_txrx_stats_destroy(adapter); hdd_sysfs_txrx_fw_stats_destroy(adapter); hdd_sysfs_he_bss_color_destroy(adapter); diff --git a/core/hdd/src/wlan_hdd_sysfs_get_temp.c b/core/hdd/src/wlan_hdd_sysfs_temperature.c similarity index 78% rename from core/hdd/src/wlan_hdd_sysfs_get_temp.c rename to core/hdd/src/wlan_hdd_sysfs_temperature.c index 23b46bb5c300..12d2902badf7 100644 --- a/core/hdd/src/wlan_hdd_sysfs_get_temp.c +++ b/core/hdd/src/wlan_hdd_sysfs_temperature.c @@ -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 #include #include "osif_vdev_sync.h" -#include +#include #include 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_context *hdd_ctx; @@ -59,9 +59,9 @@ __hdd_sysfs_get_temp_show(struct net_device *net_dev, char *buf) } static ssize_t -hdd_sysfs_get_temp_show(struct device *dev, - struct device_attribute *attr, - char *buf) +hdd_sysfs_temperature_show(struct device *dev, + struct device_attribute *attr, + char *buf) { struct net_device *net_dev = container_of(dev, struct net_device, dev); struct osif_vdev_sync *vdev_sync; @@ -71,7 +71,7 @@ hdd_sysfs_get_temp_show(struct device *dev, if (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); @@ -79,21 +79,21 @@ hdd_sysfs_get_temp_show(struct device *dev, } 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; error = device_create_file(&adapter->dev->dev, &dev_attr_temperature); if (error) - hdd_err("could not create temp sysfs file"); + hdd_err("could not create temperature sysfs file"); 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); } diff --git a/core/hdd/src/wlan_hdd_sysfs_get_temp.h b/core/hdd/src/wlan_hdd_sysfs_temperature.h similarity index 66% rename from core/hdd/src/wlan_hdd_sysfs_get_temp.h rename to core/hdd/src/wlan_hdd_sysfs_temperature.h index 1658086be69c..19e110e73b33 100644 --- a/core/hdd/src/wlan_hdd_sysfs_get_temp.h +++ b/core/hdd/src/wlan_hdd_sysfs_temperature.h @@ -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 -#define _WLAN_HDD_SYSFS_GET_TEMP_H +#ifndef _WLAN_HDD_SYSFS_TEMPERATURE_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 * * this file is created per adapter. @@ -37,26 +37,26 @@ * * 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 * @adapter: pointer to adapter * * Return: none */ -void hdd_sysfs_get_temp_destroy(struct hdd_adapter *adapter); +void hdd_sysfs_temperature_destroy(struct hdd_adapter *adapter); #else static inline int -hdd_sysfs_get_temp_create(struct hdd_adapter *adapter) +hdd_sysfs_temperature_create(struct hdd_adapter *adapter) { return 0; } static inline void -hdd_sysfs_get_temp_destroy(struct hdd_adapter *adapter) +hdd_sysfs_temperature_destroy(struct hdd_adapter *adapter) { } #endif -#endif /* #ifndef _WLAN_HDD_SYSFS_GET_TEMP_H */ +#endif /* #ifndef _WLAN_HDD_SYSFS_TEMPERATURE_H */