On 06/07/2020 05:18:39+0000, Johnson CH Chen (陳昭勳) wrote: > > > #endif /*CONFIG_RTC_DRV_DS1374_WDT*/ > > > /* > > > @@ -653,15 +514,25 @@ static int ds1374_probe(struct i2c_client > > > *client, > > > > > > #ifdef CONFIG_RTC_DRV_DS1374_WDT > > > save_client = client; > > > - ret = misc_register(&ds1374_miscdev); > > > - if (ret) > > > - return ret; > > > - ret = register_reboot_notifier(&ds1374_wdt_notifier); > > > + ds1374->wdt.info = &ds1374_wdt_info; > > > + ds1374->wdt.ops = &ds1374_wdt_ops; > > > + ds1374->wdt.timeout = TIMER_MARGIN_DEFAULT; > > > + ds1374->wdt.min_timeout = TIMER_MARGIN_MIN; > > > + ds1374->wdt.max_timeout = TIMER_MARGIN_MAX; > > > + > > > + watchdog_init_timeout(&ds1374->wdt, wdt_margin, &client->dev); > > > + watchdog_set_nowayout(&ds1374->wdt, nowayout); > > > + watchdog_stop_on_reboot(&ds1374->wdt); > > > + watchdog_stop_on_unregister(&ds1374->wdt); > > > + ds1374_wdt_settimeout(&ds1374->wdt, wdt_margin); > > > + > > > + ret = devm_watchdog_register_device(&client->dev, &ds1374->wdt); > > > if (ret) { > > > - misc_deregister(&ds1374_miscdev); > > > + dev_err(&client->dev, "failed to register DS1374 watchdog > > > +device\n"); There was no error message before, I don't think this one is necessary. > > > return ret; > > > } > > > - ds1374_wdt_settimeout(131072); > > > + > > > + dev_info(&client->dev, "DS1374 watchdog device enabled\n"); > > > > Is that necessary ? > > > > I think it's good to show watchdog initial timeout. I'll include above suggestions in v3, thanks! > No, please avoid adding more strings in that driver. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com