Commit 2e70ea7f authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

Merge branches 'thermal-intel' and 'thermal-drivers'

Merge thermal control driver changes for 6.1-rc1:

 - Use module_pci_driver() macro in the int340x processor_thermal
   driver (Shang XiaoJing).

 - Use get_cpu() instead of smp_processor_id() in the intel_powerclamp
   thermal driver to prevent it from crashing and remove unused
   accounting for IRQ wakes from it (Srinivas Pandruvada).

 - Consolidate priv->data_vault checks in int340x_thermal (Rafael
   Wysocki).

 - Check the policy first in cpufreq_cooling_register() (Xuewen Yan).

 - Drop redundant error message from da9062-thermal (zhaoxiao).

 - Drop of_match_ptr() from thermal_mmio (Jean Delvare).

* thermal-intel:
  thermal: int340x: processor_thermal: Use module_pci_driver() macro
  thermal: intel_powerclamp: Remove accounting for IRQ wakes
  thermal: intel_powerclamp: Use get_cpu() instead of smp_processor_id() to avoid crash
  thermal: int340x_thermal: Consolidate priv->data_vault checks

* thermal-drivers:
  thermal: cpufreq_cooling: Check the policy first in cpufreq_cooling_register()
  thermal: da9062-thermal: Drop redundant error message
  thermal/drivers/thermal_mmio: Drop of_match_ptr()
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -501,17 +501,17 @@ __cpufreq_cooling_register(struct device_node *np,
	struct thermal_cooling_device_ops *cooling_ops;
	char *name;

	if (IS_ERR_OR_NULL(policy)) {
		pr_err("%s: cpufreq policy isn't valid: %p\n", __func__, policy);
		return ERR_PTR(-EINVAL);
	}

	dev = get_cpu_device(policy->cpu);
	if (unlikely(!dev)) {
		pr_warn("No cpu device for cpu %d\n", policy->cpu);
		return ERR_PTR(-ENODEV);
	}

	if (IS_ERR_OR_NULL(policy)) {
		pr_err("%s: cpufreq policy isn't valid: %p\n", __func__, policy);
		return ERR_PTR(-EINVAL);
	}

	i = cpufreq_table_count_valid_entries(policy);
	if (!i) {
		pr_debug("%s: CPUFreq table not found or has no valid entries\n",
+2 −3
Original line number Diff line number Diff line
@@ -248,10 +248,9 @@ static int da9062_thermal_probe(struct platform_device *pdev)
		jiffies_to_msecs(thermal->zone->passive_delay_jiffies));

	ret = platform_get_irq_byname(pdev, "THERMAL");
	if (ret < 0) {
		dev_err(&pdev->dev, "Failed to get platform IRQ.\n");
	if (ret < 0)
		goto err_zone;
	}

	thermal->irq = ret;

	ret = request_threaded_irq(thermal->irq, NULL,
+2 −3
Original line number Diff line number Diff line
@@ -614,8 +614,7 @@ static int int3400_thermal_probe(struct platform_device *pdev)

free_sysfs:
	cleanup_odvp(priv);
	if (priv->data_vault) {
		if (!ZERO_OR_NULL_PTR(priv->data_vault))
	if (!ZERO_OR_NULL_PTR(priv->data_vault)) {
		sysfs_remove_group(&pdev->dev.kobj, &data_attribute_group);
		kfree(priv->data_vault);
	}
+1 −12
Original line number Diff line number Diff line
@@ -373,18 +373,7 @@ static struct pci_driver proc_thermal_pci_driver = {
	.driver.pm	= &proc_thermal_pci_pm,
};

static int __init proc_thermal_init(void)
{
	return pci_register_driver(&proc_thermal_pci_driver);
}

static void __exit proc_thermal_exit(void)
{
	pci_unregister_driver(&proc_thermal_pci_driver);
}

module_init(proc_thermal_init);
module_exit(proc_thermal_exit);
module_pci_driver(proc_thermal_pci_driver);

MODULE_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>");
MODULE_DESCRIPTION("Processor Thermal Reporting Device Driver");
+1 −12
Original line number Diff line number Diff line
@@ -151,18 +151,7 @@ static struct pci_driver proc_thermal_pci_driver = {
	.driver.pm	= &proc_thermal_pci_pm,
};

static int __init proc_thermal_init(void)
{
	return pci_register_driver(&proc_thermal_pci_driver);
}

static void __exit proc_thermal_exit(void)
{
	pci_unregister_driver(&proc_thermal_pci_driver);
}

module_init(proc_thermal_init);
module_exit(proc_thermal_exit);
module_pci_driver(proc_thermal_pci_driver);

MODULE_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>");
MODULE_DESCRIPTION("Processor Thermal Reporting Device Driver");
Loading