提交 db86a8e3 编写于 作者: W Wang Wensheng 提交者: Yang Yingliang

sbsa_gwdt: Add WDIOF_PRETIMEOUT flag to watchdog_info at defination

ascend inclusion
category: bugfix
bugzilla: NA

-------------------

This flag is used by watchdog-core to determine the visibility of the
attributes associated with pretimout when the watchdog-core probes the
device. If we set the flag after that process those attributes could not
be create properly.

Fixes: 569f7c7750c1 ("sbsa_gwdt: Introduce a panic notifier")
Signed-off-by: NWang Wensheng <wangwensheng4@huawei.com>
Reviewed-by: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NCheng Jian <cj.chengjian@huawei.com>
上级 0c40cea7
......@@ -214,11 +214,14 @@ static irqreturn_t sbsa_gwdt_interrupt(int irq, void *dev_id)
return IRQ_HANDLED;
}
static struct watchdog_info sbsa_gwdt_info = {
static const struct watchdog_info sbsa_gwdt_info = {
.identity = WATCHDOG_NAME,
.options = WDIOF_SETTIMEOUT |
WDIOF_KEEPALIVEPING |
WDIOF_MAGICCLOSE |
#ifdef CONFIG_ARM_SBSA_WATCHDOG_PANIC_NOTIFIER
WDIOF_PRETIMEOUT |
#endif
WDIOF_CARDRESET,
};
......@@ -369,7 +372,6 @@ static int sbsa_gwdt_probe(struct platform_device *pdev)
* Add WDIOF_PRETIMEOUT flags to enable user to configure it.
*/
gwdt->wdd.pretimeout = gwdt->wdd.timeout - 1;
sbsa_gwdt_info.options |= WDIOF_PRETIMEOUT;
sbsa_register_panic_notifier(gwdt);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册