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 ALSA
Date: Sat, 5 Nov 2005 18:19:59 +0000	[thread overview]
Message-ID: <20051105181959.GT14419@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>

unchanged:
--- b/sound/core/init.c
+++ b/sound/core/init.c
@@ -683,13 +683,14 @@
 #endif
 
 /* initialized in sound.c */
-struct device_driver snd_generic_driver = {
-	.name		= SND_GENERIC_NAME,
-	.bus		= &platform_bus_type,
+struct platform_driver snd_generic_driver = {
 #ifdef CONFIG_PM
 	.suspend	= snd_generic_suspend,
 	.resume		= snd_generic_resume,
 #endif
+	.driver		= {
+		.name	= SND_GENERIC_NAME,
+	},
 };
 
 void snd_generic_device_release(struct device *dev)
unchanged:
--- b/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -329,7 +329,7 @@ int __exit snd_minor_info_done(void)
  */
 
 #ifdef CONFIG_SND_GENERIC_DRIVER
-extern struct device_driver snd_generic_driver;
+extern struct platform_driver snd_generic_driver;
 #endif
 
 static int __init alsa_sound_init(void)
@@ -359,7 +359,7 @@ static int __init alsa_sound_init(void)
 	}
 	snd_info_minor_register();
 #ifdef CONFIG_SND_GENERIC_DRIVER
-	driver_register(&snd_generic_driver);
+	platform_driver_register(&snd_generic_driver);
 #endif
 	for (controlnum = 0; controlnum < cards_limit; controlnum++)
 		devfs_mk_cdev(MKDEV(major, controlnum<<5), S_IFCHR | device_mode, "snd/controlC%d", controlnum);
@@ -377,7 +377,7 @@ static void __exit alsa_sound_exit(void)
 		devfs_remove("snd/controlC%d", controlnum);
 
 #ifdef CONFIG_SND_GENERIC_DRIVER
-	driver_unregister(&snd_generic_driver);
+	platform_driver_unregister(&snd_generic_driver);
 #endif
 	snd_info_minor_unregister();
 	snd_info_done();


-- 
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:21 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 ` [DRIVER MODEL] Convert arch/um/ Russell King
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 ` Russell King [this message]
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=20051105181959.GT14419@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