static int iTCO_wdt_probe(struct platform_device *pdev)
{
	int ret = 0;

	spin_lock_init(&iTCO_wdt_private.io_lock);

	ret = iTCO_wdt_init(pdev);
	if (ret)
		return ret;

#ifdef CONFIG_DEBUG_FS
	iTCO_debugfs_dir = debugfs_create_dir("iTCO", NULL);
	debugfs_create_file("timeleft", S_IRUSR,
			    iTCO_debugfs_dir, NULL, &tl_fops);
	debugfs_create_file("reset_type", S_IRUSR | S_IWUSR,
			    iTCO_debugfs_dir, NULL, &iTCO_wdt_reset_type_fops);
	debugfs_create_file("trigger", S_IWUSR,
			    iTCO_debugfs_dir, NULL, &iTCO_wdt_trigger_fops);
	debugfs_create_bool("panic_reboot_notifier", S_IRUSR | S_IWUSR,
			    iTCO_debugfs_dir,
			    (u32 *)&iTCO_wdt_private.panic_reboot_notifier);
#endif /* CONFIG_DEBUG_FS */

	create_watchdog_sysfs_files();

	return ret;
}
static int __init iTCO_wdt_init_module(void)
{
	int err;

	pr_info("Intel TCO WatchDog Timer Driver v%s\n", DRV_VERSION);

	err = platform_driver_register(&iTCO_wdt_driver);
	if (err)
		return err;

	iTCO_wdt_platform_device = platform_device_register_simple(DRV_NAME,
								-1, NULL, 0);
	if (IS_ERR(iTCO_wdt_platform_device)) {
		err = PTR_ERR(iTCO_wdt_platform_device);
		goto unreg_platform_driver;
	}

	err = create_watchdog_sysfs_files();
	if (err) {
		pr_err("%s: Error creating debugfs entries\n", __func__);
		goto unreg_platform_driver;
	}

	return 0;

unreg_platform_driver:
	platform_driver_unregister(&iTCO_wdt_driver);
	return err;
}