Skip to content

Commit eefb5db

Browse files
committed
Merge tag 'devfreq-next-for-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux
Merge devfreq updates for v6.10 from Chanwoo Choi: - Convert the platfrom remove callback to .remove_new ops for following drivers: exyno-nocp.c/exynos-ppmu.c/mtk-cci-devfreq.c/ sun8i-a33-mbus.c/rk3399_dmc.c - Use DEFINE_SIMPLE_PM_OPS for exyno-bus.c driver * tag 'devfreq-next-for-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux: PM / devfreq: exynos: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions PM / devfreq: rk3399_dmc: Convert to platform remove callback returning void PM / devfreq: sun8i-a33-mbus: Convert to platform remove callback returning void PM / devfreq: mtk-cci: Convert to platform remove callback returning void PM / devfreq: exynos-ppmu: Convert to platform remove callback returning void PM / devfreq: exynos-nocp: Convert to platform remove callback returning void
2 parents dd5a440 + ccad360 commit eefb5db

File tree

6 files changed

+13
-26
lines changed

6 files changed

+13
-26
lines changed

drivers/devfreq/event/exynos-nocp.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,18 +275,16 @@ static int exynos_nocp_probe(struct platform_device *pdev)
275275
return 0;
276276
}
277277

278-
static int exynos_nocp_remove(struct platform_device *pdev)
278+
static void exynos_nocp_remove(struct platform_device *pdev)
279279
{
280280
struct exynos_nocp *nocp = platform_get_drvdata(pdev);
281281

282282
clk_disable_unprepare(nocp->clk);
283-
284-
return 0;
285283
}
286284

