diff options
author | Inha Song <ideal.song@samsung.com> | 2014-04-30 16:04:28 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-18 11:59:47 +0900 |
commit | d9d91c22eff196122dc867ec530bac919b03b0f1 (patch) | |
tree | 257219938589f9676c9bcc95cf30cc399ecedb36 /sound | |
parent | c008827e04594fc74bd60b75ce44490c7e30c885 (diff) | |
download | linux-3.10-d9d91c22eff196122dc867ec530bac919b03b0f1.tar.gz linux-3.10-d9d91c22eff196122dc867ec530bac919b03b0f1.tar.bz2 linux-3.10-d9d91c22eff196122dc867ec530bac919b03b0f1.zip |
ASoC: Samsung: Don't register idma device as platform device
Previously, the ASoC idma was instantiated via a platform_device.
But it was a virtual device with sole purpose to call snd_soc_register_platform().
Each Samsung DAI now registers the ASoC 'platform' itself.
Change-Id: Ie1c9b2bdf5522dc085fe2bbb271cd9ceb86252f7
Signed-off-by: Inha Song <ideal.song@samsung.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/samsung/idma.c | 30 | ||||
-rw-r--r-- | sound/soc/samsung/idma.h | 4 |
2 files changed, 11 insertions, 23 deletions
diff --git a/sound/soc/samsung/idma.c b/sound/soc/samsung/idma.c index 6e5fed30aa2..8c3f912fddf 100644 --- a/sound/soc/samsung/idma.c +++ b/sound/soc/samsung/idma.c @@ -405,11 +405,12 @@ static int idma_new(struct snd_soc_pcm_runtime *rtd) return ret; } -void idma_reg_addr_init(void __iomem *regs, dma_addr_t addr) +void idma_reg_addr_init(void __iomem *regs, dma_addr_t addr, int irq) { spin_lock_init(&idma.lock); idma.regs = regs; idma.lp_tx_addr = addr; + idma_irq = irq; } EXPORT_SYMBOL_GPL(idma_reg_addr_init); @@ -419,32 +420,17 @@ static struct snd_soc_platform_driver asoc_idma_platform = { .pcm_free = idma_free, }; -static int asoc_idma_platform_probe(struct platform_device *pdev) +int asoc_idma_platform_register(struct device *dev) { - idma_irq = platform_get_irq(pdev, 0); - if (idma_irq < 0) - return idma_irq; - - return snd_soc_register_platform(&pdev->dev, &asoc_idma_platform); + return snd_soc_register_platform(dev, &asoc_idma_platform); } +EXPORT_SYMBOL_GPL(asoc_idma_platform_register); -static int asoc_idma_platform_remove(struct platform_device *pdev) +void asoc_idma_platform_unregister(struct device *dev) { - snd_soc_unregister_platform(&pdev->dev); - return 0; + snd_soc_unregister_platform(dev); } - -static struct platform_driver asoc_idma_driver = { - .driver = { - .name = "samsung-idma", - .owner = THIS_MODULE, - }, - - .probe = asoc_idma_platform_probe, - .remove = asoc_idma_platform_remove, -}; - -module_platform_driver(asoc_idma_driver); +EXPORT_SYMBOL_GPL(asoc_idma_platform_unregister); MODULE_AUTHOR("Jaswinder Singh, <jassisinghbrar@gmail.com>"); MODULE_DESCRIPTION("Samsung ASoC IDMA Driver"); diff --git a/sound/soc/samsung/idma.h b/sound/soc/samsung/idma.h index 8644946973e..b12c47f1d86 100644 --- a/sound/soc/samsung/idma.h +++ b/sound/soc/samsung/idma.h @@ -14,8 +14,10 @@ #ifndef __SND_SOC_SAMSUNG_IDMA_H_ #define __SND_SOC_SAMSUNG_IDMA_H_ -extern void idma_reg_addr_init(void __iomem *regs, dma_addr_t addr); +extern void idma_reg_addr_init(void __iomem *regs, dma_addr_t addr, int irq); +int asoc_idma_platform_register(struct device *dev); +void asoc_idma_platform_unregister(struct device *dev); /* dma_state */ #define LPAM_DMA_STOP 0 #define LPAM_DMA_START 1 |