diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2013-04-05 15:10:34 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-05 18:49:17 -0400 |
commit | 30e53bb8ffb1f3270ad89196d9799057008d9537 (patch) | |
tree | 94fe085a9e40cc0cc215053c4dedaa91acee73ac /drivers/misc/mei/main.c | |
parent | a864ec76db575b158427ec7fa624cd30ede5e038 (diff) |
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.c | 18 |
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 = { | |||
753 | .minor = MISC_DYNAMIC_MINOR, | 753 | .minor = MISC_DYNAMIC_MINOR, |
754 | }; | 754 | }; |
755 | 755 | ||
756 | int mei_register(struct device *dev) | 756 | |
757 | int mei_register(struct mei_device *dev) | ||
757 | { | 758 | { |
758 | mei_misc_device.parent = dev; | 759 | int ret; |
759 | return misc_register(&mei_misc_device); | 760 | mei_misc_device.parent = &dev->pdev->dev; |
761 | ret = misc_register(&mei_misc_device); | ||
762 | if (ret) | ||
763 | return ret; | ||
764 | |||
765 | if (mei_dbgfs_register(dev, mei_misc_device.name)) | ||
766 | dev_err(&dev->pdev->dev, "cannot register debugfs\n"); | ||
767 | |||
768 | return 0; | ||
760 | } | 769 | } |
761 | EXPORT_SYMBOL_GPL(mei_register); | 770 | EXPORT_SYMBOL_GPL(mei_register); |
762 | 771 | ||
763 | void mei_deregister(void) | 772 | void mei_deregister(struct mei_device *dev) |
764 | { | 773 | { |
774 | mei_dbgfs_deregister(dev); | ||
765 | misc_deregister(&mei_misc_device); | 775 | misc_deregister(&mei_misc_device); |
766 | mei_misc_device.parent = NULL; | 776 | mei_misc_device.parent = NULL; |
767 | } | 777 | } |