rtc: rk808: check the rtc is available for rk816

Change-Id: I383c08cd5ad7cb282c0ec0aa12e9e84c9df52ba3
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
This commit is contained in:
shengfei Xu 2017-08-21 15:31:03 +08:00 committed by Huang, Tao
parent 0e601b1acb
commit e7edb8f017

View File

@ -381,19 +381,8 @@ static int rk808_rtc_probe(struct platform_device *pdev)
switch (rk808->variant) {
case RK805_ID:
np = of_get_child_by_name(pdev->dev.parent->of_node, "rtc");
if (np && !of_device_is_available(np)) {
dev_info(&pdev->dev, "device is disabled\n");
return -EINVAL;
}
break;
case RK808_ID:
np = of_get_child_by_name(pdev->dev.parent->of_node, "rtc");
if (np && !of_device_is_available(np)) {
dev_info(&pdev->dev, "device is disabled\n");
return -EINVAL;
}
break;
case RK816_ID:
case RK818_ID:
np = of_get_child_by_name(pdev->dev.parent->of_node, "rtc");
if (np && !of_device_is_available(np)) {