提交 970d8a71 编写于 作者: D Daniel Mack 提交者: Mark Brown

ARM: pxa: ssp: add shortcut for &pdev->dev

No functional change, just a cosmetic cleanup.
Signed-off-by: NDaniel Mack <zonque@gmail.com>
Acked-by: NHaojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 64be2814
......@@ -77,6 +77,7 @@ static int pxa_ssp_probe(struct platform_device *pdev)
const struct platform_device_id *id = platform_get_device_id(pdev);
struct resource *res;
struct ssp_device *ssp;
struct device *dev = &pdev->dev;
int ret = 0;
ssp = kzalloc(sizeof(struct ssp_device), GFP_KERNEL);
......@@ -85,7 +86,7 @@ static int pxa_ssp_probe(struct platform_device *pdev)
ssp->pdev = pdev;
ssp->clk = clk_get(&pdev->dev, NULL);
ssp->clk = clk_get(dev, NULL);
if (IS_ERR(ssp->clk)) {
ret = PTR_ERR(ssp->clk);
goto err_free;
......@@ -93,7 +94,7 @@ static int pxa_ssp_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_DMA, 0);
if (res == NULL) {
dev_err(&pdev->dev, "no SSP RX DRCMR defined\n");
dev_err(dev, "no SSP RX DRCMR defined\n");
ret = -ENODEV;
goto err_free_clk;
}
......@@ -101,7 +102,7 @@ static int pxa_ssp_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_DMA, 1);
if (res == NULL) {
dev_err(&pdev->dev, "no SSP TX DRCMR defined\n");
dev_err(dev, "no SSP TX DRCMR defined\n");
ret = -ENODEV;
goto err_free_clk;
}
......@@ -109,7 +110,7 @@ static int pxa_ssp_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (res == NULL) {
dev_err(&pdev->dev, "no memory resource defined\n");
dev_err(dev, "no memory resource defined\n");
ret = -ENODEV;
goto err_free_clk;
}
......@@ -117,7 +118,7 @@ static int pxa_ssp_probe(struct platform_device *pdev)
res = request_mem_region(res->start, resource_size(res),
pdev->name);
if (res == NULL) {
dev_err(&pdev->dev, "failed to request memory resource\n");
dev_err(dev, "failed to request memory resource\n");
ret = -EBUSY;
goto err_free_clk;
}
......@@ -126,14 +127,14 @@ static int pxa_ssp_probe(struct platform_device *pdev)
ssp->mmio_base = ioremap(res->start, resource_size(res));
if (ssp->mmio_base == NULL) {
dev_err(&pdev->dev, "failed to ioremap() registers\n");
dev_err(dev, "failed to ioremap() registers\n");
ret = -ENODEV;
goto err_free_mem;
}
ssp->irq = platform_get_irq(pdev, 0);
if (ssp->irq < 0) {
dev_err(&pdev->dev, "no IRQ resource defined\n");
dev_err(dev, "no IRQ resource defined\n");
ret = -ENODEV;
goto err_free_io;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册