EDAC, i5100: Convert to debugfs wrappers
This driver creates its debugfs hierarchy under the toplevel debugfs dir - see i5100_init() - so make it use edac_debugfs_create_dir_at( , NULL) because we're not breaking userspace. Oh well. Signed-off-by: Borislav Petkov <bp@suse.de>
This commit is contained in:
parent
bba3b31e44
commit
52019e406c
|
@ -30,6 +30,7 @@
|
|||
#include <linux/debugfs.h>
|
||||
|
||||
#include "edac_core.h"
|
||||
#include "edac_module.h"
|
||||
|
||||
/* register addresses */
|
||||
|
||||
|
@ -966,25 +967,25 @@ static int i5100_setup_debugfs(struct mem_ctl_info *mci)
|
|||
if (!i5100_debugfs)
|
||||
return -ENODEV;
|
||||
|
||||
priv->debugfs = debugfs_create_dir(mci->bus->name, i5100_debugfs);
|
||||
priv->debugfs = edac_debugfs_create_dir_at(mci->bus->name, i5100_debugfs);
|
||||
|
||||
if (!priv->debugfs)
|
||||
return -ENOMEM;
|
||||
|
||||
debugfs_create_x8("inject_channel", S_IRUGO | S_IWUSR, priv->debugfs,
|
||||
&priv->inject_channel);
|
||||
debugfs_create_x8("inject_hlinesel", S_IRUGO | S_IWUSR, priv->debugfs,
|
||||
&priv->inject_hlinesel);
|
||||
debugfs_create_x8("inject_deviceptr1", S_IRUGO | S_IWUSR, priv->debugfs,
|
||||
&priv->inject_deviceptr1);
|
||||
debugfs_create_x8("inject_deviceptr2", S_IRUGO | S_IWUSR, priv->debugfs,
|
||||
&priv->inject_deviceptr2);
|
||||
debugfs_create_x16("inject_eccmask1", S_IRUGO | S_IWUSR, priv->debugfs,
|
||||
&priv->inject_eccmask1);
|
||||
debugfs_create_x16("inject_eccmask2", S_IRUGO | S_IWUSR, priv->debugfs,
|
||||
&priv->inject_eccmask2);
|
||||
debugfs_create_file("inject_enable", S_IWUSR, priv->debugfs,
|
||||
&mci->dev, &i5100_inject_enable_fops);
|
||||
edac_debugfs_create_x8("inject_channel", S_IRUGO | S_IWUSR, priv->debugfs,
|
||||
&priv->inject_channel);
|
||||
edac_debugfs_create_x8("inject_hlinesel", S_IRUGO | S_IWUSR, priv->debugfs,
|
||||
&priv->inject_hlinesel);
|
||||
edac_debugfs_create_x8("inject_deviceptr1", S_IRUGO | S_IWUSR, priv->debugfs,
|
||||
&priv->inject_deviceptr1);
|
||||
edac_debugfs_create_x8("inject_deviceptr2", S_IRUGO | S_IWUSR, priv->debugfs,
|
||||
&priv->inject_deviceptr2);
|
||||
edac_debugfs_create_x16("inject_eccmask1", S_IRUGO | S_IWUSR, priv->debugfs,
|
||||
&priv->inject_eccmask1);
|
||||
edac_debugfs_create_x16("inject_eccmask2", S_IRUGO | S_IWUSR, priv->debugfs,
|
||||
&priv->inject_eccmask2);
|
||||
edac_debugfs_create_file("inject_enable", S_IWUSR, priv->debugfs,
|
||||
&mci->dev, &i5100_inject_enable_fops);
|
||||
|
||||
return 0;
|
||||
|
||||
|
@ -1189,7 +1190,7 @@ static void i5100_remove_one(struct pci_dev *pdev)
|
|||
|
||||
priv = mci->pvt_info;
|
||||
|
||||
debugfs_remove_recursive(priv->debugfs);
|
||||
edac_debugfs_remove_recursive(priv->debugfs);
|
||||
|
||||
priv->scrub_enable = 0;
|
||||
cancel_delayed_work_sync(&(priv->i5100_scrubbing));
|
||||
|
@ -1223,7 +1224,7 @@ static int __init i5100_init(void)
|
|||
{
|
||||
int pci_rc;
|
||||
|
||||
i5100_debugfs = debugfs_create_dir("i5100_edac", NULL);
|
||||
i5100_debugfs = edac_debugfs_create_dir_at("i5100_edac", NULL);
|
||||
|
||||
pci_rc = pci_register_driver(&i5100_driver);
|
||||
return (pci_rc < 0) ? pci_rc : 0;
|
||||
|
@ -1231,7 +1232,7 @@ static int __init i5100_init(void)
|
|||
|
||||
static void __exit i5100_exit(void)
|
||||
{
|
||||
debugfs_remove(i5100_debugfs);
|
||||
edac_debugfs_remove(i5100_debugfs);
|
||||
|
||||
pci_unregister_driver(&i5100_driver);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue