Currently, thermal node number is defined as alias
and the number is generated sequentially. If some
node aren't used the number is not machted with driver.
So, id is defined explicitly.
Change-Id: I7852bef35b359feb40223394d028237b40ac0349
Signed-off-by: Soomin Kim <sm8326.kim@samsung.com>
data->np = pdev->dev.of_node;
- data->id = of_alias_get_id(pdev->dev.of_node, "tmuctrl");
- if (data->id < 0)
- data->id = 0;
+ if (of_property_read_u32(pdev->dev.of_node, "id", &data->id)) {
+ dev_err(&pdev->dev, "failed to get TMU ID\n");
+ return -ENODEV;
+ }
data->irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
if (data->irq <= 0) {