From patchwork Fri Oct 17 00:48:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ray Jui X-Patchwork-Id: 5094751 Return-Path: X-Original-To: patchwork-dmaengine@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 018EEC11AC for ; Fri, 17 Oct 2014 00:47:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9731E201CD for ; Fri, 17 Oct 2014 00:47:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A110F20114 for ; Fri, 17 Oct 2014 00:47:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753132AbaJQArh (ORCPT ); Thu, 16 Oct 2014 20:47:37 -0400 Received: from mail-gw2-out.broadcom.com ([216.31.210.63]:3441 "EHLO mail-gw2-out.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752620AbaJQArg (ORCPT ); Thu, 16 Oct 2014 20:47:36 -0400 X-IronPort-AV: E=Sophos;i="5.04,735,1406617200"; d="scan'208";a="48414406" Received: from irvexchcas08.broadcom.com (HELO IRVEXCHCAS08.corp.ad.broadcom.com) ([10.9.208.57]) by mail-gw2-out.broadcom.com with ESMTP; 16 Oct 2014 18:09:30 -0700 Received: from IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) by IRVEXCHCAS08.corp.ad.broadcom.com (10.9.208.57) with Microsoft SMTP Server (TLS) id 14.3.174.1; Thu, 16 Oct 2014 17:47:39 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP2.corp.ad.broadcom.com (10.9.207.52) with Microsoft SMTP Server id 14.3.174.1; Thu, 16 Oct 2014 17:47:40 -0700 Received: from mail.broadcom.com (lbrmn-lnxub44.ric.broadcom.com [10.136.8.49]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id E5D9D40FE5; Thu, 16 Oct 2014 17:47:24 -0700 (PDT) From: Ray Jui To: Vinod Koul , Dan Williams CC: Scott Branden , , , Ray Jui Subject: [PATCH] dmaengine: pl330: use subsys_initcall Date: Thu, 16 Oct 2014 17:48:16 -0700 Message-ID: <1413506896-4536-1-git-send-email-rjui@broadcom.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As part of subsystem that many slave drivers depend on, it's more appropriate for the pl330 DMA driver to be initialized at subsys_initcall than device_initcall Signed-off-by: Ray Jui Tested-by: Krzysztof Kozlowski --- drivers/dma/pl330.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index d5149aa..abb4cae 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2811,7 +2811,17 @@ static struct amba_driver pl330_driver = { .remove = pl330_remove, }; -module_amba_driver(pl330_driver); +static int __init pl330_init(void) +{ + return amba_driver_register(&pl330_driver); +} +subsys_initcall(pl330_init); + +static void __exit pl330_exit(void) +{ + amba_driver_unregister(&pl330_driver); +} +module_exit(pl330_exit); MODULE_AUTHOR("Jaswinder Singh "); MODULE_DESCRIPTION("API Driver for PL330 DMAC");