linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Popov <alex.popov@linux.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Anatolij Gustschin <agust@denx.de>, Gerhard Sittig <gsi@denx.de>,
	Rob Herring <robh@kernel.org>, Timur Tabi <timur@tabi.org>,
	Grant Likely <grant.likely@linaro.org>,
	Dan Williams <dan.j.williams@intel.com>,
	Vinod Koul <vinod.koul@intel.com>,
	Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Alexander Popov <alex.popov@linux.com>,
	linuxppc-dev@lists.ozlabs.org, dmaengine@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v3 3/3] dmaengine: mpc512x: initialize with subsys_initcall()
Date: Thu, 24 Sep 2015 20:28:57 +0300	[thread overview]
Message-ID: <1443115737-3948-4-git-send-email-alex.popov@linux.com> (raw)
In-Reply-To: <1443115737-3948-1-git-send-email-alex.popov@linux.com>

Initialize Freescale MPC512x DMA driver with subsys_initcall()
to allow the depending drivers to call dma_request_slave_channel()
during their probe.

Signed-off-by: Alexander Popov <alex.popov@linux.com>
---
 drivers/dma/mpc512x_dma.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/mpc512x_dma.c b/drivers/dma/mpc512x_dma.c
index e6281e7..4f29d7c 100644
--- a/drivers/dma/mpc512x_dma.c
+++ b/drivers/dma/mpc512x_dma.c
@@ -1083,7 +1083,17 @@ static struct platform_driver mpc_dma_driver = {
 	},
 };
 
-module_platform_driver(mpc_dma_driver);
+static int __init mpc_dma_driver_init(void)
+{
+	return platform_driver_register(&mpc_dma_driver);
+}
+subsys_initcall(mpc_dma_driver_init);
+
+static void __exit mpc_dma_driver_exit(void)
+{
+	platform_driver_unregister(&mpc_dma_driver);
+}
+module_exit(mpc_dma_driver_exit);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Piotr Ziecik <kosmo@semihalf.com>");
-- 
1.9.1

  parent reply	other threads:[~2015-09-24 17:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-24 17:28 [PATCH v3 0/3] powerpc/512x: add LocalPlus Bus FIFO device driver Alexander Popov
2015-09-24 17:28 ` [PATCH v3 1/3] " Alexander Popov
2015-09-25  1:01   ` Timur Tabi
2015-09-28 13:13     ` Alexander Popov
2015-09-28 13:18       ` Timur Tabi
2015-09-29  6:34         ` Alexander Popov
2015-09-30 21:24     ` Alexander Popov
2015-10-01 17:11       ` Timur Tabi
2015-10-05 22:22         ` Alexander Popov
2015-09-24 17:28 ` [PATCH v3 2/3] powerpc/512x: add a device tree binding for LocalPlus Bus FIFO Alexander Popov
2015-09-25  0:18   ` Timur Tabi
2015-09-28 13:24     ` Alexander Popov
2015-09-28 13:26       ` Timur Tabi
2015-09-29  6:35         ` Alexander Popov
2015-09-24 17:28 ` Alexander Popov [this message]
2015-09-25  0:16   ` [PATCH v3 3/3] dmaengine: mpc512x: initialize with subsys_initcall() Timur Tabi
2015-09-28 13:15     ` Alexander Popov
2015-10-07 14:17   ` Vinod Koul
2015-10-07 21:31     ` Alexander Popov

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=1443115737-3948-4-git-send-email-alex.popov@linux.com \
    --to=alex.popov@linux.com \
    --cc=agust@denx.de \
    --cc=benh@kernel.crashing.org \
    --cc=dan.j.williams@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=grant.likely@linaro.org \
    --cc=gsi@denx.de \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mark.rutland@arm.com \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=pawel.moll@arm.com \
    --cc=robh@kernel.org \
    --cc=timur@tabi.org \
    --cc=vinod.koul@intel.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 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).