Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95afae48 authored by David Vrabel's avatar David Vrabel
Browse files

xen: remove DEFINE_XENBUS_DRIVER() macro



The DEFINE_XENBUS_DRIVER() macro looks a bit weird and causes sparse
errors.

Replace the uses with standard structure definitions instead.  This is
similar to pci and usb device registration.

Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
parent 305559f1
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -907,22 +907,17 @@ static int connect_ring(struct backend_info *be)
	return 0;
}


/* ** Driver Registration ** */


static const struct xenbus_device_id xen_blkbk_ids[] = {
	{ "vbd" },
	{ "" }
};


static DEFINE_XENBUS_DRIVER(xen_blkbk, ,
static struct xenbus_driver xen_blkbk_driver = {
	.ids  = xen_blkbk_ids,
	.probe = xen_blkbk_probe,
	.remove = xen_blkbk_remove,
	.otherend_changed = frontend_changed
);

};

int xen_blkif_xenbus_init(void)
{
+3 −2
Original line number Diff line number Diff line
@@ -2055,13 +2055,14 @@ static const struct xenbus_device_id blkfront_ids[] = {
	{ "" }
};

static DEFINE_XENBUS_DRIVER(blkfront, ,
static struct xenbus_driver blkfront_driver = {
	.ids  = blkfront_ids,
	.probe = blkfront_probe,
	.remove = blkfront_remove,
	.resume = blkfront_resume,
	.otherend_changed = blkback_changed,
	.is_ready = blkfront_is_ready,
);
};

static int __init xlblk_init(void)
{
+7 −6
Original line number Diff line number Diff line
@@ -367,12 +367,13 @@ static const struct xenbus_device_id tpmfront_ids[] = {
};
MODULE_ALIAS("xen:vtpm");

static DEFINE_XENBUS_DRIVER(tpmfront, ,
static struct xenbus_driver tpmfront_driver = {
	.ids = tpmfront_ids,
	.probe = tpmfront_probe,
	.remove = tpmfront_remove,
	.resume = tpmfront_resume,
	.otherend_changed = backend_changed,
	);
};

static int __init xen_tpmfront_init(void)
{
+3 −2
Original line number Diff line number Diff line
@@ -365,12 +365,13 @@ static const struct xenbus_device_id xenkbd_ids[] = {
	{ "" }
};

static DEFINE_XENBUS_DRIVER(xenkbd, ,
static struct xenbus_driver xenkbd_driver = {
	.ids = xenkbd_ids,
	.probe = xenkbd_probe,
	.remove = xenkbd_remove,
	.resume = xenkbd_resume,
	.otherend_changed = xenkbd_backend_changed,
);
};

static int __init xenkbd_init(void)
{
+3 −7
Original line number Diff line number Diff line
@@ -937,22 +937,18 @@ static int read_xenbus_vif_flags(struct backend_info *be)
	return 0;
}


/* ** Driver Registration ** */


static const struct xenbus_device_id netback_ids[] = {
	{ "vif" },
	{ "" }
};


static DEFINE_XENBUS_DRIVER(netback, ,
static struct xenbus_driver netback_driver = {
	.ids = netback_ids,
	.probe = netback_probe,
	.remove = netback_remove,
	.uevent = netback_uevent,
	.otherend_changed = frontend_changed,
);
};

int xenvif_xenbus_init(void)
{
Loading