diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2015-10-21 06:42:21 +0300 |
---|---|---|
committer | Joel Stanley <joel@jms.id.au> | 2015-10-23 07:31:48 +0300 |
commit | 7fe8a8f5488f6f9290c98b43d911338db0424830 (patch) | |
tree | 98ed97ce44af5683aa227a9c3e4ae649981b1778 | |
parent | b34211891d32d4b3feeb6f5781d11ec6a96a9d32 (diff) | |
download | linux-7fe8a8f5488f6f9290c98b43d911338db0424830.tar.xz |
misc/bt-host: remove chrdev_region, use module_platform_driver
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
-rw-r--r-- | drivers/misc/bt-host.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/drivers/misc/bt-host.c b/drivers/misc/bt-host.c index a75734d23823..6aa215e46599 100644 --- a/drivers/misc/bt-host.c +++ b/drivers/misc/bt-host.c @@ -45,8 +45,6 @@ #define BT_INTMASK_B2H_IRQ 0x02 #define BT_INTMASK_BMC_HWRST 0x80 -dev_t bt_host_devt; - struct bt_host { struct device dev; void *base; @@ -329,35 +327,7 @@ static struct platform_driver bt_host_driver = { .remove = bt_host_remove, }; -static int __init bt_host_init(void) -{ - int rc; - - rc = alloc_chrdev_region(&bt_host_devt, 0, BT_NUM_DEVS, "bt"); - if (rc) { - pr_err("bt-host: Could not allocate chardev region\n"); - return rc; - } - - rc = platform_driver_register(&bt_host_driver); - if (rc) { - pr_err("bt-host: Could not register platform device\n"); - goto out_chardev; - } - - return 0; - -out_chardev: - unregister_chrdev_region(bt_host_devt, BT_NUM_DEVS); - return rc; -} -module_init(bt_host_init); - -static void __exit bt_host_exit(void) -{ - platform_driver_unregister(&bt_host_driver); -} -module_exit(bt_host_exit); +module_platform_driver(bt_host_driver); MODULE_DEVICE_TABLE(of, bt_host_match); MODULE_LICENSE("GPL"); |