diff options
author | Daniel Mack <zonque@gmail.com> | 2013-08-12 04:37:15 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-14 14:54:20 -0400 |
commit | 970d8a7152aa884b9bab6a8db1ff148ee22df899 (patch) | |
tree | b9e9d0c164cf206504355de162e21aec761164c8 | |
parent | 64be28146f746681c5f5625d321dd67602bb264c (diff) |
ARM: pxa: ssp: add shortcut for &pdev->dev
No functional change, just a cosmetic cleanup.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | arch/arm/plat-pxa/ssp.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/arm/plat-pxa/ssp.c b/arch/arm/plat-pxa/ssp.c index f746b6a388b8..65ba28a0e3c6 100644 --- a/arch/arm/plat-pxa/ssp.c +++ b/arch/arm/plat-pxa/ssp.c | |||
@@ -77,6 +77,7 @@ static int pxa_ssp_probe(struct platform_device *pdev) | |||
77 | const struct platform_device_id *id = platform_get_device_id(pdev); | 77 | const struct platform_device_id *id = platform_get_device_id(pdev); |
78 | struct resource *res; | 78 | struct resource *res; |
79 | struct ssp_device *ssp; | 79 | struct ssp_device *ssp; |
80 | struct device *dev = &pdev->dev; | ||
80 | int ret = 0; | 81 | int ret = 0; |
81 | 82 | ||
82 | ssp = kzalloc(sizeof(struct ssp_device), GFP_KERNEL); | 83 | ssp = kzalloc(sizeof(struct ssp_device), GFP_KERNEL); |
@@ -85,7 +86,7 @@ static int pxa_ssp_probe(struct platform_device *pdev) | |||
85 | 86 | ||
86 | ssp->pdev = pdev; | 87 | ssp->pdev = pdev; |
87 | 88 | ||
88 | ssp->clk = clk_get(&pdev->dev, NULL); | 89 | ssp->clk = clk_get(dev, NULL); |
89 | if (IS_ERR(ssp->clk)) { | 90 | if (IS_ERR(ssp->clk)) { |
90 | ret = PTR_ERR(ssp->clk); | 91 | ret = PTR_ERR(ssp->clk); |
91 | goto err_free; | 92 | goto err_free; |
@@ -93,7 +94,7 @@ static int pxa_ssp_probe(struct platform_device *pdev) | |||
93 | 94 | ||
94 | res = platform_get_resource(pdev, IORESOURCE_DMA, 0); | 95 | res = platform_get_resource(pdev, IORESOURCE_DMA, 0); |
95 | if (res == NULL) { | 96 | if (res == NULL) { |
96 | dev_err(&pdev->dev, "no SSP RX DRCMR defined\n"); | 97 | dev_err(dev, "no SSP RX DRCMR defined\n"); |
97 | ret = -ENODEV; | 98 | ret = -ENODEV; |
98 | goto err_free_clk; | 99 | goto err_free_clk; |
99 | } | 100 | } |
@@ -101,7 +102,7 @@ static int pxa_ssp_probe(struct platform_device *pdev) | |||
101 | 102 | ||
102 | res = platform_get_resource(pdev, IORESOURCE_DMA, 1); | 103 | res = platform_get_resource(pdev, IORESOURCE_DMA, 1); |
103 | if (res == NULL) { | 104 | if (res == NULL) { |
104 | dev_err(&pdev->dev, "no SSP TX DRCMR defined\n"); | 105 | dev_err(dev, "no SSP TX DRCMR defined\n"); |
105 | ret = -ENODEV; | 106 | ret = -ENODEV; |
106 | goto err_free_clk; | 107 | goto err_free_clk; |
107 | } | 108 | } |
@@ -109,7 +110,7 @@ static int pxa_ssp_probe(struct platform_device *pdev) | |||
109 | 110 | ||
110 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 111 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
111 | if (res == NULL) { | 112 | if (res == NULL) { |
112 | dev_err(&pdev->dev, "no memory resource defined\n"); | 113 | dev_err(dev, "no memory resource defined\n"); |
113 | ret = -ENODEV; | 114 | ret = -ENODEV; |
114 | goto err_free_clk; | 115 | goto err_free_clk; |
115 | } | 116 | } |
@@ -117,7 +118,7 @@ static int pxa_ssp_probe(struct platform_device *pdev) | |||
117 | res = request_mem_region(res->start, resource_size(res), | 118 | res = request_mem_region(res->start, resource_size(res), |
118 | pdev->name); | 119 | pdev->name); |
119 | if (res == NULL) { | 120 | if (res == NULL) { |
120 | dev_err(&pdev->dev, "failed to request memory resource\n"); | 121 | dev_err(dev, "failed to request memory resource\n"); |
121 | ret = -EBUSY; | 122 | ret = -EBUSY; |
122 | goto err_free_clk; | 123 | goto err_free_clk; |
123 | } | 124 | } |
@@ -126,14 +127,14 @@ static int pxa_ssp_probe(struct platform_device *pdev) | |||
126 | 127 | ||
127 | ssp->mmio_base = ioremap(res->start, resource_size(res)); | 128 | ssp->mmio_base = ioremap(res->start, resource_size(res)); |
128 | if (ssp->mmio_base == NULL) { | 129 | if (ssp->mmio_base == NULL) { |
129 | dev_err(&pdev->dev, "failed to ioremap() registers\n"); | 130 | dev_err(dev, "failed to ioremap() registers\n"); |
130 | ret = -ENODEV; | 131 | ret = -ENODEV; |
131 | goto err_free_mem; | 132 | goto err_free_mem; |
132 | } | 133 | } |
133 | 134 | ||
134 | ssp->irq = platform_get_irq(pdev, 0); | 135 | ssp->irq = platform_get_irq(pdev, 0); |
135 | if (ssp->irq < 0) { | 136 | if (ssp->irq < 0) { |
136 | dev_err(&pdev->dev, "no IRQ resource defined\n"); | 137 | dev_err(dev, "no IRQ resource defined\n"); |
137 | ret = -ENODEV; | 138 | ret = -ENODEV; |
138 | goto err_free_io; | 139 | goto err_free_io; |
139 | } | 140 | } |