]> www.infradead.org Git - users/willy/xarray.git/commitdiff
mtty: Remove unused IDR
authorMatthew Wilcox <willy@infradead.org>
Tue, 19 Feb 2019 00:30:28 +0000 (19:30 -0500)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 9 Aug 2019 01:38:19 +0000 (21:38 -0400)
Signed-off-by: Matthew Wilcox <willy@infradead.org>
samples/vfio-mdev/mtty.c

index 92e770a06ea21b1b19f8de0e883e3d2b947cd713..b32d9930db5123992f40ca27569cc5bd39b8a493 100644 (file)
@@ -72,7 +72,6 @@ static struct mtty_dev {
        dev_t           vd_devt;
        struct class    *vd_class;
        struct cdev     vd_cdev;
-       struct idr      vd_idr;
        struct device   dev;
 } mtty_dev;
 
@@ -1437,8 +1436,6 @@ static int __init mtty_dev_init(void)
 
        memset(&mtty_dev, 0, sizeof(mtty_dev));
 
-       idr_init(&mtty_dev.vd_idr);
-
        ret = alloc_chrdev_region(&mtty_dev.vd_devt, 0, MINORMASK + 1,
                                  MTTY_NAME);
 
@@ -1497,7 +1494,6 @@ static void __exit mtty_dev_exit(void)
        mdev_unregister_device(&mtty_dev.dev);
 
        device_unregister(&mtty_dev.dev);
-       idr_destroy(&mtty_dev.vd_idr);
        cdev_del(&mtty_dev.vd_cdev);
        unregister_chrdev_region(mtty_dev.vd_devt, MINORMASK + 1);
        class_destroy(mtty_dev.vd_class);