MODULE_DESCRIPTION("VFIO AP device driver, Copyright IBM Corp. 2018");
 MODULE_LICENSE("GPL v2");
 
-static struct ap_driver vfio_ap_drv;
-
 struct ap_matrix_dev *matrix_dev;
 
 /* Only type 10 adapters (CEX4 and later) are supported
        mutex_unlock(&matrix_dev->lock);
 }
 
+static struct ap_driver vfio_ap_drv = {
+       .probe = vfio_ap_queue_dev_probe,
+       .remove = vfio_ap_queue_dev_remove,
+       .ids = ap_queue_ids,
+};
+
 static void vfio_ap_matrix_dev_release(struct device *dev)
 {
        struct ap_matrix_dev *matrix_dev = dev_get_drvdata(dev);
        if (ret)
                return ret;
 
-       memset(&vfio_ap_drv, 0, sizeof(vfio_ap_drv));
-       vfio_ap_drv.probe = vfio_ap_queue_dev_probe;
-       vfio_ap_drv.remove = vfio_ap_queue_dev_remove;
-       vfio_ap_drv.ids = ap_queue_ids;
-
        ret = ap_driver_register(&vfio_ap_drv, THIS_MODULE, VFIO_AP_DRV_NAME);
        if (ret) {
                vfio_ap_matrix_dev_destroy();