All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@suse.de>
To: Xen devel list <xen-devel@lists.xensource.com>
Subject: [patch 1/6] xenbus cleanup
Date: Thu, 17 Aug 2006 15:40:52 +0200	[thread overview]
Message-ID: <44E471E4.7010001@suse.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 376 bytes --]

  Hi,

The patch below has some xenbus cleanups.  Changes:

  * move function prototypes to the top of the file.
  * uses the "struct bus_type" function pointers instead
    of overwriting the "struct device_driver" ones for
    xenbus_dev_probe() and xenbus_dev_remove().

please apply,

  Gerd

-- 
Gerd Hoffmann <kraxel@suse.de>
http://www.suse.de/~kraxel/julika-dora.jpeg

[-- Attachment #2: xenbus-cleanup --]
[-- Type: text/plain, Size: 2694 bytes --]

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
Index: source-lnx-stable-22813/drivers/xen/xenbus/xenbus_probe.c
===================================================================
--- source-lnx-stable-22813.orig/drivers/xen/xenbus/xenbus_probe.c	2006-08-17 15:19:20.000000000 +0200
+++ source-lnx-stable-22813/drivers/xen/xenbus/xenbus_probe.c	2006-08-17 15:20:36.000000000 +0200
@@ -60,6 +60,14 @@ static struct notifier_block *xenstore_c
 
 static void wait_for_devices(struct xenbus_driver *xendrv);
 
+static int xenbus_probe_frontend(const char *type, const char *name);
+static int xenbus_uevent_backend(struct device *dev, char **envp,
+				 int num_envp, char *buffer, int buffer_size);
+static int xenbus_probe_backend(const char *type, const char *domid);
+
+static int xenbus_dev_probe(struct device *_dev);
+static int xenbus_dev_remove(struct device *_dev);
+
 /* If something in array of ids matches this device, return it. */
 static const struct xenbus_device_id *
 match_device(const struct xenbus_device_id *arr, struct xenbus_device *dev)
@@ -168,15 +176,16 @@ static int read_frontend_details(struct 
 
 
 /* Bus type for frontend drivers. */
-static int xenbus_probe_frontend(const char *type, const char *name);
 static struct xen_bus_type xenbus_frontend = {
 	.root = "device",
 	.levels = 2, 		/* device/type/<id> */
 	.get_bus_id = frontend_bus_id,
 	.probe = xenbus_probe_frontend,
 	.bus = {
-		.name  = "xen",
-		.match = xenbus_match,
+		.name     = "xen",
+		.match    = xenbus_match,
+		.probe    = xenbus_dev_probe,
+		.remove   = xenbus_dev_remove,
 	},
 	.dev = {
 		.bus_id = "xen",
@@ -221,18 +230,17 @@ static int backend_bus_id(char bus_id[BU
 	return 0;
 }
 
-static int xenbus_uevent_backend(struct device *dev, char **envp,
-				 int num_envp, char *buffer, int buffer_size);
-static int xenbus_probe_backend(const char *type, const char *domid);
 static struct xen_bus_type xenbus_backend = {
 	.root = "backend",
 	.levels = 3, 		/* backend/type/<frontend>/<id> */
 	.get_bus_id = backend_bus_id,
 	.probe = xenbus_probe_backend,
 	.bus = {
-		.name  = "xen-backend",
-		.match = xenbus_match,
-		.uevent = xenbus_uevent_backend,
+		.name     = "xen-backend",
+		.match    = xenbus_match,
+		.probe    = xenbus_dev_probe,
+		.remove   = xenbus_dev_remove,
+		.uevent   = xenbus_uevent_backend,
 	},
 	.dev = {
 		.bus_id = "xen-backend",
@@ -399,8 +407,6 @@ static int xenbus_register_driver_common
 	drv->driver.name = drv->name;
 	drv->driver.bus = &bus->bus;
 	drv->driver.owner = drv->owner;
-	drv->driver.probe = xenbus_dev_probe;
-	drv->driver.remove = xenbus_dev_remove;
 
 	mutex_lock(&xenwatch_mutex);
 	ret = driver_register(&drv->driver);

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

                 reply	other threads:[~2006-08-17 13:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44E471E4.7010001@suse.de \
    --to=kraxel@suse.de \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.