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 iTCO_wdt_probe(struct platform_device *dev)
{
	int ret = -ENODEV;
	int found = 0;
	struct pci_dev *pdev = NULL;
	const struct pci_device_id *ent;

	spin_lock_init(&iTCO_wdt_private.io_lock);

	for_each_pci_dev(pdev) {
		ent = pci_match_id(iTCO_wdt_pci_tbl, pdev);
		if (ent) {
			found++;
			ret = iTCO_wdt_init(pdev, ent, dev);
#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 */
			if (!ret)
				break;
		}
	}

	if (!found)
		pr_info("No device detected\n");

	return ret;
}