From patchwork Thu Apr 18 10:12:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 16210 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gg0-f197.google.com (mail-gg0-f197.google.com [209.85.161.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1CFE423974 for ; Thu, 18 Apr 2013 10:13:51 +0000 (UTC) Received: by mail-gg0-f197.google.com with SMTP id k5sf3674979ggn.8 for ; Thu, 18 Apr 2013 03:13:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=FzhJft8jsPgS8o/6/CfKMUjBlPY2oY4hQjV0a/Uj2uE=; b=k/3R3TWAgf42nb17Qn2ogSWSPhX2Vd9cdZwle8m2RVtz7yWGtj76gNTY7B/zH/CQF7 nUe2OpKv/0c8CkYHzK4pvtQa/0ViMEu+NBwc5U/7cH42sudpFGNRhMP0Q2wuY6i68S0d RbM12ElfTr1jfJMN993Yuzik3kjO4IBWzCyvY1DUrnYGecDnZv/tE0QcgKpYsbMyxpZu 5XVIvWUt9rC9t1eq8RRUQ3CydBPfngsMVUbZakj1uR19bBghD2SnLVlzsm/FKEow9VRf I3Hb92FTvs5jSgWQg+8nhK+tTUN04NDBGrMYTGe3V2T5l7sWqNjiKCq21/5lb4nMMJ63 bsgQ== X-Received: by 10.224.178.205 with SMTP id bn13mr7579615qab.3.1366279994130; Thu, 18 Apr 2013 03:13:14 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.48.131 with SMTP id l3ls1450084qen.54.gmail; Thu, 18 Apr 2013 03:13:13 -0700 (PDT) X-Received: by 10.52.67.166 with SMTP id o6mr6357879vdt.59.1366279993880; Thu, 18 Apr 2013 03:13:13 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id iv1si6239680vcb.39.2013.04.18.03.13.13 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Apr 2013 03:13:13 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id kw10so2229163vcb.19 for ; Thu, 18 Apr 2013 03:13:13 -0700 (PDT) X-Received: by 10.58.144.170 with SMTP id sn10mr3188300veb.7.1366279993647; Thu, 18 Apr 2013 03:13:13 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp115758veb; Thu, 18 Apr 2013 03:13:13 -0700 (PDT) X-Received: by 10.180.183.197 with SMTP id eo5mr17006208wic.28.1366279992715; Thu, 18 Apr 2013 03:13:12 -0700 (PDT) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [2a00:1450:400c:c05::229]) by mx.google.com with ESMTPS id a12si3423920wja.221.2013.04.18.03.13.12 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Apr 2013 03:13:12 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::229 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c05::229; Received: by mail-wi0-f169.google.com with SMTP id h11so1694095wiv.2 for ; Thu, 18 Apr 2013 03:13:12 -0700 (PDT) X-Received: by 10.180.109.196 with SMTP id hu4mr11277413wib.27.1366279992240; Thu, 18 Apr 2013 03:13:12 -0700 (PDT) Received: from localhost.localdomain (cpc34-aztw25-2-0-cust250.18-1.cable.virginmedia.com. [86.16.136.251]) by mx.google.com with ESMTPS id t7sm30483773wij.2.2013.04.18.03.13.10 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Apr 2013 03:13:11 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: arnd@arndb.de, linus.walleij@stericsson.com, Lee Jones , Vinod Koul , Dan Williams , Per Forlin , Rabin Vincent Subject: [PATCH 22/32] dmaengine: ste_dma40: Allocate plat_data on declaration Date: Thu, 18 Apr 2013 11:12:04 +0100 Message-Id: <1366279934-30761-23-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1366279934-30761-1-git-send-email-lee.jones@linaro.org> References: <1366279934-30761-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQnb4YvNXwYJznBFFaZ3iaeQosUAL7TYfYprnqq04+IpdUkNqXfsqING3dtc0E0EVdutlE2U X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , It's the way that most other drivers do it. Very trivial clean-up which reduces line count and simplifies code. Cc: Vinod Koul Cc: Dan Williams Cc: Per Forlin Cc: Rabin Vincent Signed-off-by: Lee Jones --- drivers/dma/ste_dma40.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 805049c..6f9f801 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -3119,7 +3119,7 @@ static int __init d40_phy_res_init(struct d40_base *base) static struct d40_base * __init d40_hw_detect_init(struct platform_device *pdev) { - struct stedma40_platform_data *plat_data; + struct stedma40_platform_data *plat_data = pdev->dev.platform_data; struct clk *clk = NULL; void __iomem *virtbase = NULL; struct resource *res = NULL; @@ -3190,8 +3190,6 @@ static struct d40_base * __init d40_hw_detect_init(struct platform_device *pdev) goto failure; } - plat_data = pdev->dev.platform_data; - /* The number of physical channels on this HW */ if (plat_data->num_of_phy_chans) num_phy_chans = plat_data->num_of_phy_chans;