lkml.org 
[lkml]   [2014]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] watchdog: Add Cadence WDT driver

> + wdt->cdns_wdt_notifier.notifier_call = &cdns_wdt_notify_sys;
> + /* Register the reboot notifier */
> + ret = register_reboot_notifier(&wdt->cdns_wdt_notifier);
> + if (ret != 0) {
> + dev_err(&pdev->dev, "cannot register reboot notifier err=%d)\n",
> + ret);
> + return ret;

Your ordering is wrong. If the box reboots between here and the spin lock
in it further down it'll crash in your notifier.

As

> + spin_lock_init(&wdt->io_lock);

is needed before the code your notifier calls will work.

> + dev_info(&pdev->dev, "Xilinx Watchdog Timer at %p with timeout %ds%s\n",
> + wdt->regs, cdns_wdt_device->timeout,
> + nowayout ? ", nowayout" : "");

dev_dbg

if every driver felt the need to announce itself on boot you'd have pages
and pages of junk.

Alan


\
 
 \ /
  Last update: 2014-03-31 13:21    [W:0.083 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site