diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-08-06 11:25:50 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-08-06 11:25:50 -0400 |
commit | 2dc11581376829303b98eadb2de253bee065a56a (patch) | |
tree | dbce62559c822cd720d1819a50c488bfecdfa945 /sound/sparc/cs4231.c | |
parent | fc1caf6eafb30ea185720e29f7f5eccca61ecd60 (diff) |
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 <grant.likely@secretlab.ca>
Reviewed-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'sound/sparc/cs4231.c')
-rw-r--r-- | sound/sparc/cs4231.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c index 68570ee2c9bb..c276086c3b57 100644 --- a/sound/sparc/cs4231.c +++ b/sound/sparc/cs4231.c | |||
@@ -111,7 +111,7 @@ struct snd_cs4231 { | |||
111 | struct mutex mce_mutex; /* mutex for mce register */ | 111 | struct mutex mce_mutex; /* mutex for mce register */ |
112 | struct mutex open_mutex; /* mutex for ALSA open/close */ | 112 | struct mutex open_mutex; /* mutex for ALSA open/close */ |
113 | 113 | ||
114 | struct of_device *op; | 114 | struct platform_device *op; |
115 | unsigned int irq[2]; | 115 | unsigned int irq[2]; |
116 | unsigned int regs_size; | 116 | unsigned int regs_size; |
117 | struct snd_cs4231 *next; | 117 | struct snd_cs4231 *next; |
@@ -1771,7 +1771,7 @@ static unsigned int sbus_dma_addr(struct cs4231_dma_control *dma_cont) | |||
1771 | 1771 | ||
1772 | static int snd_cs4231_sbus_free(struct snd_cs4231 *chip) | 1772 | static int snd_cs4231_sbus_free(struct snd_cs4231 *chip) |
1773 | { | 1773 | { |
1774 | struct of_device *op = chip->op; | 1774 | struct platform_device *op = chip->op; |
1775 | 1775 | ||
1776 | if (chip->irq[0]) | 1776 | if (chip->irq[0]) |
1777 | free_irq(chip->irq[0], chip); | 1777 | free_irq(chip->irq[0], chip); |
@@ -1794,7 +1794,7 @@ static struct snd_device_ops snd_cs4231_sbus_dev_ops = { | |||
1794 | }; | 1794 | }; |
1795 | 1795 | ||
1796 | static int __devinit snd_cs4231_sbus_create(struct snd_card *card, | 1796 | static int __devinit snd_cs4231_sbus_create(struct snd_card *card, |
1797 | struct of_device *op, | 1797 | struct platform_device *op, |
1798 | int dev) | 1798 | int dev) |
1799 | { | 1799 | { |
1800 | struct snd_cs4231 *chip = card->private_data; | 1800 | struct snd_cs4231 *chip = card->private_data; |
@@ -1856,7 +1856,7 @@ static int __devinit snd_cs4231_sbus_create(struct snd_card *card, | |||
1856 | return 0; | 1856 | return 0; |
1857 | } | 1857 | } |
1858 | 1858 | ||
1859 | static int __devinit cs4231_sbus_probe(struct of_device *op, const struct of_device_id *match) | 1859 | static int __devinit cs4231_sbus_probe(struct platform_device *op, const struct of_device_id *match) |
1860 | { | 1860 | { |
1861 | struct resource *rp = &op->resource[0]; | 1861 | struct resource *rp = &op->resource[0]; |
1862 | struct snd_card *card; | 1862 | struct snd_card *card; |
@@ -1931,7 +1931,7 @@ static unsigned int _ebus_dma_addr(struct cs4231_dma_control *dma_cont) | |||
1931 | 1931 | ||
1932 | static int snd_cs4231_ebus_free(struct snd_cs4231 *chip) | 1932 | static int snd_cs4231_ebus_free(struct snd_cs4231 *chip) |
1933 | { | 1933 | { |
1934 | struct of_device *op = chip->op; | 1934 | struct platform_device *op = chip->op; |
1935 | 1935 | ||
1936 | if (chip->c_dma.ebus_info.regs) { | 1936 | if (chip->c_dma.ebus_info.regs) { |
1937 | ebus_dma_unregister(&chip->c_dma.ebus_info); | 1937 | ebus_dma_unregister(&chip->c_dma.ebus_info); |
@@ -1960,7 +1960,7 @@ static struct snd_device_ops snd_cs4231_ebus_dev_ops = { | |||
1960 | }; | 1960 | }; |
1961 | 1961 | ||
1962 | static int __devinit snd_cs4231_ebus_create(struct snd_card *card, | 1962 | static int __devinit snd_cs4231_ebus_create(struct snd_card *card, |
1963 | struct of_device *op, | 1963 | struct platform_device *op, |
1964 | int dev) | 1964 | int dev) |
1965 | { | 1965 | { |
1966 | struct snd_cs4231 *chip = card->private_data; | 1966 | struct snd_cs4231 *chip = card->private_data; |
@@ -2048,7 +2048,7 @@ static int __devinit snd_cs4231_ebus_create(struct snd_card *card, | |||
2048 | return 0; | 2048 | return 0; |
2049 | } | 2049 | } |
2050 | 2050 | ||
2051 | static int __devinit cs4231_ebus_probe(struct of_device *op, const struct of_device_id *match) | 2051 | static int __devinit cs4231_ebus_probe(struct platform_device *op, const struct of_device_id *match) |
2052 | { | 2052 | { |
2053 | struct snd_card *card; | 2053 | struct snd_card *card; |
2054 | int err; | 2054 | int err; |
@@ -2072,7 +2072,7 @@ static int __devinit cs4231_ebus_probe(struct of_device *op, const struct of_dev | |||
2072 | } | 2072 | } |
2073 | #endif | 2073 | #endif |
2074 | 2074 | ||
2075 | static int __devinit cs4231_probe(struct of_device *op, const struct of_device_id *match) | 2075 | static int __devinit cs4231_probe(struct platform_device *op, const struct of_device_id *match) |
2076 | { | 2076 | { |
2077 | #ifdef EBUS_SUPPORT | 2077 | #ifdef EBUS_SUPPORT |
2078 | if (!strcmp(op->dev.of_node->parent->name, "ebus")) | 2078 | if (!strcmp(op->dev.of_node->parent->name, "ebus")) |
@@ -2086,7 +2086,7 @@ static int __devinit cs4231_probe(struct of_device *op, const struct of_device_i | |||
2086 | return -ENODEV; | 2086 | return -ENODEV; |
2087 | } | 2087 | } |
2088 | 2088 | ||
2089 | static int __devexit cs4231_remove(struct of_device *op) | 2089 | static int __devexit cs4231_remove(struct platform_device *op) |
2090 | { | 2090 | { |
2091 | struct snd_cs4231 *chip = dev_get_drvdata(&op->dev); | 2091 | struct snd_cs4231 *chip = dev_get_drvdata(&op->dev); |
2092 | 2092 | ||