kirkwood-i2s.c (e7b2e30a3f88b02b13a9bde05044142b38456004) | kirkwood-i2s.c (c7591edc2abd279018abb68aea5bdc604b8f56dd) |
---|---|
1/* 2 * kirkwood-i2s.c 3 * 4 * (c) 2010 Arnaud Patard <apatard@mandriva.com> 5 * (c) 2010 Arnaud Patard <arnaud.patard@rtp-net.org> 6 * 7 * This program is free software; you can redistribute it and/or modify it 8 * under the terms of the GNU General Public License as published by the --- 524 unchanged lines hidden (view full) --- 533 struct kirkwood_asoc_platform_data *data = pdev->dev.platform_data; 534 struct snd_soc_dai_driver *soc_dai = kirkwood_i2s_dai; 535 struct kirkwood_dma_data *priv; 536 struct resource *mem; 537 struct device_node *np = pdev->dev.of_node; 538 int err; 539 540 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); | 1/* 2 * kirkwood-i2s.c 3 * 4 * (c) 2010 Arnaud Patard <apatard@mandriva.com> 5 * (c) 2010 Arnaud Patard <arnaud.patard@rtp-net.org> 6 * 7 * This program is free software; you can redistribute it and/or modify it 8 * under the terms of the GNU General Public License as published by the --- 524 unchanged lines hidden (view full) --- 533 struct kirkwood_asoc_platform_data *data = pdev->dev.platform_data; 534 struct snd_soc_dai_driver *soc_dai = kirkwood_i2s_dai; 535 struct kirkwood_dma_data *priv; 536 struct resource *mem; 537 struct device_node *np = pdev->dev.of_node; 538 int err; 539 540 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); |
541 if (!priv) { 542 dev_err(&pdev->dev, "allocation failed\n"); | 541 if (!priv) |
543 return -ENOMEM; | 542 return -ENOMEM; |
544 } | 543 |
545 dev_set_drvdata(&pdev->dev, priv); 546 547 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 548 priv->io = devm_ioremap_resource(&pdev->dev, mem); 549 if (IS_ERR(priv->io)) 550 return PTR_ERR(priv->io); 551 552 priv->irq = platform_get_irq(pdev, 0); --- 118 unchanged lines hidden --- | 544 dev_set_drvdata(&pdev->dev, priv); 545 546 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 547 priv->io = devm_ioremap_resource(&pdev->dev, mem); 548 if (IS_ERR(priv->io)) 549 return PTR_ERR(priv->io); 550 551 priv->irq = platform_get_irq(pdev, 0); --- 118 unchanged lines hidden --- |