Merge tag 'platform-drivers-x86-v5.3-1' of git://git.infradead.org/linux-platform...
[platform/kernel/linux-rpi.git] / drivers / platform / x86 / pmc_atom.c
index be802fd..aa53648 100644 (file)
@@ -341,45 +341,24 @@ static int pmc_sleep_tmr_show(struct seq_file *s, void *unused)
 
 DEFINE_SHOW_ATTRIBUTE(pmc_sleep_tmr);
 
-static void pmc_dbgfs_unregister(struct pmc_dev *pmc)
+static void pmc_dbgfs_register(struct pmc_dev *pmc)
 {
-       debugfs_remove_recursive(pmc->dbgfs_dir);
-}
-
-static int pmc_dbgfs_register(struct pmc_dev *pmc)
-{
-       struct dentry *dir, *f;
+       struct dentry *dir;
 
        dir = debugfs_create_dir("pmc_atom", NULL);
-       if (!dir)
-               return -ENOMEM;
 
        pmc->dbgfs_dir = dir;
 
-       f = debugfs_create_file("dev_state", S_IFREG | S_IRUGO,
-                               dir, pmc, &pmc_dev_state_fops);
-       if (!f)
-               goto err;
-
-       f = debugfs_create_file("pss_state", S_IFREG | S_IRUGO,
-                               dir, pmc, &pmc_pss_state_fops);
-       if (!f)
-               goto err;
-
-       f = debugfs_create_file("sleep_state", S_IFREG | S_IRUGO,
-                               dir, pmc, &pmc_sleep_tmr_fops);
-       if (!f)
-               goto err;
-
-       return 0;
-err:
-       pmc_dbgfs_unregister(pmc);
-       return -ENODEV;
+       debugfs_create_file("dev_state", S_IFREG | S_IRUGO, dir, pmc,
+                           &pmc_dev_state_fops);
+       debugfs_create_file("pss_state", S_IFREG | S_IRUGO, dir, pmc,
+                           &pmc_pss_state_fops);
+       debugfs_create_file("sleep_state", S_IFREG | S_IRUGO, dir, pmc,
+                           &pmc_sleep_tmr_fops);
 }
 #else
-static int pmc_dbgfs_register(struct pmc_dev *pmc)
+static void pmc_dbgfs_register(struct pmc_dev *pmc)
 {
-       return 0;
 }
 #endif /* CONFIG_DEBUG_FS */
 
@@ -414,6 +393,14 @@ static const struct dmi_system_id critclk_systems[] = {
        },
        {
                /* pmc_plt_clk* - are used for ethernet controllers */
+               .ident = "Beckhoff CB4063",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Beckhoff Automation"),
+                       DMI_MATCH(DMI_BOARD_NAME, "CB4063"),
+               },
+       },
+       {
+               /* pmc_plt_clk* - are used for ethernet controllers */
                .ident = "Beckhoff CB6263",
                .matches = {
                        DMI_MATCH(DMI_SYS_VENDOR, "Beckhoff Automation"),
@@ -491,9 +478,7 @@ static int pmc_setup_dev(struct pci_dev *pdev, const struct pci_device_id *ent)
        /* PMC hardware registers setup */
        pmc_hw_reg_setup(pmc);
 
-       ret = pmc_dbgfs_register(pmc);
-       if (ret)
-               dev_warn(&pdev->dev, "debugfs register failed\n");
+       pmc_dbgfs_register(pmc);
 
        /* Register platform clocks - PMC_PLT_CLK [0..5] */
        ret = pmc_setup_clks(pdev, pmc->regmap, data);