Commit d3bff627 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge branch 'thermal-misc'

Merge thermal control changes related to switching over platform drivers
to using void remove callbacks.

* thermal-misc: (31 commits)
  thermal: amlogic: Convert to platform remove callback returning void
  thermal: uniphier: Convert to platform remove callback returning void
  thermal: ti-bandgap: Convert to platform remove callback returning void
  thermal: tegra-bpmp: Convert to platform remove callback returning void
  thermal: soctherm: Convert to platform remove callback returning void
  thermal: stm: Convert to platform remove callback returning void
  thermal: sprd: Convert to platform remove callback returning void
  thermal: spear: Convert to platform remove callback returning void
  thermal: exynos_tmu: Convert to platform remove callback returning void
  thermal: rzg2l: Convert to platform remove callback returning void
  thermal: rockchip: Convert to platform remove callback returning void
  thermal: rcar: Convert to platform remove callback returning void
  thermal: rcar_gen3: Convert to platform remove callback returning void
  thermal: tsens: Convert to platform remove callback returning void
  thermal: lvts: Convert to platform remove callback returning void
  thermal: kirkwood: Convert to platform remove callback returning void
  thermal: k3_j72xx_bandgap: Convert to platform remove callback returning void
  thermal: k3_bandgap: Convert to platform remove callback returning void
  thermal: int3406: Convert to platform remove callback returning void
  thermal: int3403: Convert to platform remove callback returning void
  ...
