mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 22:14:04 +02:00
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:
parent
0e601b1acb
commit
e7edb8f017
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user