diff options
Diffstat (limited to 'sound/soc/codecs/wm8753.c')
-rw-r--r-- | sound/soc/codecs/wm8753.c | 49 |
1 files changed, 2 insertions, 47 deletions
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index 5ad677ce80da..d6850dacda29 100644 --- a/sound/soc/codecs/wm8753.c +++ b/sound/soc/codecs/wm8753.c | |||
@@ -673,7 +673,6 @@ static int wm8753_add_widgets(struct snd_soc_codec *codec) | |||
673 | 673 | ||
674 | snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); | 674 | snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); |
675 | 675 | ||
676 | snd_soc_dapm_new_widgets(codec); | ||
677 | return 0; | 676 | return 0; |
678 | } | 677 | } |
679 | 678 | ||
@@ -724,8 +723,8 @@ static void pll_factors(struct _pll_div *pll_div, unsigned int target, | |||
724 | pll_div->k = K; | 723 | pll_div->k = K; |
725 | } | 724 | } |
726 | 725 | ||
727 | static int wm8753_set_dai_pll(struct snd_soc_dai *codec_dai, | 726 | static int wm8753_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id, |
728 | int pll_id, unsigned int freq_in, unsigned int freq_out) | 727 | int source, unsigned int freq_in, unsigned int freq_out) |
729 | { | 728 | { |
730 | u16 reg, enable; | 729 | u16 reg, enable; |
731 | int offset; | 730 | int offset; |
@@ -1583,18 +1582,9 @@ static int wm8753_probe(struct platform_device *pdev) | |||
1583 | snd_soc_add_controls(codec, wm8753_snd_controls, | 1582 | snd_soc_add_controls(codec, wm8753_snd_controls, |
1584 | ARRAY_SIZE(wm8753_snd_controls)); | 1583 | ARRAY_SIZE(wm8753_snd_controls)); |
1585 | wm8753_add_widgets(codec); | 1584 | wm8753_add_widgets(codec); |
1586 | ret = snd_soc_init_card(socdev); | ||
1587 | if (ret < 0) { | ||
1588 | printk(KERN_ERR "wm8753: failed to register card\n"); | ||
1589 | goto card_err; | ||
1590 | } | ||
1591 | 1585 | ||
1592 | return 0; | 1586 | return 0; |
1593 | 1587 | ||
1594 | card_err: | ||
1595 | snd_soc_free_pcms(socdev); | ||
1596 | snd_soc_dapm_free(socdev); | ||
1597 | |||
1598 | pcm_err: | 1588 | pcm_err: |
1599 | return ret; | 1589 | return ret; |
1600 | } | 1590 | } |
@@ -1767,21 +1757,6 @@ static int wm8753_i2c_remove(struct i2c_client *client) | |||
1767 | return 0; | 1757 | return 0; |
1768 | } | 1758 | } |
1769 | 1759 | ||
1770 | #ifdef CONFIG_PM | ||
1771 | static int wm8753_i2c_suspend(struct i2c_client *client, pm_message_t msg) | ||
1772 | { | ||
1773 | return snd_soc_suspend_device(&client->dev); | ||
1774 | } | ||
1775 | |||
1776 | static int wm8753_i2c_resume(struct i2c_client *client) | ||
1777 | { | ||
1778 | return snd_soc_resume_device(&client->dev); | ||
1779 | } | ||
1780 | #else | ||
1781 | #define wm8753_i2c_suspend NULL | ||
1782 | #define wm8753_i2c_resume NULL | ||
1783 | #endif | ||
1784 | |||
1785 | static const struct i2c_device_id wm8753_i2c_id[] = { | 1760 | static const struct i2c_device_id wm8753_i2c_id[] = { |
1786 | { "wm8753", 0 }, | 1761 | { "wm8753", 0 }, |
1787 | { } | 1762 | { } |
@@ -1795,8 +1770,6 @@ static struct i2c_driver wm8753_i2c_driver = { | |||
1795 | }, | 1770 | }, |
1796 | .probe = wm8753_i2c_probe, | 1771 | .probe = wm8753_i2c_probe, |
1797 | .remove = wm8753_i2c_remove, | 1772 | .remove = wm8753_i2c_remove, |
1798 | .suspend = wm8753_i2c_suspend, | ||
1799 | .resume = wm8753_i2c_resume, | ||
1800 | .id_table = wm8753_i2c_id, | 1773 | .id_table = wm8753_i2c_id, |
1801 | }; | 1774 | }; |
1802 | #endif | 1775 | #endif |
@@ -1852,22 +1825,6 @@ static int __devexit wm8753_spi_remove(struct spi_device *spi) | |||
1852 | return 0; | 1825 | return 0; |
1853 | } | 1826 | } |
1854 | 1827 | ||
1855 | #ifdef CONFIG_PM | ||
1856 | static int wm8753_spi_suspend(struct spi_device *spi, pm_message_t msg) | ||
1857 | { | ||
1858 | return snd_soc_suspend_device(&spi->dev); | ||
1859 | } | ||
1860 | |||
1861 | static int wm8753_spi_resume(struct spi_device *spi) | ||
1862 | { | ||
1863 | return snd_soc_resume_device(&spi->dev); | ||
1864 | } | ||
1865 | |||
1866 | #else | ||
1867 | #define wm8753_spi_suspend NULL | ||
1868 | #define wm8753_spi_resume NULL | ||
1869 | #endif | ||
1870 | |||
1871 | static struct spi_driver wm8753_spi_driver = { | 1828 | static struct spi_driver wm8753_spi_driver = { |
1872 | .driver = { | 1829 | .driver = { |
1873 | .name = "wm8753", | 1830 | .name = "wm8753", |
@@ -1876,8 +1833,6 @@ static struct spi_driver wm8753_spi_driver = { | |||
1876 | }, | 1833 | }, |
1877 | .probe = wm8753_spi_probe, | 1834 | .probe = wm8753_spi_probe, |
1878 | .remove = __devexit_p(wm8753_spi_remove), | 1835 | .remove = __devexit_p(wm8753_spi_remove), |
1879 | .suspend = wm8753_spi_suspend, | ||
1880 | .resume = wm8753_spi_resume, | ||
1881 | }; | 1836 | }; |
1882 | #endif | 1837 | #endif |
1883 | 1838 | ||