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

Commit 6bac7f9f authored by Ian Campbell's avatar Ian Campbell Committed by Konrad Rzeszutek Wilk
Browse files

xen/xenbus: fixup checkpatch issues in xenbus_probe*

parent 7003087c
Loading
Loading
Loading
Loading
+8 −4
Original line number Original line Diff line number Diff line
@@ -126,9 +126,11 @@ static int talk_to_otherend(struct xenbus_device *dev)


static int watch_otherend(struct xenbus_device *dev)
static int watch_otherend(struct xenbus_device *dev)
{
{
	struct xen_bus_type *bus = container_of(dev->dev.bus, struct xen_bus_type, bus);
	struct xen_bus_type *bus =
		container_of(dev->dev.bus, struct xen_bus_type, bus);


	return xenbus_watch_pathfmt(dev, &dev->otherend_watch, bus->otherend_changed,
	return xenbus_watch_pathfmt(dev, &dev->otherend_watch,
				    bus->otherend_changed,
				    "%s/%s", dev->otherend, "state");
				    "%s/%s", dev->otherend, "state");
}
}


@@ -579,7 +581,8 @@ int xenbus_dev_suspend(struct device *dev, pm_message_t state)
{
{
	int err = 0;
	int err = 0;
	struct xenbus_driver *drv;
	struct xenbus_driver *drv;
	struct xenbus_device *xdev = container_of(dev, struct xenbus_device, dev);
	struct xenbus_device *xdev
		= container_of(dev, struct xenbus_device, dev);


	DPRINTK("%s", xdev->nodename);
	DPRINTK("%s", xdev->nodename);


@@ -599,7 +602,8 @@ int xenbus_dev_resume(struct device *dev)
{
{
	int err;
	int err;
	struct xenbus_driver *drv;
	struct xenbus_driver *drv;
	struct xenbus_device *xdev = container_of(dev, struct xenbus_device, dev);
	struct xenbus_device *xdev
		= container_of(dev, struct xenbus_device, dev);


	DPRINTK("%s", xdev->nodename);
	DPRINTK("%s", xdev->nodename);


+4 −2
Original line number Original line Diff line number Diff line
@@ -41,8 +41,10 @@ struct xen_bus_type
	char *root;
	char *root;
	unsigned int levels;
	unsigned int levels;
	int (*get_bus_id)(char bus_id[XEN_BUS_ID_SIZE], const char *nodename);
	int (*get_bus_id)(char bus_id[XEN_BUS_ID_SIZE], const char *nodename);
	int (*probe)(struct xen_bus_type *bus, const char *type, const char *dir);
	int (*probe)(struct xen_bus_type *bus, const char *type,
	void (*otherend_changed)(struct xenbus_watch *watch, const char **vec, unsigned int len);
		     const char *dir);
	void (*otherend_changed)(struct xenbus_watch *watch, const char **vec,
				 unsigned int len);
	struct bus_type bus;
	struct bus_type bus;
};
};


+12 −29
Original line number Original line Diff line number Diff line
@@ -84,8 +84,8 @@ static int backend_bus_id(char bus_id[XEN_BUS_ID_SIZE], const char *nodename)
	if (err)
	if (err)
		return err;
		return err;


	if (snprintf(bus_id, XEN_BUS_ID_SIZE,
	if (snprintf(bus_id, XEN_BUS_ID_SIZE, "%.*s-%i-%s",
		     "%.*s-%i-%s", typelen, type, domid, devid) >= XEN_BUS_ID_SIZE)
		     typelen, type, domid, devid) >= XEN_BUS_ID_SIZE)
		return -ENOSPC;
		return -ENOSPC;
	return 0;
	return 0;
}
}
@@ -147,7 +147,8 @@ static int xenbus_probe_backend_unit(struct xen_bus_type *bus,
}
}


/* backend/<typename>/<frontend-domid> */
/* backend/<typename>/<frontend-domid> */
static int xenbus_probe_backend(struct xen_bus_type *bus, const char *type, const char *domid)
static int xenbus_probe_backend(struct xen_bus_type *bus, const char *type,
				const char *domid)
{
{
	char *nodename;
	char *nodename;
	int err = 0;
	int err = 0;
@@ -221,24 +222,6 @@ static int read_frontend_details(struct xenbus_device *xendev)
	return xenbus_read_otherend_details(xendev, "frontend-id", "frontend");
	return xenbus_read_otherend_details(xendev, "frontend-id", "frontend");
}
}


//void xenbus_backend_suspend(int (*fn)(struct device *, void *))
//{
//	DPRINTK("");
//	bus_for_each_dev(&xenbus_backend.bus, NULL, NULL, fn);
//}

//void xenbus_backend_resume(int (*fn)(struct device *, void *))
//{
//	DPRINTK("");
//	bus_for_each_dev(&xenbus_backend.bus, NULL, NULL, fn);
//}

//int xenbus_for_each_backend(void *arg, int (*fn)(struct device *, void *))
//{
//	return bus_for_each_dev(&xenbus_backend.bus, NULL, arg, fn);
//}
//EXPORT_SYMBOL_GPL(xenbus_for_each_backend);

int xenbus_dev_is_online(struct xenbus_device *dev)
int xenbus_dev_is_online(struct xenbus_device *dev)
{
{
	int rc, val;
	int rc, val;
+15 −13
Original line number Original line Diff line number Diff line
@@ -46,7 +46,8 @@ static int frontend_bus_id(char bus_id[XEN_BUS_ID_SIZE], const char *nodename)
}
}


/* device/<typename>/<name> */
/* device/<typename>/<name> */
static int xenbus_probe_frontend(struct xen_bus_type *bus, const char *type, const char *name)
static int xenbus_probe_frontend(struct xen_bus_type *bus, const char *type,
				 const char *name)
{
{
	char *nodename;
	char *nodename;
	int err;
	int err;
@@ -62,7 +63,8 @@ static int xenbus_probe_frontend(struct xen_bus_type *bus, const char *type, con
	return err;
	return err;
}
}


static int xenbus_uevent_frontend(struct device *_dev, struct kobj_uevent_env *env)
static int xenbus_uevent_frontend(struct device *_dev,
				  struct kobj_uevent_env *env)
{
{
	struct xenbus_device *dev = to_xenbus_device(_dev);
	struct xenbus_device *dev = to_xenbus_device(_dev);


+1 −1

File changed.

Contains only whitespace changes.