linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: stefan.wahren@i2se.com (Stefan Wahren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC 08/11] staging: bcm2835-audio: use module_platform_driver() macro
Date: Thu, 25 Oct 2018 17:29:32 +0200	[thread overview]
Message-ID: <1540481375-15952-9-git-send-email-stefan.wahren@i2se.com> (raw)
In-Reply-To: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com>

There is not much value behind this boilerplate, so use
module_platform_driver() instead.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 .../staging/vc04_services/bcm2835-audio/bcm2835.c    | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
index 87d56ab..87a27fd 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c
@@ -356,25 +356,7 @@ static struct platform_driver bcm2835_alsa0_driver = {
 		.of_match_table = snd_bcm2835_of_match_table,
 	},
 };
-
-static int bcm2835_alsa_device_init(void)
-{
-	int retval;
-
-	retval = platform_driver_register(&bcm2835_alsa0_driver);
-	if (retval)
-		pr_err("Error registering bcm2835_audio driver %d .\n", retval);
-
-	return retval;
-}
-
-static void bcm2835_alsa_device_exit(void)
-{
-	platform_driver_unregister(&bcm2835_alsa0_driver);
-}
-
-late_initcall(bcm2835_alsa_device_init);
-module_exit(bcm2835_alsa_device_exit);
+module_platform_driver(bcm2835_alsa0_driver);
 
 MODULE_AUTHOR("Dom Cobley");
 MODULE_DESCRIPTION("Alsa driver for BCM2835 chip");
-- 
2.7.4

  parent reply	other threads:[~2018-10-25 15:29 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-25 15:29 [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload Stefan Wahren
2018-10-25 15:29 ` [PATCH RFC 01/11] staging: bcm2835-camera: Abort probe if there is no camera Stefan Wahren
2018-12-19  8:07   ` Peter Robinson
2018-10-25 15:29 ` [PATCH RFC 02/11] staging: bcm2835-camera: fix module autoloading Stefan Wahren
2018-12-19  7:54   ` Peter Robinson
2018-10-25 15:29 ` [PATCH RFC 03/11] staging: bcm2835-camera: Move module info to the end Stefan Wahren
2018-12-19  7:53   ` Peter Robinson
2018-10-25 15:29 ` [PATCH RFC 04/11] staging: vchiq_arm: Fix platform device unregistration Stefan Wahren
2018-10-26  8:07   ` Dan Carpenter
2018-10-25 15:29 ` [PATCH RFC 05/11] staging: vchiq_arm: Fix camera device registration Stefan Wahren
2018-10-25 15:29 ` [PATCH RFC 06/11] staging: vchiq_arm: Register a platform device for audio Stefan Wahren
2018-10-26  8:09   ` Dan Carpenter
2018-10-26  8:18     ` Dan Carpenter
2018-10-25 15:29 ` [PATCH RFC 07/11] staging: bcm2835-audio: Enable compile test Stefan Wahren
2018-10-25 15:29 ` Stefan Wahren [this message]
2018-10-25 15:29 ` [PATCH RFX 09/11] staging: bcm2835-audio: Drop DT dependency Stefan Wahren
2018-10-25 15:29 ` [PATCH RFC 10/11] staging: bcm2835-camera: Provide more specific probe error messages Stefan Wahren
2018-10-25 15:29 ` [PATCH RFC 11/11] staging: bcm2835-camera: Add hint about possible faulty config Stefan Wahren
2018-10-26 10:55   ` Nicolas Saenz Julienne
2018-10-26 11:06 ` [PATCH RFC 00/11] staging: vc04_services: Improve driver load/unload Nicolas Saenz Julienne
2018-10-28 20:10   ` Stefan Wahren
2019-01-08  7:21 ` Peter Robinson
2019-01-08  8:48   ` Stefan Wahren
2019-01-08  8:56     ` Peter Robinson
2019-01-08 10:20       ` Stefan Wahren
2019-01-10  5:09         ` Peter Robinson
2019-01-10  6:24           ` Stefan Wahren
2019-01-10  6:34             ` Peter Robinson
2019-01-10 18:48               ` Stefan Wahren
2019-01-11  6:10                 ` Peter Robinson
2019-01-11 16:43                   ` Dave Stevenson
2019-01-12  5:26                     ` Peter Robinson
2019-01-10  7:05             ` Peter Robinson
2019-01-08 17:10   ` Dave Stevenson
2019-01-09  8:33     ` Stefan Wahren
2019-01-09 11:58       ` Nicolas Saenz Julienne
2019-01-10  5:22     ` Peter Robinson

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=1540481375-15952-9-git-send-email-stefan.wahren@i2se.com \
    --to=stefan.wahren@i2se.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).