The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Linux Kernel List <linux-kernel@vger.kernel.org>
Subject: Re: [DRIVER MODEL] Convert arch/um/
Date: Sat, 5 Nov 2005 18:13:47 +0000	[thread overview]
Message-ID: <20051105181347.GC14419@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20051105181122.GD12228@flint.arm.linux.org.uk>

Convert platform drivers to use struct platform_driver

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -285,9 +285,10 @@ void uml_net_user_timer_expire(unsigned 
 static DEFINE_SPINLOCK(devices_lock);
 static struct list_head devices = LIST_HEAD_INIT(devices);
 
-static struct device_driver uml_net_driver = {
-	.name  = DRIVER_NAME,
-	.bus   = &platform_bus_type,
+static struct platform_driver uml_net_driver = {
+	.driver = {
+		.name  = DRIVER_NAME,
+	},
 };
 static int driver_registered;
 
@@ -334,7 +335,7 @@ static int eth_configure(int n, void *in
 
 	/* sysfs register */
 	if (!driver_registered) {
-		driver_register(&uml_net_driver);
+		platform_driver_register(&uml_net_driver);
 		driver_registered = 1;
 	}
 	device->pdev.id = n;
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -823,9 +823,10 @@ static int ubd_mc_init(void)
 
 __initcall(ubd_mc_init);
 
-static struct device_driver ubd_driver = {
-	.name  = DRIVER_NAME,
-	.bus   = &platform_bus_type,
+static struct platform_driver ubd_driver = {
+	.driver = {
+		.name  = DRIVER_NAME,
+	},
 };
 
 int ubd_init(void)
@@ -850,7 +851,7 @@ int ubd_init(void)
 		if (register_blkdev(fake_major, "ubd"))
 			return -1;
 	}
-	driver_register(&ubd_driver);
+	platform_driver_register(&ubd_driver);
 	for (i = 0; i < MAX_DEV; i++) 
 		ubd_add(i);
 	return 0;


-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

  parent reply	other threads:[~2005-11-05 18:13 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-05 18:11 [DRIVER MODEL] Add platform_driver Russell King
2005-11-05 18:12 ` Russell King
2005-11-06 20:39   ` Greg KH
2005-11-05 18:12 ` [DRIVER MODEL] Convert arch/arm Russell King
2005-11-05 18:13 ` Russell King [this message]
2005-11-05 18:14 ` [DRIVER MODEL] Convert arch/xtensa/ Russell King
2005-11-05 18:14 ` [DRIVER MODEL] Convert ARM s3c2410 drivers Russell King
2005-11-05 18:15 ` [DRIVER MODEL] Convert ARM SA1100 drivers Russell King
2005-11-05 18:15 ` [DRIVER MODEL] Convert ARM PXA drivers Russell King
2005-11-05 18:15 ` [DRIVER MODEL] Convert ARM IMX drivers Russell King
2005-11-05 18:16 ` [DRIVER MODEL] Convert ARM OMAP drivers Russell King
2005-11-05 18:16 ` [DRIVER MODEL] Convert ARM Zaurus drivers Russell King
2005-11-05 18:17 ` [DRIVER MODEL] Convert MMC drivers Russell King
2005-11-05 18:17 ` [DRIVER MODEL] Convert MTD drivers Russell King
2005-11-05 18:17 ` [DRIVER MODEL] Convert serial drivers Russell King
2005-11-05 18:17 ` [DRIVER MODEL] Convert i2c drivers Russell King
2005-11-05 18:18 ` [DRIVER MODEL] Convert input drivers Russell King
2005-11-05 18:18 ` [DRIVER MODEL] Convert network drivers Russell King
2005-11-05 18:18 ` [DRIVER MODEL] Convert USB drivers Russell King
2005-11-05 18:19 ` [DRIVER MODEL] Convert miscellaneous char drivers Russell King
2005-11-05 18:19 ` [DRIVER MODEL] Convert video drivers Russell King
2005-11-05 18:19 ` [DRIVER MODEL] Convert ALSA Russell King
2005-11-05 18:20 ` [DRIVER MODEL] Convert drivers/misc/hdpuftrs Russell King

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=20051105181347.GC14419@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox