main.c (dca3a783400a18e2bf4503b1d4a85c4d0ca1a7e4) | main.c (30e53bb8ffb1f3270ad89196d9799057008d9537) |
---|---|
1/* 2 * 3 * Intel Management Engine Interface (Intel MEI) Linux driver 4 * Copyright (c) 2003-2012, Intel Corporation. 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms and conditions of the GNU General Public License, 8 * version 2, as published by the Free Software Foundation. --- 739 unchanged lines hidden (view full) --- 748 * Misc Device Struct 749 */ 750static struct miscdevice mei_misc_device = { 751 .name = "mei", 752 .fops = &mei_fops, 753 .minor = MISC_DYNAMIC_MINOR, 754}; 755 | 1/* 2 * 3 * Intel Management Engine Interface (Intel MEI) Linux driver 4 * Copyright (c) 2003-2012, Intel Corporation. 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms and conditions of the GNU General Public License, 8 * version 2, as published by the Free Software Foundation. --- 739 unchanged lines hidden (view full) --- 748 * Misc Device Struct 749 */ 750static struct miscdevice mei_misc_device = { 751 .name = "mei", 752 .fops = &mei_fops, 753 .minor = MISC_DYNAMIC_MINOR, 754}; 755 |
756int mei_register(struct device *dev) | 756 757int mei_register(struct mei_device *dev) |
757{ | 758{ |
758 mei_misc_device.parent = dev; 759 return misc_register(&mei_misc_device); | 759 int ret; 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} |
770EXPORT_SYMBOL_GPL(mei_register); |
|
761 | 771 |
762void mei_deregister(void) | 772void mei_deregister(struct mei_device *dev) |
763{ | 773{ |
774 mei_dbgfs_deregister(dev); |
|
764 misc_deregister(&mei_misc_device); 765 mei_misc_device.parent = NULL; 766} | 775 misc_deregister(&mei_misc_device); 776 mei_misc_device.parent = NULL; 777} |
778EXPORT_SYMBOL_GPL(mei_deregister); |
|
767 | 779 |
780static int __init mei_init(void) 781{ 782 return mei_cl_bus_init(); 783} 784 785static void __exit mei_exit(void) 786{ 787 mei_cl_bus_exit(); 788} 789 790module_init(mei_init); 791module_exit(mei_exit); 792 793MODULE_AUTHOR("Intel Corporation"); 794MODULE_DESCRIPTION("Intel(R) Management Engine Interface"); |
|
768MODULE_LICENSE("GPL v2"); 769 | 795MODULE_LICENSE("GPL v2"); 796 |