From ffbd8425006bcc81983cad98585f4b50d306e81e Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Thu, 5 Dec 2013 10:45:21 +0800 Subject: [PATCH] ARM: rockchip: fiq-debugger: support status on DT --- arch/arm/mach-rockchip/rk_fiq_debugger.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-rockchip/rk_fiq_debugger.c b/arch/arm/mach-rockchip/rk_fiq_debugger.c index 99397cd5dca6..b8f37f221e95 100644 --- a/arch/arm/mach-rockchip/rk_fiq_debugger.c +++ b/arch/arm/mach-rockchip/rk_fiq_debugger.c @@ -306,7 +306,12 @@ static int __init rk_fiq_debugger_init(void) { printk("fiq-debugger is missing in device tree!\n"); return -ENODEV; } - + + if (!of_device_is_available(np)) { + printk("fiq-debugger is disabled in device tree\n"); + return -ENODEV; + } + if (of_property_read_u32(np, "serial-id", &serial_id)) { return -EINVAL; } -- 2.34.1