summaryrefslogtreecommitdiff
path: root/drivers/misc/mei/main.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2013-04-05 23:10:34 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-06 02:49:17 +0400
commit30e53bb8ffb1f3270ad89196d9799057008d9537 (patch)
tree94fe085a9e40cc0cc215053c4dedaa91acee73ac /drivers/misc/mei/main.c
parenta864ec76db575b158427ec7fa624cd30ede5e038 (diff)
downloadlinux-30e53bb8ffb1f3270ad89196d9799057008d9537.tar.xz
mei: add debugfs hooks
debugfs exposes device state and list of me clients and their properties Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/main.c')
-rw-r--r--drivers/misc/mei/main.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c
index 872de9d1494b..329fb865cfd0 100644
--- a/drivers/misc/mei/main.c
+++ b/drivers/misc/mei/main.c
@@ -753,15 +753,25 @@ static struct miscdevice mei_misc_device = {
.minor = MISC_DYNAMIC_MINOR,
};
-int mei_register(struct device *dev)
+
+int mei_register(struct mei_device *dev)
{
- mei_misc_device.parent = dev;
- return misc_register(&mei_misc_device);
+ int ret;
+ mei_misc_device.parent = &dev->pdev->dev;
+ ret = misc_register(&mei_misc_device);
+ if (ret)
+ return ret;
+
+ if (mei_dbgfs_register(dev, mei_misc_device.name))
+ dev_err(&dev->pdev->dev, "cannot register debugfs\n");
+
+ return 0;
}
EXPORT_SYMBOL_GPL(mei_register);
-void mei_deregister(void)
+void mei_deregister(struct mei_device *dev)
{
+ mei_dbgfs_deregister(dev);
misc_deregister(&mei_misc_device);
mei_misc_device.parent = NULL;
}