aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2010-12-10 14:39:15 +0000
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-01-05 16:31:08 -0500
commit6bac7f9f9e8e549c18ec4b77c499a45a1fae61b9 (patch)
treebaf84dcccc012c1dbdd5334d70d08b6b9588a5a7 /drivers/xen
parent7003087ce0fcdaf57a331b4ad627195a7f97245e (diff)
downloadkernel_samsung_aries-6bac7f9f9e8e549c18ec4b77c499a45a1fae61b9.zip
kernel_samsung_aries-6bac7f9f9e8e549c18ec4b77c499a45a1fae61b9.tar.gz
kernel_samsung_aries-6bac7f9f9e8e549c18ec4b77c499a45a1fae61b9.tar.bz2
xen/xenbus: fixup checkpatch issues in xenbus_probe*
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/Kconfig2
-rw-r--r--drivers/xen/xenbus/xenbus_probe.c12
-rw-r--r--drivers/xen/xenbus/xenbus_probe.h6
-rw-r--r--drivers/xen/xenbus/xenbus_probe_backend.c41
-rw-r--r--drivers/xen/xenbus/xenbus_probe_frontend.c28
5 files changed, 40 insertions, 49 deletions
diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
index 84bf17b..554ed57 100644
--- a/drivers/xen/Kconfig
+++ b/drivers/xen/Kconfig
@@ -72,7 +72,7 @@ config XEN_SYS_HYPERVISOR
config XEN_XENBUS_FRONTEND
tristate
-
+
config XEN_PLATFORM_PCI
tristate "xen platform pci device driver"
depends on XEN_PVHVM
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
index 8119234..baa65e7 100644
--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -126,9 +126,11 @@ static int talk_to_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");
}
@@ -579,7 +581,8 @@ int xenbus_dev_suspend(struct device *dev, pm_message_t state)
{
int err = 0;
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);
@@ -599,7 +602,8 @@ int xenbus_dev_resume(struct device *dev)
{
int err;
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);
diff --git a/drivers/xen/xenbus/xenbus_probe.h b/drivers/xen/xenbus/xenbus_probe.h
index 0e5fc4c..2466581 100644
--- a/drivers/xen/xenbus/xenbus_probe.h
+++ b/drivers/xen/xenbus/xenbus_probe.h
@@ -41,8 +41,10 @@ struct xen_bus_type
char *root;
unsigned int levels;
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);
- void (*otherend_changed)(struct xenbus_watch *watch, const char **vec, unsigned int len);
+ int (*probe)(struct xen_bus_type *bus, const char *type,
+ const char *dir);
+ void (*otherend_changed)(struct xenbus_watch *watch, const char **vec,
+ unsigned int len);
struct bus_type bus;
};
diff --git a/drivers/xen/xenbus/xenbus_probe_backend.c b/drivers/xen/xenbus/xenbus_probe_backend.c
index 9b9dd36..6cf467b 100644
--- a/drivers/xen/xenbus/xenbus_probe_backend.c
+++ b/drivers/xen/xenbus/xenbus_probe_backend.c
@@ -84,8 +84,8 @@ static int backend_bus_id(char bus_id[XEN_BUS_ID_SIZE], const char *nodename)
if (err)
return err;
- if (snprintf(bus_id, XEN_BUS_ID_SIZE,
- "%.*s-%i-%s", typelen, type, domid, devid) >= XEN_BUS_ID_SIZE)
+ if (snprintf(bus_id, XEN_BUS_ID_SIZE, "%.*s-%i-%s",
+ typelen, type, domid, devid) >= XEN_BUS_ID_SIZE)
return -ENOSPC;
return 0;
}
@@ -147,7 +147,8 @@ static int xenbus_probe_backend_unit(struct xen_bus_type *bus,
}
/* 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;
int err = 0;
@@ -188,18 +189,18 @@ static struct device_attribute xenbus_backend_dev_attrs[] = {
static struct xen_bus_type xenbus_backend = {
.root = "backend",
- .levels = 3, /* backend/type/<frontend>/<id> */
+ .levels = 3, /* backend/type/<frontend>/<id> */
.get_bus_id = backend_bus_id,
.probe = xenbus_probe_backend,
.otherend_changed = frontend_changed,
.bus = {
- .name = "xen-backend",
- .match = xenbus_match,
- .uevent = xenbus_uevent_backend,
- .probe = xenbus_dev_probe,
- .remove = xenbus_dev_remove,
- .shutdown = xenbus_dev_shutdown,
- .dev_attrs = xenbus_backend_dev_attrs,
+ .name = "xen-backend",
+ .match = xenbus_match,
+ .uevent = xenbus_uevent_backend,
+ .probe = xenbus_dev_probe,
+ .remove = xenbus_dev_remove,
+ .shutdown = xenbus_dev_shutdown,
+ .dev_attrs = xenbus_backend_dev_attrs,
},
};
@@ -221,24 +222,6 @@ static int read_frontend_details(struct xenbus_device *xendev)
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 rc, val;
diff --git a/drivers/xen/xenbus/xenbus_probe_frontend.c b/drivers/xen/xenbus/xenbus_probe_frontend.c
index 60c311a..5bcc2d6 100644
--- a/drivers/xen/xenbus/xenbus_probe_frontend.c
+++ b/drivers/xen/xenbus/xenbus_probe_frontend.c
@@ -46,7 +46,8 @@ static int frontend_bus_id(char bus_id[XEN_BUS_ID_SIZE], const char *nodename)
}
/* 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;
int err;
@@ -62,7 +63,8 @@ static int xenbus_probe_frontend(struct xen_bus_type *bus, const char *type, con
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);
@@ -85,21 +87,21 @@ static struct device_attribute xenbus_frontend_dev_attrs[] = {
static struct xen_bus_type xenbus_frontend = {
.root = "device",
- .levels = 2, /* device/type/<id> */
+ .levels = 2, /* device/type/<id> */
.get_bus_id = frontend_bus_id,
.probe = xenbus_probe_frontend,
.otherend_changed = backend_changed,
.bus = {
- .name = "xen",
- .match = xenbus_match,
- .uevent = xenbus_uevent_frontend,
- .probe = xenbus_dev_probe,
- .remove = xenbus_dev_remove,
- .shutdown = xenbus_dev_shutdown,
- .dev_attrs= xenbus_frontend_dev_attrs,
-
- .suspend = xenbus_dev_suspend,
- .resume = xenbus_dev_resume,
+ .name = "xen",
+ .match = xenbus_match,
+ .uevent = xenbus_uevent_frontend,
+ .probe = xenbus_dev_probe,
+ .remove = xenbus_dev_remove,
+ .shutdown = xenbus_dev_shutdown,
+ .dev_attrs = xenbus_frontend_dev_attrs,
+
+ .suspend = xenbus_dev_suspend,
+ .resume = xenbus_dev_resume,
},
};