aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal/samsung
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-08-19 02:28:43 -0400
committerEduardo Valentin <eduardo.valentin@ti.com>2013-08-29 09:37:31 -0400
commit73b5b1d7c5f9348c0fe3a3e4ac5586207d830d54 (patch)
tree45a6737bcfb2d994356b0f038b6a2227f331d2a2 /drivers/thermal/samsung
parent91ff81cf48f0c8f9cd608acbd83f0e98a228807b (diff)
thermal: exynos: Clean up non-DT remnants
Commit 1cd1ecb6 ("thermal: exynos: Remove non DT based support") cleaned up some non-DT code. However, there were few more things needed for complete cleanup to make this driver DT only. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Diffstat (limited to 'drivers/thermal/samsung')
-rw-r--r--drivers/thermal/samsung/Kconfig2
-rw-r--r--drivers/thermal/samsung/exynos_tmu.c30
2 files changed, 13 insertions, 19 deletions
diff --git a/drivers/thermal/samsung/Kconfig b/drivers/thermal/samsung/Kconfig
index 92492e4351a0..f760389a204c 100644
--- a/drivers/thermal/samsung/Kconfig
+++ b/drivers/thermal/samsung/Kconfig
@@ -1,6 +1,6 @@
1config EXYNOS_THERMAL 1config EXYNOS_THERMAL
2 tristate "Exynos thermal management unit driver" 2 tristate "Exynos thermal management unit driver"
3 depends on ARCH_HAS_BANDGAP 3 depends on ARCH_HAS_BANDGAP && OF
4 help 4 help
5 If you say yes here you get support for the TMU (Thermal Management 5 If you say yes here you get support for the TMU (Thermal Management
6 Unit) driver for SAMSUNG EXYNOS series of SoCs. This driver initialises 6 Unit) driver for SAMSUNG EXYNOS series of SoCs. This driver initialises
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index a033dbbf979e..b43afda8acd1 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -481,7 +481,6 @@ static irqreturn_t exynos_tmu_irq(int irq, void *id)
481 return IRQ_HANDLED; 481 return IRQ_HANDLED;
482} 482}
483 483
484#ifdef CONFIG_OF
485static const struct of_device_id exynos_tmu_match[] = { 484static const struct of_device_id exynos_tmu_match[] = {
486 { 485 {
487 .compatible = "samsung,exynos4210-tmu", 486 .compatible = "samsung,exynos4210-tmu",
@@ -502,27 +501,22 @@ static const struct of_device_id exynos_tmu_match[] = {
502 {}, 501 {},
503}; 502};
504MODULE_DEVICE_TABLE(of, exynos_tmu_match); 503MODULE_DEVICE_TABLE(of, exynos_tmu_match);
505#endif
506 504
507static inline struct exynos_tmu_platform_data *exynos_get_driver_data( 505static inline struct exynos_tmu_platform_data *exynos_get_driver_data(
508 struct platform_device *pdev, int id) 506 struct platform_device *pdev, int id)
509{ 507{
510#ifdef CONFIG_OF
511 struct exynos_tmu_init_data *data_table; 508 struct exynos_tmu_init_data *data_table;
512 struct exynos_tmu_platform_data *tmu_data; 509 struct exynos_tmu_platform_data *tmu_data;
513 if (pdev->dev.of_node) { 510 const struct of_device_id *match;
514 const struct of_device_id *match; 511
515 match = of_match_node(exynos_tmu_match, pdev->dev.of_node); 512 match = of_match_node(exynos_tmu_match, pdev->dev.of_node);
516 if (!match) 513 if (!match)
517 return NULL; 514 return NULL;
518 data_table = (struct exynos_tmu_init_data *) match->data; 515 data_table = (struct exynos_tmu_init_data *) match->data;
519 if (!data_table || id >= data_table->tmu_count) 516 if (!data_table || id >= data_table->tmu_count)
520 return NULL; 517 return NULL;
521 tmu_data = data_table->tmu_data; 518 tmu_data = data_table->tmu_data;
522 return (struct exynos_tmu_platform_data *) (tmu_data + id); 519 return (struct exynos_tmu_platform_data *) (tmu_data + id);
523 }
524#endif
525 return NULL;
526} 520}
527 521
528static int exynos_map_dt_data(struct platform_device *pdev) 522static int exynos_map_dt_data(struct platform_device *pdev)
@@ -532,7 +526,7 @@ static int exynos_map_dt_data(struct platform_device *pdev)
532 struct resource res; 526 struct resource res;
533 int ret; 527 int ret;
534 528
535 if (!data) 529 if (!data || !pdev->dev.of_node)
536 return -ENODEV; 530 return -ENODEV;
537 531
538 /* 532 /*
@@ -754,7 +748,7 @@ static struct platform_driver exynos_tmu_driver = {
754 .name = "exynos-tmu", 748 .name = "exynos-tmu",
755 .owner = THIS_MODULE, 749 .owner = THIS_MODULE,
756 .pm = EXYNOS_TMU_PM, 750 .pm = EXYNOS_TMU_PM,
757 .of_match_table = of_match_ptr(exynos_tmu_match), 751 .of_match_table = exynos_tmu_match,
758 }, 752 },
759 .probe = exynos_tmu_probe, 753 .probe = exynos_tmu_probe,
760 .remove = exynos_tmu_remove, 754 .remove = exynos_tmu_remove,