parents c9962609 eea6c262
...@@ -291,11 +291,11 @@ static int amlogic_thermal_probe(struct platform_device *pdev) ...@@ -291,11 +291,11 @@ static int amlogic_thermal_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int amlogic_thermal_remove(struct platform_device *pdev) static void amlogic_thermal_remove(struct platform_device *pdev)
{ {
struct amlogic_thermal *data = platform_get_drvdata(pdev); struct amlogic_thermal *data = platform_get_drvdata(pdev);
return amlogic_thermal_disable(data); amlogic_thermal_disable(data);
} }
static int __maybe_unused amlogic_thermal_suspend(struct device *dev) static int __maybe_unused amlogic_thermal_suspend(struct device *dev)
...@@ -321,8 +321,8 @@ static struct platform_driver amlogic_thermal_driver = { ...@@ -321,8 +321,8 @@ static struct platform_driver amlogic_thermal_driver = {
.pm = &amlogic_thermal_pm_ops, .pm = &amlogic_thermal_pm_ops,
.of_match_table = of_amlogic_thermal_match, .of_match_table = of_amlogic_thermal_match,
}, },
.probe = amlogic_thermal_probe, .probe = amlogic_thermal_probe,
.remove = amlogic_thermal_remove, .remove_new = amlogic_thermal_remove,
}; };
module_platform_driver(amlogic_thermal_driver); module_platform_driver(amlogic_thermal_driver);
......
...@@ -965,19 +965,17 @@ static int armada_thermal_probe(struct platform_device *pdev) ...@@ -965,19 +965,17 @@ static int armada_thermal_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int armada_thermal_exit(struct platform_device *pdev) static void armada_thermal_exit(struct platform_device *pdev)
{ {
struct armada_drvdata *drvdata = platform_get_drvdata(pdev); struct armada_drvdata *drvdata = platform_get_drvdata(pdev);
if (drvdata->type == LEGACY) if (drvdata->type == LEGACY)
thermal_zone_device_unregister(drvdata->data.tz); thermal_zone_device_unregister(drvdata->data.tz);
return 0;
} }
static struct platform_driver armada_thermal_driver = { static struct platform_driver armada_thermal_driver = {
.probe = armada_thermal_probe, .probe = armada_thermal_probe,
.remove = armada_thermal_exit, .remove_new = armada_thermal_exit,
.driver = { .driver = {
.name = "armada_thermal", .name = "armada_thermal",
.of_match_table = armada_thermal_id_table, .of_match_table = armada_thermal_id_table,
......
...@@ -282,19 +282,17 @@ static int bcm2835_thermal_probe(struct platform_device *pdev) ...@@ -282,19 +282,17 @@ static int bcm2835_thermal_probe(struct platform_device *pdev)
return err; return err;
} }
static int bcm2835_thermal_remove(struct platform_device *pdev) static void bcm2835_thermal_remove(struct platform_device *pdev)
{ {
struct bcm2835_thermal_data *data = platform_get_drvdata(pdev); struct bcm2835_thermal_data *data = platform_get_drvdata(pdev);
debugfs_remove_recursive(data->debugfsdir); debugfs_remove_recursive(data->debugfsdir);
clk_disable_unprepare(data->clk); clk_disable_unprepare(data->clk);
return 0;
} }
static struct platform_driver bcm2835_thermal_driver = { static struct platform_driver bcm2835_thermal_driver = {
.probe = bcm2835_thermal_probe, .probe = bcm2835_thermal_probe,
.remove = bcm2835_thermal_remove, .remove_new = bcm2835_thermal_remove,
.driver = { .driver = {
.name = "bcm2835_thermal", .name = "bcm2835_thermal",
.of_match_table = bcm2835_thermal_of_match_table, .of_match_table = bcm2835_thermal_of_match_table,
......
...@@ -65,13 +65,11 @@ static int ns_thermal_probe(struct platform_device *pdev) ...@@ -65,13 +65,11 @@ static int ns_thermal_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int ns_thermal_remove(struct platform_device *pdev) static void ns_thermal_remove(struct platform_device *pdev)
{ {
void __iomem *pvtmon = platform_get_drvdata(pdev); void __iomem *pvtmon = platform_get_drvdata(pdev);
iounmap(pvtmon); iounmap(pvtmon);
return 0;
} }
static const struct of_device_id ns_thermal_of_match[] = { static const struct of_device_id ns_thermal_of_match[] = {
...@@ -82,7 +80,7 @@ MODULE_DEVICE_TABLE(of, ns_thermal_of_match); ...@@ -82,7 +80,7 @@ MODULE_DEVICE_TABLE(of, ns_thermal_of_match);
static struct platform_driver ns_thermal_driver = { static struct platform_driver ns_thermal_driver = {
.probe = ns_thermal_probe, .probe = ns_thermal_probe,
.remove = ns_thermal_remove, .remove_new = ns_thermal_remove,
.driver = { .driver = {
.name = "ns-thermal", .name = "ns-thermal",
.of_match_table = ns_thermal_of_match, .of_match_table = ns_thermal_of_match,
......
...@@ -239,19 +239,18 @@ static int da9062_thermal_probe(struct platform_device *pdev) ...@@ -239,19 +239,18 @@ static int da9062_thermal_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int da9062_thermal_remove(struct platform_device *pdev) static void da9062_thermal_remove(struct platform_device *pdev)
{ {
struct da9062_thermal *thermal = platform_get_drvdata(pdev); struct da9062_thermal *thermal = platform_get_drvdata(pdev);
free_irq(thermal->irq, thermal); free_irq(thermal->irq, thermal);
cancel_delayed_work_sync(&thermal->work); cancel_delayed_work_sync(&thermal->work);
thermal_zone_device_unregister(thermal->zone); thermal_zone_device_unregister(thermal->zone);
return 0;
} }
static struct platform_driver da9062_thermal_driver = { static struct platform_driver da9062_thermal_driver = {
.probe = da9062_thermal_probe, .probe = da9062_thermal_probe,
.remove = da9062_thermal_remove, .remove_new = da9062_thermal_remove,
.driver = { .driver = {
.name = "da9062-thermal", .name = "da9062-thermal",
.of_match_table = da9062_compatible_reg_id_table, .of_match_table = da9062_compatible_reg_id_table,
......
...@@ -158,21 +158,19 @@ static int dove_thermal_probe(struct platform_device *pdev) ...@@ -158,21 +158,19 @@ static int dove_thermal_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int dove_thermal_exit(struct platform_device *pdev) static void dove_thermal_exit(struct platform_device *pdev)
{ {
struct thermal_zone_device *dove_thermal = struct thermal_zone_device *dove_thermal =
platform_get_drvdata(pdev); platform_get_drvdata(pdev);
thermal_zone_device_unregister(dove_thermal); thermal_zone_device_unregister(dove_thermal);
return 0;
} }
MODULE_DEVICE_TABLE(of, dove_thermal_id_table); MODULE_DEVICE_TABLE(of, dove_thermal_id_table);
static struct platform_driver dove_thermal_driver = { static struct platform_driver dove_thermal_driver = {
.probe = dove_thermal_probe, .probe = dove_thermal_probe,
.remove = dove_thermal_exit, .remove_new = dove_thermal_exit,
.driver = { .driver = {
.name = "dove_thermal", .name = "dove_thermal",
.of_match_table = dove_thermal_id_table, .of_match_table = dove_thermal_id_table,
......
...@@ -597,7 +597,7 @@ static int hisi_thermal_probe(struct platform_device *pdev) ...@@ -597,7 +597,7 @@ static int hisi_thermal_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int hisi_thermal_remove(struct platform_device *pdev) static void hisi_thermal_remove(struct platform_device *pdev)
{ {
struct hisi_thermal_data *data = platform_get_drvdata(pdev); struct hisi_thermal_data *data = platform_get_drvdata(pdev);
int i; int i;
...@@ -608,8 +608,6 @@ static int hisi_thermal_remove(struct platform_device *pdev) ...@@ -608,8 +608,6 @@ static int hisi_thermal_remove(struct platform_device *pdev)
hisi_thermal_toggle_sensor(sensor, false); hisi_thermal_toggle_sensor(sensor, false);
data->ops->disable_sensor(sensor); data->ops->disable_sensor(sensor);
} }
return 0;
} }
static int hisi_thermal_suspend(struct device *dev) static int hisi_thermal_suspend(struct device *dev)
...@@ -644,7 +642,7 @@ static struct platform_driver hisi_thermal_driver = { ...@@ -644,7 +642,7 @@ static struct platform_driver hisi_thermal_driver = {
.of_match_table = of_hisi_thermal_match, .of_match_table = of_hisi_thermal_match,
}, },
.probe = hisi_thermal_probe, .probe = hisi_thermal_probe,
.remove = hisi_thermal_remove, .remove_new = hisi_thermal_remove,
}; };
module_platform_driver(hisi_thermal_driver); module_platform_driver(hisi_thermal_driver);
......
...@@ -363,7 +363,7 @@ static int imx8mm_tmu_probe(struct platform_device *pdev) ...@@ -363,7 +363,7 @@ static int imx8mm_tmu_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int imx8mm_tmu_remove(struct platform_device *pdev) static void imx8mm_tmu_remove(struct platform_device *pdev)
{ {
struct imx8mm_tmu *tmu = platform_get_drvdata(pdev); struct imx8mm_tmu *tmu = platform_get_drvdata(pdev);
...@@ -372,8 +372,6 @@ static int imx8mm_tmu_remove(struct platform_device *pdev) ...@@ -372,8 +372,6 @@ static int imx8mm_tmu_remove(struct platform_device *pdev)
clk_disable_unprepare(tmu->clk); clk_disable_unprepare(tmu->clk);
platform_set_drvdata(pdev, NULL); platform_set_drvdata(pdev, NULL);
return 0;
} }
static struct thermal_soc_data imx8mm_tmu_data = { static struct thermal_soc_data imx8mm_tmu_data = {
...@@ -401,7 +399,7 @@ static struct platform_driver imx8mm_tmu = { ...@@ -401,7 +399,7 @@ static struct platform_driver imx8mm_tmu = {
.of_match_table = imx8mm_tmu_table, .of_match_table = imx8mm_tmu_table,
}, },
.probe = imx8mm_tmu_probe, .probe = imx8mm_tmu_probe,
.remove = imx8mm_tmu_remove, .remove_new = imx8mm_tmu_remove,
}; };
module_platform_driver(imx8mm_tmu); module_platform_driver(imx8mm_tmu);
......
...@@ -771,7 +771,7 @@ static int imx_thermal_probe(struct platform_device *pdev) ...@@ -771,7 +771,7 @@ static int imx_thermal_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int imx_thermal_remove(struct platform_device *pdev) static void imx_thermal_remove(struct platform_device *pdev)
{ {
struct imx_thermal_data *data = platform_get_drvdata(pdev); struct imx_thermal_data *data = platform_get_drvdata(pdev);
...@@ -780,8 +780,6 @@ static int imx_thermal_remove(struct platform_device *pdev) ...@@ -780,8 +780,6 @@ static int imx_thermal_remove(struct platform_device *pdev)
thermal_zone_device_unregister(data->tz); thermal_zone_device_unregister(data->tz);
imx_thermal_unregister_legacy_cooling(data); imx_thermal_unregister_legacy_cooling(data);
return 0;
} }
static int __maybe_unused imx_thermal_suspend(struct device *dev) static int __maybe_unused imx_thermal_suspend(struct device *dev)
...@@ -880,7 +878,7 @@ static struct platform_driver imx_thermal = { ...@@ -880,7 +878,7 @@ static struct platform_driver imx_thermal = {
.of_match_table = of_imx_thermal_match, .of_match_table = of_imx_thermal_match,
}, },
.probe = imx_thermal_probe, .probe = imx_thermal_probe,
.remove = imx_thermal_remove, .remove_new = imx_thermal_remove,
}; };
module_platform_driver(imx_thermal); module_platform_driver(imx_thermal);
......
...@@ -674,7 +674,7 @@ static int int3400_thermal_probe(struct platform_device *pdev) ...@@ -674,7 +674,7 @@ static int int3400_thermal_probe(struct platform_device *pdev)
return result; return result;
} }
static int int3400_thermal_remove(struct platform_device *pdev) static void int3400_thermal_remove(struct platform_device *pdev)
{ {
struct int3400_thermal_priv *priv = platform_get_drvdata(pdev); struct int3400_thermal_priv *priv = platform_get_drvdata(pdev);
...@@ -698,7 +698,6 @@ static int int3400_thermal_remove(struct platform_device *pdev) ...@@ -698,7 +698,6 @@ static int int3400_thermal_remove(struct platform_device *pdev)
kfree(priv->trts); kfree(priv->trts);
kfree(priv->arts); kfree(priv->arts);
kfree(priv); kfree(priv);
return 0;
} }
static const struct acpi_device_id int3400_thermal_match[] = { static const struct acpi_device_id int3400_thermal_match[] = {
...@@ -714,7 +713,7 @@ MODULE_DEVICE_TABLE(acpi, int3400_thermal_match); ...@@ -714,7 +713,7 @@ MODULE_DEVICE_TABLE(acpi, int3400_thermal_match);
static struct platform_driver int3400_thermal_driver = { static struct platform_driver int3400_thermal_driver = {
.probe = int3400_thermal_probe, .probe = int3400_thermal_probe,
.remove = int3400_thermal_remove, .remove_new = int3400_thermal_remove,
.driver = { .driver = {
.name = "int3400 thermal", .name = "int3400 thermal",
.acpi_match_table = ACPI_PTR(int3400_thermal_match), .acpi_match_table = ACPI_PTR(int3400_thermal_match),
......
...@@ -36,11 +36,9 @@ static int int3401_add(struct platform_device *pdev) ...@@ -36,11 +36,9 @@ static int int3401_add(struct platform_device *pdev)
return ret; return ret;
} }
static int int3401_remove(struct platform_device *pdev) static void int3401_remove(struct platform_device *pdev)
{ {
proc_thermal_remove(platform_get_drvdata(pdev)); proc_thermal_remove(platform_get_drvdata(pdev));
return 0;
} }
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
...@@ -62,7 +60,7 @@ static SIMPLE_DEV_PM_OPS(int3401_proc_thermal_pm, int3401_thermal_suspend, ...@@ -62,7 +60,7 @@ static SIMPLE_DEV_PM_OPS(int3401_proc_thermal_pm, int3401_thermal_suspend,
static struct platform_driver int3401_driver = { static struct platform_driver int3401_driver = {
.probe = int3401_add, .probe = int3401_add,
.remove = int3401_remove, .remove_new = int3401_remove,
.driver = { .driver = {
.name = "int3401 thermal", .name = "int3401 thermal",
.acpi_match_table = int3401_device_ids, .acpi_match_table = int3401_device_ids,
......
...@@ -71,15 +71,13 @@ static int int3402_thermal_probe(struct platform_device *pdev) ...@@ -71,15 +71,13 @@ static int int3402_thermal_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int int3402_thermal_remove(struct platform_device *pdev) static void int3402_thermal_remove(struct platform_device *pdev)
{ {
struct int3402_thermal_data *d = platform_get_drvdata(pdev); struct int3402_thermal_data *d = platform_get_drvdata(pdev);
acpi_remove_notify_handler(d->handle, acpi_remove_notify_handler(d->handle,
ACPI_DEVICE_NOTIFY, int3402_notify); ACPI_DEVICE_NOTIFY, int3402_notify);
int340x_thermal_zone_remove(d->int340x_zone); int340x_thermal_zone_remove(d->int340x_zone);
return 0;
} }
static const struct acpi_device_id int3402_thermal_match[] = { static const struct acpi_device_id int3402_thermal_match[] = {
...@@ -91,7 +89,7 @@ MODULE_DEVICE_TABLE(acpi, int3402_thermal_match); ...@@ -91,7 +89,7 @@ MODULE_DEVICE_TABLE(acpi, int3402_thermal_match);
static struct platform_driver int3402_thermal_driver = { static struct platform_driver int3402_thermal_driver = {
.probe = int3402_thermal_probe, .probe = int3402_thermal_probe,
.remove = int3402_thermal_remove, .remove_new = int3402_thermal_remove,
.driver = { .driver = {
.name = "int3402 thermal", .name = "int3402 thermal",
.acpi_match_table = int3402_thermal_match, .acpi_match_table = int3402_thermal_match,
......
...@@ -262,7 +262,7 @@ static int int3403_add(struct platform_device *pdev) ...@@ -262,7 +262,7 @@ static int int3403_add(struct platform_device *pdev)
return result; return result;
} }
static int int3403_remove(struct platform_device *pdev) static void int3403_remove(struct platform_device *pdev)
{ {
struct int3403_priv *priv = platform_get_drvdata(pdev); struct int3403_priv *priv = platform_get_drvdata(pdev);
...@@ -277,8 +277,6 @@ static int int3403_remove(struct platform_device *pdev) ...@@ -277,8 +277,6 @@ static int int3403_remove(struct platform_device *pdev)
default: default:
break; break;
} }
return 0;
} }
static const struct acpi_device_id int3403_device_ids[] = { static const struct acpi_device_id int3403_device_ids[] = {
...@@ -293,7 +291,7 @@ MODULE_DEVICE_TABLE(acpi, int3403_device_ids); ...@@ -293,7 +291,7 @@ MODULE_DEVICE_TABLE(acpi, int3403_device_ids);
static struct platform_driver int3403_driver = { static struct platform_driver int3403_driver = {
.probe = int3403_add, .probe = int3403_add,
.remove = int3403_remove, .remove_new = int3403_remove,
.driver = { .driver = {
.name = "int3403 thermal", .name = "int3403 thermal",
.acpi_match_table = int3403_device_ids, .acpi_match_table = int3403_device_ids,
......
...@@ -178,13 +178,12 @@ static int int3406_thermal_probe(struct platform_device *pdev) ...@@ -178,13 +178,12 @@ static int int3406_thermal_probe(struct platform_device *pdev)
return -ENODEV; return -ENODEV;
} }
static int int3406_thermal_remove(struct platform_device *pdev) static void int3406_thermal_remove(struct platform_device *pdev)
{ {
struct int3406_thermal_data *d = platform_get_drvdata(pdev); struct int3406_thermal_data *d = platform_get_drvdata(pdev);
thermal_cooling_device_unregister(d->cooling_dev); thermal_cooling_device_unregister(d->cooling_dev);
kfree(d->br); kfree(d->br);
return 0;
} }
static const struct acpi_device_id int3406_thermal_match[] = { static const struct acpi_device_id int3406_thermal_match[] = {
...@@ -196,7 +195,7 @@ MODULE_DEVICE_TABLE(acpi, int3406_thermal_match); ...@@ -196,7 +195,7 @@ MODULE_DEVICE_TABLE(acpi, int3406_thermal_match);
static struct platform_driver int3406_thermal_driver = { static struct platform_driver int3406_thermal_driver = {
.probe = int3406_thermal_probe, .probe = int3406_thermal_probe,
.remove = int3406_thermal_remove, .remove_new = int3406_thermal_remove,
.driver = { .driver = {
.name = "int3406 thermal", .name = "int3406 thermal",
.acpi_match_table = int3406_thermal_match, .acpi_match_table = int3406_thermal_match,
......
...@@ -235,12 +235,10 @@ static int k3_bandgap_probe(struct platform_device *pdev) ...@@ -235,12 +235,10 @@ static int k3_bandgap_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int k3_bandgap_remove(struct platform_device *pdev) static void k3_bandgap_remove(struct platform_device *pdev)
{ {
pm_runtime_put_sync(&pdev->dev); pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
return 0;
} }
static const struct of_device_id of_k3_bandgap_match[] = { static const struct of_device_id of_k3_bandgap_match[] = {
...@@ -253,7 +251,7 @@ MODULE_DEVICE_TABLE(of, of_k3_bandgap_match); ...@@ -253,7 +251,7 @@ MODULE_DEVICE_TABLE(of, of_k3_bandgap_match);
static struct platform_driver k3_bandgap_sensor_driver = { static struct platform_driver k3_bandgap_sensor_driver = {
.probe = k3_bandgap_probe, .probe = k3_bandgap_probe,
.remove = k3_bandgap_remove, .remove_new = k3_bandgap_remove,
.driver = { .driver = {
.name = "k3-soc-thermal", .name = "k3-soc-thermal",
.of_match_table = of_k3_bandgap_match, .of_match_table = of_k3_bandgap_match,
......
...@@ -521,12 +521,10 @@ static int k3_j72xx_bandgap_probe(struct platform_device *pdev) ...@@ -521,12 +521,10 @@ static int k3_j72xx_bandgap_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int k3_j72xx_bandgap_remove(struct platform_device *pdev) static void k3_j72xx_bandgap_remove(struct platform_device *pdev)
{ {
pm_runtime_put_sync(&pdev->dev); pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
return 0;
} }
static const struct k3_j72xx_bandgap_data k3_j72xx_bandgap_j721e_data = { static const struct k3_j72xx_bandgap_data k3_j72xx_bandgap_j721e_data = {
...@@ -552,7 +550,7 @@ MODULE_DEVICE_TABLE(of, of_k3_j72xx_bandgap_match); ...@@ -552,7 +550,7 @@ MODULE_DEVICE_TABLE(of, of_k3_j72xx_bandgap_match);
static struct platform_driver k3_j72xx_bandgap_sensor_driver = { static struct platform_driver k3_j72xx_bandgap_sensor_driver = {
.probe = k3_j72xx_bandgap_probe, .probe = k3_j72xx_bandgap_probe,
.remove = k3_j72xx_bandgap_remove, .remove_new = k3_j72xx_bandgap_remove,
.driver = { .driver = {
.name = "k3-j72xx-soc-thermal", .name = "k3-j72xx-soc-thermal",
.of_match_table = of_k3_j72xx_bandgap_match, .of_match_table = of_k3_j72xx_bandgap_match,
......
...@@ -90,21 +90,19 @@ static int kirkwood_thermal_probe(struct platform_device *pdev) ...@@ -90,21 +90,19 @@ static int kirkwood_thermal_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int kirkwood_thermal_exit(struct platform_device *pdev) static void kirkwood_thermal_exit(struct platform_device *pdev)
{ {
struct thermal_zone_device *kirkwood_thermal = struct thermal_zone_device *kirkwood_thermal =
platform_get_drvdata(pdev); platform_get_drvdata(pdev);
thermal_zone_device_unregister(kirkwood_thermal); thermal_zone_device_unregister(kirkwood_thermal);
return 0;
} }
MODULE_DEVICE_TABLE(of, kirkwood_thermal_id_table); MODULE_DEVICE_TABLE(of, kirkwood_thermal_id_table);
static struct platform_driver kirkwood_thermal_driver = { static struct platform_driver kirkwood_thermal_driver = {
.probe = kirkwood_thermal_probe, .probe = kirkwood_thermal_probe,
.remove = kirkwood_thermal_exit, .remove_new = kirkwood_thermal_exit,
.driver = { .driver = {
.name = "kirkwood_thermal", .name = "kirkwood_thermal",
.of_match_table = kirkwood_thermal_id_table, .of_match_table = kirkwood_thermal_id_table,
......
...@@ -1241,7 +1241,7 @@ static int lvts_probe(struct platform_device *pdev) ...@@ -1241,7 +1241,7 @@ static int lvts_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int lvts_remove(struct platform_device *pdev) static void lvts_remove(struct platform_device *pdev)
{ {
struct lvts_domain *lvts_td; struct lvts_domain *lvts_td;
int i; int i;
...@@ -1252,8 +1252,6 @@ static int lvts_remove(struct platform_device *pdev) ...@@ -1252,8 +1252,6 @@ static int lvts_remove(struct platform_device *pdev)
lvts_ctrl_set_enable(&lvts_td->lvts_ctrl[i], false); lvts_ctrl_set_enable(&lvts_td->lvts_ctrl[i], false);
lvts_debugfs_exit(lvts_td); lvts_debugfs_exit(lvts_td);
return 0;
} }
static const struct lvts_ctrl_data mt8195_lvts_mcu_data_ctrl[] = { static const struct lvts_ctrl_data mt8195_lvts_mcu_data_ctrl[] = {
...@@ -1354,7 +1352,7 @@ MODULE_DEVICE_TABLE(of, lvts_of_match); ...@@ -1354,7 +1352,7 @@ MODULE_DEVICE_TABLE(of, lvts_of_match);
static struct platform_driver lvts_driver = { static struct platform_driver lvts_driver = {
.probe = lvts_probe, .probe = lvts_probe,
.remove = lvts_remove, .remove_new = lvts_remove,
.driver = { .driver = {
.name = "mtk-lvts-thermal", .name = "mtk-lvts-thermal",
.of_match_table = lvts_of_match, .of_match_table = lvts_of_match,
......
...@@ -1319,7 +1319,7 @@ static int tsens_probe(struct platform_device *pdev) ...@@ -1319,7 +1319,7 @@ static int tsens_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int tsens_remove(struct platform_device *pdev) static void tsens_remove(struct platform_device *pdev)
{ {
struct tsens_priv *priv = platform_get_drvdata(pdev); struct tsens_priv *priv = platform_get_drvdata(pdev);
...@@ -1327,13 +1327,11 @@ static int tsens_remove(struct platform_device *pdev) ...@@ -1327,13 +1327,11 @@ static int tsens_remove(struct platform_device *pdev)
tsens_disable_irq(priv); tsens_disable_irq(priv);
if (priv->ops->disable) if (priv->ops->disable)
priv->ops->disable(priv); priv->ops->disable(priv);
return 0;
} }
static struct platform_driver tsens_driver = { static struct platform_driver tsens_driver = {
.probe = tsens_probe, .probe = tsens_probe,
.remove = tsens_remove, .remove_new = tsens_remove,
.driver = { .driver = {
.name = "qcom-tsens", .name = "qcom-tsens",
.pm = &tsens_pm_ops, .pm = &tsens_pm_ops,
......
...@@ -432,14 +432,12 @@ static const struct of_device_id rcar_gen3_thermal_dt_ids[] = { ...@@ -432,14 +432,12 @@ static const struct of_device_id rcar_gen3_thermal_dt_ids[] = {
}; };
MODULE_DEVICE_TABLE(of, rcar_gen3_thermal_dt_ids); MODULE_DEVICE_TABLE(of, rcar_gen3_thermal_dt_ids);
static int rcar_gen3_thermal_remove(struct platform_device *pdev) static void rcar_gen3_thermal_remove(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
pm_runtime_put(dev); pm_runtime_put(dev);
pm_runtime_disable(dev); pm_runtime_disable(dev);
return 0;
} }
static void rcar_gen3_hwmon_action(void *data) static void rcar_gen3_hwmon_action(void *data)
...@@ -594,7 +592,7 @@ static struct platform_driver rcar_gen3_thermal_driver = { ...@@ -594,7 +592,7 @@ static struct platform_driver rcar_gen3_thermal_driver = {
.of_match_table = rcar_gen3_thermal_dt_ids, .of_match_table = rcar_gen3_thermal_dt_ids,
}, },
.probe = rcar_gen3_thermal_probe, .probe = rcar_gen3_thermal_probe,
.remove = rcar_gen3_thermal_remove, .remove_new = rcar_gen3_thermal_remove,
}; };
module_platform_driver(rcar_gen3_thermal_driver); module_platform_driver(rcar_gen3_thermal_driver);
......
...@@ -371,7 +371,7 @@ static irqreturn_t rcar_thermal_irq(int irq, void *data) ...@@ -371,7 +371,7 @@ static irqreturn_t rcar_thermal_irq(int irq, void *data)
/* /*
* platform functions * platform functions
*/ */
static int rcar_thermal_remove(struct platform_device *pdev) static void rcar_thermal_remove(struct platform_device *pdev)
{ {
struct rcar_thermal_common *common = platform_get_drvdata(pdev); struct rcar_thermal_common *common = platform_get_drvdata(pdev);
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
...@@ -388,8 +388,6 @@ static int rcar_thermal_remove(struct platform_device *pdev) ...@@ -388,8 +388,6 @@ static int rcar_thermal_remove(struct platform_device *pdev)
pm_runtime_put(dev); pm_runtime_put(dev);
pm_runtime_disable(dev); pm_runtime_disable(dev);
return 0;
} }
static int rcar_thermal_probe(struct platform_device *pdev) static int rcar_thermal_probe(struct platform_device *pdev)
...@@ -581,7 +579,7 @@ static struct platform_driver rcar_thermal_driver = { ...@@ -581,7 +579,7 @@ static struct platform_driver rcar_thermal_driver = {
.of_match_table = rcar_thermal_dt_ids, .of_match_table = rcar_thermal_dt_ids,
}, },
.probe = rcar_thermal_probe, .probe = rcar_thermal_probe,
.remove = rcar_thermal_remove, .remove_new = rcar_thermal_remove,
}; };
module_platform_driver(rcar_thermal_driver); module_platform_driver(rcar_thermal_driver);
......
...@@ -1601,7 +1601,7 @@ static int rockchip_thermal_probe(struct platform_device *pdev) ...@@ -1601,7 +1601,7 @@ static int rockchip_thermal_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int rockchip_thermal_remove(struct platform_device *pdev) static void rockchip_thermal_remove(struct platform_device *pdev)
{ {
struct rockchip_thermal_data *thermal = platform_get_drvdata(pdev); struct rockchip_thermal_data *thermal = platform_get_drvdata(pdev);
int i; int i;
...@@ -1614,8 +1614,6 @@ static int rockchip_thermal_remove(struct platform_device *pdev) ...@@ -1614,8 +1614,6 @@ static int rockchip_thermal_remove(struct platform_device *pdev)
} }
thermal->chip->control(thermal->regs, false); thermal->chip->control(thermal->regs, false);
return 0;
} }
static int __maybe_unused rockchip_thermal_suspend(struct device *dev) static int __maybe_unused rockchip_thermal_suspend(struct device *dev)
...@@ -1691,7 +1689,7 @@ static struct platform_driver rockchip_thermal_driver = { ...@@ -1691,7 +1689,7 @@ static struct platform_driver rockchip_thermal_driver = {
.of_match_table = of_rockchip_thermal_match, .of_match_table = of_rockchip_thermal_match,
}, },
.probe = rockchip_thermal_probe, .probe = rockchip_thermal_probe,
.remove = rockchip_thermal_remove, .remove_new = rockchip_thermal_remove,
}; };
module_platform_driver(rockchip_thermal_driver); module_platform_driver(rockchip_thermal_driver);
......
...@@ -150,14 +150,12 @@ static void rzg2l_thermal_reset_assert_pm_disable_put(struct platform_device *pd ...@@ -150,14 +150,12 @@ static void rzg2l_thermal_reset_assert_pm_disable_put(struct platform_device *pd
reset_control_assert(priv->rstc); reset_control_assert(priv->rstc);
} }
static int rzg2l_thermal_remove(struct platform_device *pdev) static void rzg2l_thermal_remove(struct platform_device *pdev)
{ {
struct rzg2l_thermal_priv *priv = dev_get_drvdata(&pdev->dev); struct rzg2l_thermal_priv *priv = dev_get_drvdata(&pdev->dev);
thermal_remove_hwmon_sysfs(priv->zone); thermal_remove_hwmon_sysfs(priv->zone);
rzg2l_thermal_reset_assert_pm_disable_put(pdev); rzg2l_thermal_reset_assert_pm_disable_put(pdev);
return 0;
} }
static int rzg2l_thermal_probe(struct platform_device *pdev) static int rzg2l_thermal_probe(struct platform_device *pdev)
...@@ -242,7 +240,7 @@ static struct platform_driver rzg2l_thermal_driver = { ...@@ -242,7 +240,7 @@ static struct platform_driver rzg2l_thermal_driver = {
.of_match_table = rzg2l_thermal_dt_ids, .of_match_table = rzg2l_thermal_dt_ids,
}, },
.probe = rzg2l_thermal_probe, .probe = rzg2l_thermal_probe,
.remove = rzg2l_thermal_remove, .remove_new = rzg2l_thermal_remove,
}; };
module_platform_driver(rzg2l_thermal_driver); module_platform_driver(rzg2l_thermal_driver);
......
...@@ -1124,7 +1124,7 @@ static int exynos_tmu_probe(struct platform_device *pdev) ...@@ -1124,7 +1124,7 @@ static int exynos_tmu_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int exynos_tmu_remove(struct platform_device *pdev) static void exynos_tmu_remove(struct platform_device *pdev)
{ {
struct exynos_tmu_data *data = platform_get_drvdata(pdev); struct exynos_tmu_data *data = platform_get_drvdata(pdev);
...@@ -1137,8 +1137,6 @@ static int exynos_tmu_remove(struct platform_device *pdev) ...@@ -1137,8 +1137,6 @@ static int exynos_tmu_remove(struct platform_device *pdev)
if (!IS_ERR(data->regulator)) if (!IS_ERR(data->regulator))
regulator_disable(data->regulator); regulator_disable(data->regulator);
return 0;
} }
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
...@@ -1173,7 +1171,7 @@ static struct platform_driver exynos_tmu_driver = { ...@@ -1173,7 +1171,7 @@ static struct platform_driver exynos_tmu_driver = {
.of_match_table = exynos_tmu_match, .of_match_table = exynos_tmu_match,
}, },
.probe = exynos_tmu_probe, .probe = exynos_tmu_probe,
.remove = exynos_tmu_remove, .remove_new = exynos_tmu_remove,
}; };
module_platform_driver(exynos_tmu_driver); module_platform_driver(exynos_tmu_driver);
......
...@@ -150,7 +150,7 @@ static int spear_thermal_probe(struct platform_device *pdev) ...@@ -150,7 +150,7 @@ static int spear_thermal_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int spear_thermal_exit(struct platform_device *pdev) static void spear_thermal_exit(struct platform_device *pdev)
{ {
unsigned int actual_mask = 0; unsigned int actual_mask = 0;
struct thermal_zone_device *spear_thermal = platform_get_drvdata(pdev); struct thermal_zone_device *spear_thermal = platform_get_drvdata(pdev);
...@@ -163,8 +163,6 @@ static int spear_thermal_exit(struct platform_device *pdev) ...@@ -163,8 +163,6 @@ static int spear_thermal_exit(struct platform_device *pdev)
writel_relaxed(actual_mask & ~stdev->flags, stdev->thermal_base); writel_relaxed(actual_mask & ~stdev->flags, stdev->thermal_base);
clk_disable(stdev->clk); clk_disable(stdev->clk);
return 0;
} }
static const struct of_device_id spear_thermal_id_table[] = { static const struct of_device_id spear_thermal_id_table[] = {
...@@ -175,7 +173,7 @@ MODULE_DEVICE_TABLE(of, spear_thermal_id_table); ...@@ -175,7 +173,7 @@ MODULE_DEVICE_TABLE(of, spear_thermal_id_table);
static struct platform_driver spear_thermal_driver = { static struct platform_driver spear_thermal_driver = {
.probe = spear_thermal_probe, .probe = spear_thermal_probe,
.remove = spear_thermal_exit, .remove_new = spear_thermal_exit,
.driver = { .driver = {
.name = "spear_thermal", .name = "spear_thermal",
.pm = &spear_thermal_pm_ops, .pm = &spear_thermal_pm_ops,
......
...@@ -516,7 +516,7 @@ static int sprd_thm_resume(struct device *dev) ...@@ -516,7 +516,7 @@ static int sprd_thm_resume(struct device *dev)
} }
#endif #endif
static int sprd_thm_remove(struct platform_device *pdev) static void sprd_thm_remove(struct platform_device *pdev)
{ {
struct sprd_thermal_data *thm = platform_get_drvdata(pdev); struct sprd_thermal_data *thm = platform_get_drvdata(pdev);
int i; int i;
...@@ -528,7 +528,6 @@ static int sprd_thm_remove(struct platform_device *pdev) ...@@ -528,7 +528,6 @@ static int sprd_thm_remove(struct platform_device *pdev)
} }
clk_disable_unprepare(thm->clk); clk_disable_unprepare(thm->clk);
return 0;
} }
static const struct of_device_id sprd_thermal_of_match[] = { static const struct of_device_id sprd_thermal_of_match[] = {
...@@ -543,7 +542,7 @@ static const struct dev_pm_ops sprd_thermal_pm_ops = { ...@@ -543,7 +542,7 @@ static const struct dev_pm_ops sprd_thermal_pm_ops = {
static struct platform_driver sprd_thermal_driver = { static struct platform_driver sprd_thermal_driver = {
.probe = sprd_thm_probe, .probe = sprd_thm_probe,
.remove = sprd_thm_remove, .remove_new = sprd_thm_remove,
.driver = { .driver = {
.name = "sprd-thermal", .name = "sprd-thermal",
.pm = &sprd_thermal_pm_ops, .pm = &sprd_thermal_pm_ops,
......
...@@ -569,14 +569,12 @@ static int stm_thermal_probe(struct platform_device *pdev) ...@@ -569,14 +569,12 @@ static int stm_thermal_probe(struct platform_device *pdev)
return ret; return ret;
} }
static int stm_thermal_remove(struct platform_device *pdev) static void stm_thermal_remove(struct platform_device *pdev)
{ {
struct stm_thermal_sensor *sensor = platform_get_drvdata(pdev); struct stm_thermal_sensor *sensor = platform_get_drvdata(pdev);
stm_thermal_sensor_off(sensor); stm_thermal_sensor_off(sensor);
thermal_remove_hwmon_sysfs(sensor->th_dev); thermal_remove_hwmon_sysfs(sensor->th_dev);
return 0;
} }
static struct platform_driver stm_thermal_driver = { static struct platform_driver stm_thermal_driver = {
...@@ -586,7 +584,7 @@ static struct platform_driver stm_thermal_driver = { ...@@ -586,7 +584,7 @@ static struct platform_driver stm_thermal_driver = {
.of_match_table = stm_thermal_of_match, .of_match_table = stm_thermal_of_match,
}, },
.probe = stm_thermal_probe, .probe = stm_thermal_probe,
.remove = stm_thermal_remove, .remove_new = stm_thermal_remove,
}; };
module_platform_driver(stm_thermal_driver); module_platform_driver(stm_thermal_driver);
......
...@@ -2219,15 +2219,13 @@ static int tegra_soctherm_probe(struct platform_device *pdev) ...@@ -2219,15 +2219,13 @@ static int tegra_soctherm_probe(struct platform_device *pdev)
return err; return err;
} }
static int tegra_soctherm_remove(struct platform_device *pdev) static void tegra_soctherm_remove(struct platform_device *pdev)
{ {
struct tegra_soctherm *tegra = platform_get_drvdata(pdev); struct tegra_soctherm *tegra = platform_get_drvdata(pdev);
debugfs_remove_recursive(tegra->debugfs_dir); debugfs_remove_recursive(tegra->debugfs_dir);
soctherm_clk_enable(pdev, false); soctherm_clk_enable(pdev, false);
return 0;
} }
static int __maybe_unused soctherm_suspend(struct device *dev) static int __maybe_unused soctherm_suspend(struct device *dev)
...@@ -2274,7 +2272,7 @@ static SIMPLE_DEV_PM_OPS(tegra_soctherm_pm, soctherm_suspend, soctherm_resume); ...@@ -2274,7 +2272,7 @@ static SIMPLE_DEV_PM_OPS(tegra_soctherm_pm, soctherm_suspend, soctherm_resume);
static struct platform_driver tegra_soctherm_driver = { static struct platform_driver tegra_soctherm_driver = {
.probe = tegra_soctherm_probe, .probe = tegra_soctherm_probe,
.remove = tegra_soctherm_remove, .remove_new = tegra_soctherm_remove,
.driver = { .driver = {
.name = "tegra_soctherm", .name = "tegra_soctherm",
.pm = &tegra_soctherm_pm, .pm = &tegra_soctherm_pm,
......
...@@ -300,13 +300,11 @@ static int tegra_bpmp_thermal_probe(struct platform_device *pdev) ...@@ -300,13 +300,11 @@ static int tegra_bpmp_thermal_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int tegra_bpmp_thermal_remove(struct platform_device *pdev) static void tegra_bpmp_thermal_remove(struct platform_device *pdev)
{ {
struct tegra_bpmp_thermal *tegra = platform_get_drvdata(pdev); struct tegra_bpmp_thermal *tegra = platform_get_drvdata(pdev);
tegra_bpmp_free_mrq(tegra->bpmp, MRQ_THERMAL, tegra); tegra_bpmp_free_mrq(tegra->bpmp, MRQ_THERMAL, tegra);
return 0;
} }
static const struct of_device_id tegra_bpmp_thermal_of_match[] = { static const struct of_device_id tegra_bpmp_thermal_of_match[] = {
...@@ -317,7 +315,7 @@ MODULE_DEVICE_TABLE(of, tegra_bpmp_thermal_of_match); ...@@ -317,7 +315,7 @@ MODULE_DEVICE_TABLE(of, tegra_bpmp_thermal_of_match);
static struct platform_driver tegra_bpmp_thermal_driver = { static struct platform_driver tegra_bpmp_thermal_driver = {
.probe = tegra_bpmp_thermal_probe, .probe = tegra_bpmp_thermal_probe,
.remove = tegra_bpmp_thermal_remove, .remove_new = tegra_bpmp_thermal_remove,
.driver = { .driver = {
.name = "tegra-bpmp-thermal", .name = "tegra-bpmp-thermal",
.of_match_table = tegra_bpmp_thermal_of_match, .of_match_table = tegra_bpmp_thermal_of_match,
......
...@@ -1069,7 +1069,7 @@ int ti_bandgap_probe(struct platform_device *pdev) ...@@ -1069,7 +1069,7 @@ int ti_bandgap_probe(struct platform_device *pdev)
} }
static static
int ti_bandgap_remove(struct platform_device *pdev) void ti_bandgap_remove(struct platform_device *pdev)
{ {
struct ti_bandgap *bgp = platform_get_drvdata(pdev); struct ti_bandgap *bgp = platform_get_drvdata(pdev);
int i; int i;
...@@ -1098,8 +1098,6 @@ int ti_bandgap_remove(struct platform_device *pdev) ...@@ -1098,8 +1098,6 @@ int ti_bandgap_remove(struct platform_device *pdev)
if (TI_BANDGAP_HAS(bgp, TSHUT)) if (TI_BANDGAP_HAS(bgp, TSHUT))
free_irq(gpiod_to_irq(bgp->tshut_gpiod), NULL); free_irq(gpiod_to_irq(bgp->tshut_gpiod), NULL);
return 0;
} }
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
...@@ -1283,7 +1281,7 @@ MODULE_DEVICE_TABLE(of, of_ti_bandgap_match); ...@@ -1283,7 +1281,7 @@ MODULE_DEVICE_TABLE(of, of_ti_bandgap_match);
static struct platform_driver ti_bandgap_sensor_driver = { static struct platform_driver ti_bandgap_sensor_driver = {
.probe = ti_bandgap_probe, .probe = ti_bandgap_probe,
.remove = ti_bandgap_remove, .remove_new = ti_bandgap_remove,
.driver = { .driver = {
.name = "ti-soc-thermal", .name = "ti-soc-thermal",
.pm = DEV_PM_OPS, .pm = DEV_PM_OPS,
......
...@@ -317,14 +317,12 @@ static int uniphier_tm_probe(struct platform_device *pdev) ...@@ -317,14 +317,12 @@ static int uniphier_tm_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int uniphier_tm_remove(struct platform_device *pdev) static void uniphier_tm_remove(struct platform_device *pdev)
{ {
struct uniphier_tm_dev *tdev = platform_get_drvdata(pdev); struct uniphier_tm_dev *tdev = platform_get_drvdata(pdev);
/* disable sensor */ /* disable sensor */
uniphier_tm_disable_sensor(tdev); uniphier_tm_disable_sensor(tdev);
return 0;
} }
static const struct uniphier_tm_soc_data uniphier_pxs2_tm_data = { static const struct uniphier_tm_soc_data uniphier_pxs2_tm_data = {
...@@ -362,7 +360,7 @@ MODULE_DEVICE_TABLE(of, uniphier_tm_dt_ids); ...@@ -362,7 +360,7 @@ MODULE_DEVICE_TABLE(of, uniphier_tm_dt_ids);
static struct platform_driver uniphier_tm_driver = { static struct platform_driver uniphier_tm_driver = {
.probe = uniphier_tm_probe, .probe = uniphier_tm_probe,
.remove = uniphier_tm_remove, .remove_new = uniphier_tm_remove,
.driver = { .driver = {
.name = "uniphier-thermal", .name = "uniphier-thermal",
.of_match_table = uniphier_tm_dt_ids, .of_match_table = uniphier_tm_dt_ids,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment