mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
of/device: Replace struct of_device with struct platform_device
of_device is just an alias for platform_device, so remove it entirely. Also replace to_of_device() with to_platform_device() and update comment blocks. This patch was initially generated from the following semantic patch, and then edited by hand to pick up the bits that coccinelle didn't catch. @@ @@ -struct of_device +struct platform_device Signed-off-by: Grant Likely <[email protected]> Reviewed-by: David S. Miller <[email protected]>
This commit is contained in:
parent
fc1caf6eaf
commit
2dc1158137
158 changed files with 519 additions and 527 deletions
|
|
@ -369,7 +369,7 @@ struct snd_soc_platform mpc5200_audio_dma_platform = {
|
|||
};
|
||||
EXPORT_SYMBOL_GPL(mpc5200_audio_dma_platform);
|
||||
|
||||
int mpc5200_audio_dma_create(struct of_device *op)
|
||||
int mpc5200_audio_dma_create(struct platform_device *op)
|
||||
{
|
||||
phys_addr_t fifo;
|
||||
struct psc_dma *psc_dma;
|
||||
|
|
@ -488,7 +488,7 @@ out_unmap:
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(mpc5200_audio_dma_create);
|
||||
|
||||
int mpc5200_audio_dma_destroy(struct of_device *op)
|
||||
int mpc5200_audio_dma_destroy(struct platform_device *op)
|
||||
{
|
||||
struct psc_dma *psc_dma = dev_get_drvdata(&op->dev);
|
||||
|
||||
|
|
|
|||
|
|
@ -81,8 +81,8 @@ to_psc_dma_stream(struct snd_pcm_substream *substream, struct psc_dma *psc_dma)
|
|||
return &psc_dma->playback;
|
||||
}
|
||||
|
||||
int mpc5200_audio_dma_create(struct of_device *op);
|
||||
int mpc5200_audio_dma_destroy(struct of_device *op);
|
||||
int mpc5200_audio_dma_create(struct platform_device *op);
|
||||
int mpc5200_audio_dma_destroy(struct platform_device *op);
|
||||
|
||||
extern struct snd_soc_platform mpc5200_audio_dma_platform;
|
||||
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ EXPORT_SYMBOL_GPL(psc_ac97_dai);
|
|||
* - Probe/remove operations
|
||||
* - OF device match table
|
||||
*/
|
||||
static int __devinit psc_ac97_of_probe(struct of_device *op,
|
||||
static int __devinit psc_ac97_of_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
int rc, i;
|
||||
|
|
@ -303,7 +303,7 @@ static int __devinit psc_ac97_of_probe(struct of_device *op,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __devexit psc_ac97_of_remove(struct of_device *op)
|
||||
static int __devexit psc_ac97_of_remove(struct platform_device *op)
|
||||
{
|
||||
return mpc5200_audio_dma_destroy(op);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ EXPORT_SYMBOL_GPL(psc_i2s_dai);
|
|||
* - Probe/remove operations
|
||||
* - OF device match table
|
||||
*/
|
||||
static int __devinit psc_i2s_of_probe(struct of_device *op,
|
||||
static int __devinit psc_i2s_of_probe(struct platform_device *op,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
int rc;
|
||||
|
|
@ -206,7 +206,7 @@ static int __devinit psc_i2s_of_probe(struct of_device *op,
|
|||
|
||||
}
|
||||
|
||||
static int __devexit psc_i2s_of_remove(struct of_device *op)
|
||||
static int __devexit psc_i2s_of_remove(struct platform_device *op)
|
||||
{
|
||||
return mpc5200_audio_dma_destroy(op);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ static struct snd_soc_ops mpc8610_hpcd_ops = {
|
|||
* SSI devices. We also probably aren't compatible with the generic Elo DMA
|
||||
* device driver.
|
||||
*/
|
||||
static int mpc8610_hpcd_probe(struct of_device *ofdev,
|
||||
static int mpc8610_hpcd_probe(struct platform_device *ofdev,
|
||||
const struct of_device_id *match)
|
||||
{
|
||||
struct device_node *np = ofdev->dev.of_node;
|
||||
|
|
@ -534,7 +534,7 @@ error:
|
|||
*
|
||||
* This function is called when the OF device is removed.
|
||||
*/
|
||||
static int mpc8610_hpcd_remove(struct of_device *ofdev)
|
||||
static int mpc8610_hpcd_remove(struct platform_device *ofdev)
|
||||
{
|
||||
struct platform_device *sound_device = dev_get_drvdata(&ofdev->dev);
|
||||
struct mpc8610_hpcd_data *machine_data =
|
||||
|
|
|
|||
Loading…
Reference in a new issue