Merge branches 'thermal-core', 'thermal-built-it' and 'thermal-intel' into next
这个提交包含在:
@@ -1,6 +1,5 @@
|
||||
config INTEL_POWERCLAMP
|
||||
tristate "Intel PowerClamp idle injection driver"
|
||||
depends on THERMAL
|
||||
depends on X86
|
||||
depends on CPU_SUP_INTEL
|
||||
help
|
||||
|
@@ -220,6 +220,7 @@ static int int3403_add(struct platform_device *pdev)
|
||||
{
|
||||
struct int3403_priv *priv;
|
||||
int result = 0;
|
||||
unsigned long long tmp;
|
||||
acpi_status status;
|
||||
|
||||
priv = devm_kzalloc(&pdev->dev, sizeof(struct int3403_priv),
|
||||
@@ -234,19 +235,18 @@ static int int3403_add(struct platform_device *pdev)
|
||||
goto err;
|
||||
}
|
||||
|
||||
status = acpi_evaluate_integer(priv->adev->handle, "PTYP",
|
||||
NULL, &priv->type);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
unsigned long long tmp;
|
||||
|
||||
status = acpi_evaluate_integer(priv->adev->handle, "_TMP",
|
||||
NULL, &tmp);
|
||||
status = acpi_evaluate_integer(priv->adev->handle, "_TMP",
|
||||
NULL, &tmp);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
status = acpi_evaluate_integer(priv->adev->handle, "PTYP",
|
||||
NULL, &priv->type);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
result = -EINVAL;
|
||||
goto err;
|
||||
} else {
|
||||
priv->type = INT3403_TYPE_SENSOR;
|
||||
}
|
||||
} else {
|
||||
priv->type = INT3403_TYPE_SENSOR;
|
||||
}
|
||||
|
||||
platform_set_drvdata(pdev, priv);
|
||||
|
@@ -81,22 +81,13 @@ static ssize_t power_limit_##index##_##suffix##_show(struct device *dev, \
|
||||
struct device_attribute *attr, \
|
||||
char *buf) \
|
||||
{ \
|
||||
struct pci_dev *pci_dev; \
|
||||
struct platform_device *pdev; \
|
||||
struct proc_thermal_device *proc_dev; \
|
||||
struct proc_thermal_device *proc_dev = dev_get_drvdata(dev); \
|
||||
\
|
||||
if (proc_thermal_emum_mode == PROC_THERMAL_NONE) { \
|
||||
dev_warn(dev, "Attempted to get power limit before device was initialized!\n"); \
|
||||
return 0; \
|
||||
} \
|
||||
\
|
||||
if (proc_thermal_emum_mode == PROC_THERMAL_PLATFORM_DEV) { \
|
||||
pdev = to_platform_device(dev); \
|
||||
proc_dev = platform_get_drvdata(pdev); \
|
||||
} else { \
|
||||
pci_dev = to_pci_dev(dev); \
|
||||
proc_dev = pci_get_drvdata(pci_dev); \
|
||||
} \
|
||||
return sprintf(buf, "%lu\n",\
|
||||
(unsigned long)proc_dev->power_limits[index].suffix * 1000); \
|
||||
}
|
||||
@@ -274,7 +265,7 @@ static void proc_thermal_notify(acpi_handle handle, u32 event, void *data)
|
||||
THERMAL_DEVICE_POWER_CAPABILITY_CHANGED);
|
||||
break;
|
||||
default:
|
||||
dev_err(proc_priv->dev, "Unsupported event [0x%x]\n", event);
|
||||
dev_dbg(proc_priv->dev, "Unsupported event [0x%x]\n", event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
在新工单中引用
屏蔽一个用户