From f32a0cd31ea36cc8f914eaa0c2acda64e2858ee4 Mon Sep 17 00:00:00 2001 From: Huang Yiwei Date: Wed, 22 Sep 2021 13:27:27 +0800 Subject: [PATCH] Revert "soc: qcom: socinfo: Add soc_sku name support" This reverts commit dbd0339fd7df91a34c1736a20599d74612e74553. Will change to SMEM approach, so revert this change. Change-Id: Ia2a4d5489631ff458d3d5854aa74909c7724bcdc Signed-off-by: Huang Yiwei Signed-off-by: Prasad Sodagudi --- drivers/soc/qcom/socinfo.c | 44 -------------------------------------- 1 file changed, 44 deletions(-) diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c index 0bb1d22dc62a..1d3e75e468f8 100644 --- a/drivers/soc/qcom/socinfo.c +++ b/drivers/soc/qcom/socinfo.c @@ -808,49 +808,6 @@ static const struct soc_id soc_id[] = { { 577, "PINEAPPLEP" }, }; -struct soc_sku { - u32 id; - u32 feature_id; - const char *sku_name; -}; - -static const struct soc_sku soc_sku[] = { - { 415, 0, "AB" }, - { 415, 8, "AC" }, -}; - -static ssize_t msm_get_soc_sku(struct device *dev, - struct device_attribute *attr, char *buf) -{ - const char *soc_sku_name = NULL; - int feature_id, idx; - u32 id; - - id = socinfo_get_id(); - feature_id = qcom_smem_get_feature_id(); - - if (feature_id < 0) { - dev_err(dev, "Cannot get feature_id\n"); - return 0; - } - - for (idx = 0; idx < ARRAY_SIZE(soc_sku); idx++) { - if (soc_sku[idx].id == id && - soc_sku[idx].feature_id == feature_id) { - soc_sku_name = soc_sku[idx].sku_name; - break; - } - } - - if (IS_ERR_OR_NULL(soc_sku_name)) { - dev_err(dev, "soc_sku_name not found\n"); - return 0; - } - - return scnprintf(buf, PAGE_SIZE, "%s\n", soc_sku_name); -} -ATTR_DEFINE(soc_sku); - static struct qcom_socinfo *qsocinfo; static struct attribute *msm_custom_socinfo_attrs[35]; @@ -1114,7 +1071,6 @@ static void socinfo_populate_sysfs(struct qcom_socinfo *qcom_socinfo) switch (socinfo_format) { case SOCINFO_VERSION(0, 15): - msm_custom_socinfo_attrs[i++] = &dev_attr_soc_sku.attr; msm_custom_socinfo_attrs[i++] = &dev_attr_nmodem_supported.attr; fallthrough; case SOCINFO_VERSION(0, 14):