diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2014-12-09 19:15:40 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-12-10 18:29:02 -0500 |
commit | bbb16fef19122ec9f20fb865c45375e12f85d2a1 (patch) | |
tree | 0a45a79cf829bd343b473c89bc9847b84631f782 /drivers/acpi/fan.c | |
parent | b2776bf7149bddd1f4161f14f79520f17fc1d71d (diff) |
ACPI / Fan: Use bus id as the name for non PNP0C0B (Fan) devices
The _ART (Active Cooling Relationship Table), specifies relationship
among heat generating sources to a target active cooling device like
fan. The _ART table refers to actual bus id name for specifying relationship.
Naming "Fan" is not enough as name in the _ART table can change on every
platform, to establish relationship for user space thermal controllers.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/fan.c')
-rw-r--r-- | drivers/acpi/fan.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c index caf9b76b7ef8..7a36f02598a6 100644 --- a/drivers/acpi/fan.c +++ b/drivers/acpi/fan.c | |||
@@ -325,6 +325,7 @@ static int acpi_fan_probe(struct platform_device *pdev) | |||
325 | struct thermal_cooling_device *cdev; | 325 | struct thermal_cooling_device *cdev; |
326 | struct acpi_fan *fan; | 326 | struct acpi_fan *fan; |
327 | struct acpi_device *device = ACPI_COMPANION(&pdev->dev); | 327 | struct acpi_device *device = ACPI_COMPANION(&pdev->dev); |
328 | char *name; | ||
328 | 329 | ||
329 | fan = devm_kzalloc(&pdev->dev, sizeof(*fan), GFP_KERNEL); | 330 | fan = devm_kzalloc(&pdev->dev, sizeof(*fan), GFP_KERNEL); |
330 | if (!fan) { | 331 | if (!fan) { |
@@ -346,7 +347,12 @@ static int acpi_fan_probe(struct platform_device *pdev) | |||
346 | } | 347 | } |
347 | } | 348 | } |
348 | 349 | ||
349 | cdev = thermal_cooling_device_register("Fan", device, | 350 | if (!strncmp(pdev->name, "PNP0C0B", strlen("PNP0C0B"))) |
351 | name = "Fan"; | ||
352 | else | ||
353 | name = acpi_device_bid(device); | ||
354 | |||
355 | cdev = thermal_cooling_device_register(name, device, | ||
350 | &fan_cooling_ops); | 356 | &fan_cooling_ops); |
351 | if (IS_ERR(cdev)) { | 357 | if (IS_ERR(cdev)) { |
352 | result = PTR_ERR(cdev); | 358 | result = PTR_ERR(cdev); |