diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/xen-blkback/xenbus.c | 9 | ||||
-rw-r--r-- | drivers/block/xen-blkfront.c | 11 |
2 files changed, 7 insertions, 13 deletions
diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c index f759ad4584c..edbb69ebdf2 100644 --- a/drivers/block/xen-blkback/xenbus.c +++ b/drivers/block/xen-blkback/xenbus.c | |||
@@ -787,17 +787,14 @@ static const struct xenbus_device_id xen_blkbk_ids[] = { | |||
787 | }; | 787 | }; |
788 | 788 | ||
789 | 789 | ||
790 | static struct xenbus_driver xen_blkbk = { | 790 | static DEFINE_XENBUS_DRIVER(xen_blkbk, , |
791 | .name = "vbd", | ||
792 | .owner = THIS_MODULE, | ||
793 | .ids = xen_blkbk_ids, | ||
794 | .probe = xen_blkbk_probe, | 791 | .probe = xen_blkbk_probe, |
795 | .remove = xen_blkbk_remove, | 792 | .remove = xen_blkbk_remove, |
796 | .otherend_changed = frontend_changed | 793 | .otherend_changed = frontend_changed |
797 | }; | 794 | ); |
798 | 795 | ||
799 | 796 | ||
800 | int xen_blkif_xenbus_init(void) | 797 | int xen_blkif_xenbus_init(void) |
801 | { | 798 | { |
802 | return xenbus_register_backend(&xen_blkbk); | 799 | return xenbus_register_backend(&xen_blkbk_driver); |
803 | } | 800 | } |
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 7b2ec590841..9fd3ee203b1 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c | |||
@@ -1437,16 +1437,13 @@ static const struct xenbus_device_id blkfront_ids[] = { | |||
1437 | { "" } | 1437 | { "" } |
1438 | }; | 1438 | }; |
1439 | 1439 | ||
1440 | static struct xenbus_driver blkfront = { | 1440 | static DEFINE_XENBUS_DRIVER(blkfront, , |
1441 | .name = "vbd", | ||
1442 | .owner = THIS_MODULE, | ||
1443 | .ids = blkfront_ids, | ||
1444 | .probe = blkfront_probe, | 1441 | .probe = blkfront_probe, |
1445 | .remove = blkfront_remove, | 1442 | .remove = blkfront_remove, |
1446 | .resume = blkfront_resume, | 1443 | .resume = blkfront_resume, |
1447 | .otherend_changed = blkback_changed, | 1444 | .otherend_changed = blkback_changed, |
1448 | .is_ready = blkfront_is_ready, | 1445 | .is_ready = blkfront_is_ready, |
1449 | }; | 1446 | ); |
1450 | 1447 | ||
1451 | static int __init xlblk_init(void) | 1448 | static int __init xlblk_init(void) |
1452 | { | 1449 | { |
@@ -1461,7 +1458,7 @@ static int __init xlblk_init(void) | |||
1461 | return -ENODEV; | 1458 | return -ENODEV; |
1462 | } | 1459 | } |
1463 | 1460 | ||
1464 | ret = xenbus_register_frontend(&blkfront); | 1461 | ret = xenbus_register_frontend(&blkfront_driver); |
1465 | if (ret) { | 1462 | if (ret) { |
1466 | unregister_blkdev(XENVBD_MAJOR, DEV_NAME); | 1463 | unregister_blkdev(XENVBD_MAJOR, DEV_NAME); |
1467 | return ret; | 1464 | return ret; |
@@ -1474,7 +1471,7 @@ module_init(xlblk_init); | |||
1474 | 1471 | ||
1475 | static void __exit xlblk_exit(void) | 1472 | static void __exit xlblk_exit(void) |
1476 | { | 1473 | { |
1477 | return xenbus_unregister_driver(&blkfront); | 1474 | return xenbus_unregister_driver(&blkfront_driver); |
1478 | } | 1475 | } |
1479 | module_exit(xlblk_exit); | 1476 | module_exit(xlblk_exit); |
1480 | 1477 | ||