From patchwork Fri May 3 14:32:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 16655 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gh0-f199.google.com (mail-gh0-f199.google.com [209.85.160.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7A67623905 for ; Fri, 3 May 2013 14:34:25 +0000 (UTC) Received: by mail-gh0-f199.google.com with SMTP id g14sf2522449ghb.6 for ; Fri, 03 May 2013 07:34:15 -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=Hpoun66bGykNfcDy3JsGC3qJ2oP4tXWPCIGEzhiZ0oo=; b=Qh0S3Oomfn13DkV2qXxRP3Jel1+IYJ9M2+0WgCsws9EoUnk8iv1hrGvwCOwL/QO9sx ZNCKEAN2uGdHPfPe+Ca/vV3dEo+SJGz76xTvB2K+BlyXyQv0KSePCQd+6YSXu2u9XyR4 7kgfklfP64hrtJI2KTnFBPMYm5o0/hvqdeCsXOJC4pBDKnhppqz5tFkM67LoI7OAEi3l oBHWt4SA1voTBsuBBmkhad+eJYo48qPRAv7RQL3SCIKQ0pnAiOU7b4REFhTC7ZWg6hkc ScRagPTvxcJ4JNoalHGtiQ6pVfzPtpGxmhSJvEBorNAoM4wZJga0GdfcwMKbr38T2b3P Urcg== X-Received: by 10.236.15.34 with SMTP id e22mr8196026yhe.16.1367591655548; Fri, 03 May 2013 07:34:15 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.87.68 with SMTP id v4ls1834246qez.7.gmail; Fri, 03 May 2013 07:34:15 -0700 (PDT) X-Received: by 10.52.232.104 with SMTP id tn8mr3213613vdc.81.1367591655348; Fri, 03 May 2013 07:34:15 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id un20si5171364veb.11.2013.05.03.07.34.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 03 May 2013 07:34:15 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.179 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.179; Received: by mail-vc0-f179.google.com with SMTP id hz10so1457305vcb.38 for ; Fri, 03 May 2013 07:34:15 -0700 (PDT) X-Received: by 10.220.189.9 with SMTP id dc9mr3716264vcb.8.1367591655286; Fri, 03 May 2013 07:34:15 -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 nf2csp25198veb; Fri, 3 May 2013 07:34:14 -0700 (PDT) X-Received: by 10.180.211.50 with SMTP id mz18mr40684440wic.24.1367591653851; Fri, 03 May 2013 07:34:13 -0700 (PDT) Received: from mail-we0-x22f.google.com (mail-we0-x22f.google.com [2a00:1450:400c:c03::22f]) by mx.google.com with ESMTPS id e11si3612981wiw.29.2013.05.03.07.34.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 03 May 2013 07:34:13 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::22f is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=2a00:1450:400c:c03::22f; Received: by mail-we0-f175.google.com with SMTP id s43so1384275wey.34 for ; Fri, 03 May 2013 07:34:13 -0700 (PDT) X-Received: by 10.180.21.242 with SMTP id y18mr33301142wie.7.1367591653424; Fri, 03 May 2013 07:34:13 -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 ESMTPSA id o3sm17516019wia.2.2013.05.03.07.34.11 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 03 May 2013 07:34:12 -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, srinidhi.kasagar@stericsson.com, Lee Jones Subject: [PATCH 24/63] dmaengine: ste_dma40: Allocate plat_data on declaration Date: Fri, 3 May 2013 15:32:10 +0100 Message-Id: <1367591569-32197-25-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1367591569-32197-1-git-send-email-lee.jones@linaro.org> References: <1367591569-32197-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQlj8PHhOSECpilgxL6HjTYi7QD9VjlDIjw3ZsHWL4pHcXeuiOvMnicJcTwskOmDq7+40XUw X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.179 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. Acked-by: Vinod Koul Reviewed-by: Linus Walleij 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 6d81f44..ba50561 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c @@ -3132,7 +3132,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; @@ -3203,8 +3203,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;