From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757013AbbIXR2H (ORCPT ); Thu, 24 Sep 2015 13:28:07 -0400 Received: from mail-la0-f66.google.com ([209.85.215.66]:34721 "EHLO mail-la0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755170AbbIXR17 (ORCPT ); Thu, 24 Sep 2015 13:27:59 -0400 From: Alexander Popov To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Anatolij Gustschin , Gerhard Sittig , Rob Herring , Timur Tabi , Grant Likely , Dan Williams , Vinod Koul , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Alexander Popov , 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 Message-Id: <1443115737-3948-4-git-send-email-alex.popov@linux.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1443115737-3948-1-git-send-email-alex.popov@linux.com> References: <1443115737-3948-1-git-send-email-alex.popov@linux.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 "); -- 1.9.1