diff options
author | Lee Jones <lee.jones@linaro.org> | 2013-05-03 10:32:10 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-05-23 15:13:03 -0400 |
commit | bb75d93b903afcd0904c83850835857fd9f8ef2d (patch) | |
tree | 96dd624af2294a3813f8a5c2337ef0ffcfd3a41d /drivers/dma | |
parent | b2abb249de5ffca71ade8b79c9969e046fc03722 (diff) |
dmaengine: ste_dma40: Allocate plat_data on declaration
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 <vnod.koul@intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/ste_dma40.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 665541df5798..925cdbe08c2e 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c | |||
@@ -3138,7 +3138,7 @@ static int __init d40_phy_res_init(struct d40_base *base) | |||
3138 | 3138 | ||
3139 | static struct d40_base * __init d40_hw_detect_init(struct platform_device *pdev) | 3139 | static struct d40_base * __init d40_hw_detect_init(struct platform_device *pdev) |
3140 | { | 3140 | { |
3141 | struct stedma40_platform_data *plat_data; | 3141 | struct stedma40_platform_data *plat_data = pdev->dev.platform_data; |
3142 | struct clk *clk = NULL; | 3142 | struct clk *clk = NULL; |
3143 | void __iomem *virtbase = NULL; | 3143 | void __iomem *virtbase = NULL; |
3144 | struct resource *res = NULL; | 3144 | struct resource *res = NULL; |
@@ -3209,8 +3209,6 @@ static struct d40_base * __init d40_hw_detect_init(struct platform_device *pdev) | |||
3209 | goto failure; | 3209 | goto failure; |
3210 | } | 3210 | } |
3211 | 3211 | ||
3212 | plat_data = pdev->dev.platform_data; | ||
3213 | |||
3214 | /* The number of physical channels on this HW */ | 3212 | /* The number of physical channels on this HW */ |
3215 | if (plat_data->num_of_phy_chans) | 3213 | if (plat_data->num_of_phy_chans) |
3216 | num_phy_chans = plat_data->num_of_phy_chans; | 3214 | num_phy_chans = plat_data->num_of_phy_chans; |