287285
static struct platform_driver exynos_nocp_driver = {
288286
.probe = exynos_nocp_probe,
289-
.remove = exynos_nocp_remove,
287+
.remove_new = exynos_nocp_remove,
290288
.driver = {
291289
.name = "exynos-nocp",
292290
.of_match_table = exynos_nocp_id_match,

drivers/devfreq/event/exynos-ppmu.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -692,18 +692,16 @@ static int exynos_ppmu_probe(struct platform_device *pdev)
692692
return 0;
693693
}
694694

695-
static int exynos_ppmu_remove(struct platform_device *pdev)
695+
static void exynos_ppmu_remove(struct platform_device *pdev)
696696
{
697697
struct exynos_ppmu *info = platform_get_drvdata(pdev);
698698

699699
clk_disable_unprepare(info->ppmu.clk);
700-
701-
return 0;
702700
}
703701

704702
static struct platform_driver exynos_ppmu_driver = {
705703
.probe = exynos_ppmu_probe,
706-
.remove = exynos_ppmu_remove,
704+
.remove_new = exynos_ppmu_remove,
707705
.driver = {
708706
.name = "exynos-ppmu",
709707
.of_match_table = exynos_ppmu_id_match,

drivers/devfreq/exynos-bus.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,6 @@ static void exynos_bus_shutdown(struct platform_device *pdev)
467467
devfreq_suspend_device(bus->devfreq);
468468
}
469469

470-
#ifdef CONFIG_PM_SLEEP
471470
static int exynos_bus_resume(struct device *dev)
472471
{
473472
struct exynos_bus *bus = dev_get_drvdata(dev);
@@ -495,11 +494,9 @@ static int exynos_bus_suspend(struct device *dev)
495494

496495
return 0;
497496
}
498-
#endif
499497

500-
static const struct dev_pm_ops exynos_bus_pm = {
501-
SET_SYSTEM_SLEEP_PM_OPS(exynos_bus_suspend, exynos_bus_resume)
502-
};
498+
static DEFINE_SIMPLE_DEV_PM_OPS(exynos_bus_pm,
499+
exynos_bus_suspend, exynos_bus_resume);
503500

504501
static const struct of_device_id exynos_bus_of_match[] = {
505502
{ .compatible = "samsung,exynos-bus", },
@@ -512,7 +509,7 @@ static struct platform_driver exynos_bus_platdrv = {
512509
.shutdown = exynos_bus_shutdown,
513510
.driver = {
514511
.name = "exynos-bus",
515-
.pm = &exynos_bus_pm,
512+
.pm = pm_sleep_ptr(&exynos_bus_pm),
516513
.of_match_table = exynos_bus_of_match,
517514
},
518515
};

drivers/devfreq/mtk-cci-devfreq.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ static int mtk_ccifreq_probe(struct platform_device *pdev)
392392
return ret;
393393
}
394394

395-
static int mtk_ccifreq_remove(struct platform_device *pdev)
395+
static void mtk_ccifreq_remove(struct platform_device *pdev)
396396
{
397397
struct device *dev = &pdev->dev;
398398
struct mtk_ccifreq_drv *drv;
@@ -405,8 +405,6 @@ static int mtk_ccifreq_remove(struct platform_device *pdev)
405405
regulator_disable(drv->proc_reg);
406406
if (drv->sram_reg)
407407
regulator_disable(drv->sram_reg);
408-
409-
return 0;
410408
}
411409

412410
static const struct mtk_ccifreq_platform_data mt8183_platform_data = {
@@ -432,7 +430,7 @@ MODULE_DEVICE_TABLE(of, mtk_ccifreq_machines);
432430

433431
static struct platform_driver mtk_ccifreq_platdrv = {
434432
.probe = mtk_ccifreq_probe,
435-
.remove = mtk_ccifreq_remove,
433+
.remove_new = mtk_ccifreq_remove,
436434
.driver = {
437435
.name = "mtk-ccifreq",
438436
.of_match_table = mtk_ccifreq_machines,

drivers/devfreq/rk3399_dmc.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,13 +459,11 @@ static int rk3399_dmcfreq_probe(struct platform_device *pdev)
459459
return ret;
460460
}
461461

462-
static int rk3399_dmcfreq_remove(struct platform_device *pdev)
462+
static void rk3399_dmcfreq_remove(struct platform_device *pdev)
463463
{
464464
struct rk3399_dmcfreq *dmcfreq = dev_get_drvdata(&pdev->dev);
465465

466466
devfreq_event_disable_edev(dmcfreq->edev);
467-
468-
return 0;
469467
}
470468

471469
static const struct of_device_id rk3399dmc_devfreq_of_match[] = {
@@ -476,7 +474,7 @@ MODULE_DEVICE_TABLE(of, rk3399dmc_devfreq_of_match);
476474

477475
static struct platform_driver rk3399_dmcfreq_driver = {
478476
.probe = rk3399_dmcfreq_probe,
479-
.remove = rk3399_dmcfreq_remove,
477+
.remove_new = rk3399_dmcfreq_remove,
480478
.driver = {
481479
.name = "rk3399-dmc-freq",
482480
.pm = &rk3399_dmcfreq_pm,

drivers/devfreq/sun8i-a33-mbus.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ static int sun8i_a33_mbus_probe(struct platform_device *pdev)
458458
return dev_err_probe(dev, ret, err);
459459
}
460460

461-
static int sun8i_a33_mbus_remove(struct platform_device *pdev)
461+
static void sun8i_a33_mbus_remove(struct platform_device *pdev)
462462
{
463463
struct sun8i_a33_mbus *priv = platform_get_drvdata(pdev);
464464
unsigned long initial_freq = priv->profile.initial_freq;
@@ -475,8 +475,6 @@ static int sun8i_a33_mbus_remove(struct platform_device *pdev)
475475
clk_rate_exclusive_put(priv->clk_mbus);
476476
clk_rate_exclusive_put(priv->clk_dram);
477477
clk_disable_unprepare(priv->clk_bus);
478-
479-
return 0;
480478
}
481479

482480
static const struct sun8i_a33_mbus_variant sun50i_a64_mbus = {
@@ -497,7 +495,7 @@ static SIMPLE_DEV_PM_OPS(sun8i_a33_mbus_pm_ops,
497495

498496
static struct platform_driver sun8i_a33_mbus_driver = {
499497
.probe = sun8i_a33_mbus_probe,
500-
.remove = sun8i_a33_mbus_remove,
498+
.remove_new = sun8i_a33_mbus_remove,
501499
.driver = {
502500
.name = "sun8i-a33-mbus",
503501
.of_match_table = sun8i_a33_mbus_of_match,

0 commit comments

Comments
 (0)