Skip to content

Commit 4dc333c

Browse files
committed
Merge branch 'thermal-intel'
Merge updates of Intel int3400 thermal driver for 6.13-rc1: - Remove the data_vault attribute_group from int3400 because it is only used for exposing one binary file that can be exposed directly (Thomas Weißschuh). - Prevent the current_uuid sysfs attribute in int3400 from mistakenly treating valid UUID values as invalid on some older systems (Srinivas Pandruvada). * thermal-intel: thermal: int3400: Remove unneeded data_vault attribute_group thermal: int3400: Fix reading of current_uuid for active policy
2 parents c79886c + 13f3cbf commit 4dc333c

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

drivers/thermal/intel/int340x_thermal/int3400_thermal.c

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,6 @@ struct odvp_attr {
7575

7676
static BIN_ATTR_SIMPLE_RO(data_vault);
7777

78-
static struct bin_attribute *data_attributes[] = {
79-
&bin_attr_data_vault,
80-
NULL,
81-
};
82-
8378
static ssize_t imok_store(struct device *dev, struct device_attribute *attr,
8479
const char *buf, size_t count)
8580
{
@@ -108,10 +103,6 @@ static const struct attribute_group imok_attribute_group = {
108103
.attrs = imok_attr,
109104
};
110105

111-
static const struct attribute_group data_attribute_group = {
112-
.bin_attrs = data_attributes,
113-
};
114-
115106
static ssize_t available_uuids_show(struct device *dev,
116107
struct device_attribute *attr,
117108
char *buf)
@@ -137,7 +128,7 @@ static ssize_t current_uuid_show(struct device *dev,
137128
struct int3400_thermal_priv *priv = dev_get_drvdata(dev);
138129
int i, length = 0;
139130

140-
if (priv->current_uuid_index > 0)
131+
if (priv->current_uuid_index >= 0)
141132
return sprintf(buf, "%s\n",
142133
int3400_thermal_uuids[priv->current_uuid_index]);
143134

@@ -624,8 +615,7 @@ static int int3400_thermal_probe(struct platform_device *pdev)
624615
}
625616

626617
if (!ZERO_OR_NULL_PTR(priv->data_vault)) {
627-
result = sysfs_create_group(&pdev->dev.kobj,
628-
&data_attribute_group);
618+
result = device_create_bin_file(&pdev->dev, &bin_attr_data_vault);
629619
if (result)
630620
goto free_uuid;
631621
}
@@ -648,7 +638,7 @@ static int int3400_thermal_probe(struct platform_device *pdev)
648638
free_sysfs:
649639
cleanup_odvp(priv);
650640
if (!ZERO_OR_NULL_PTR(priv->data_vault)) {
651-
sysfs_remove_group(&pdev->dev.kobj, &data_attribute_group);
641+
device_remove_bin_file(&pdev->dev, &bin_attr_data_vault);
652642
kfree(priv->data_vault);
653643
}
654644
free_uuid:
@@ -683,7 +673,7 @@ static void int3400_thermal_remove(struct platform_device *pdev)
683673
acpi_thermal_rel_misc_device_remove(priv->adev->handle);
684674

685675
if (!ZERO_OR_NULL_PTR(priv->data_vault))
686-
sysfs_remove_group(&pdev->dev.kobj, &data_attribute_group);
676+
device_remove_bin_file(&pdev->dev, &bin_attr_data_vault);
687677
sysfs_remove_group(&pdev->dev.kobj, &uuid_attribute_group);
688678
sysfs_remove_group(&pdev->dev.kobj, &imok_attribute_group);
689679
thermal_zone_device_unregister(priv->thermal);

0 commit comments

Comments
 (0)