Skip to content

Commit

Permalink
ASoC: Remove snd_soc_suspend_device()
Browse files Browse the repository at this point in the history
The PM core will grow pm_link infrastructure in 2.6.33 which can be
used to implement the intended functionality of the ASoC-specific
device suspend and resume callbacks so drop them.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Oct 15, 2009
1 parent ed9d040 commit d2058b0
Show file tree
Hide file tree
Showing 18 changed files with 0 additions and 388 deletions.
5 changes: 0 additions & 5 deletions include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,6 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
int addr_bits, int data_bits,
enum snd_soc_control_type control);

#ifdef CONFIG_PM
int snd_soc_suspend_device(struct device *dev);
int snd_soc_resume_device(struct device *dev);
#endif

/* pcm <-> DAI connect */
void snd_soc_free_pcms(struct snd_soc_device *socdev);
int snd_soc_new_pcms(struct snd_soc_device *socdev, int idx, const char *xid);
Expand Down
20 changes: 0 additions & 20 deletions sound/soc/codecs/cs4270.c
Original file line number Diff line number Diff line change
Expand Up @@ -802,22 +802,6 @@ MODULE_DEVICE_TABLE(i2c, cs4270_id);
* and all registers are written back to the hardware when resuming.
*/

static int cs4270_i2c_suspend(struct i2c_client *client, pm_message_t mesg)
{
struct cs4270_private *cs4270 = i2c_get_clientdata(client);
struct snd_soc_codec *codec = &cs4270->codec;

return snd_soc_suspend_device(codec->dev);
}

static int cs4270_i2c_resume(struct i2c_client *client)
{
struct cs4270_private *cs4270 = i2c_get_clientdata(client);
struct snd_soc_codec *codec = &cs4270->codec;

return snd_soc_resume_device(codec->dev);
}

static int cs4270_soc_suspend(struct platform_device *pdev, pm_message_t mesg)
{
struct snd_soc_codec *codec = cs4270_codec;
Expand Down Expand Up @@ -853,8 +837,6 @@ static int cs4270_soc_resume(struct platform_device *pdev)
return snd_soc_write(codec, CS4270_PWRCTL, reg);
}
#else
#define cs4270_i2c_suspend NULL
#define cs4270_i2c_resume NULL
#define cs4270_soc_suspend NULL
#define cs4270_soc_resume NULL
#endif /* CONFIG_PM */
Expand All @@ -873,8 +855,6 @@ static struct i2c_driver cs4270_i2c_driver = {
.id_table = cs4270_id,
.probe = cs4270_i2c_probe,
.remove = cs4270_i2c_remove,
.suspend = cs4270_i2c_suspend,
.resume = cs4270_i2c_resume,
};

/*
Expand Down
17 changes: 0 additions & 17 deletions sound/soc/codecs/wm8350.c
Original file line number Diff line number Diff line change
Expand Up @@ -1680,30 +1680,13 @@ static int __devexit wm8350_codec_remove(struct platform_device *pdev)
return 0;
}

#ifdef CONFIG_PM
static int wm8350_codec_suspend(struct platform_device *pdev, pm_message_t m)
{
return snd_soc_suspend_device(&pdev->dev);
}

static int wm8350_codec_resume(struct platform_device *pdev)
{
return snd_soc_resume_device(&pdev->dev);
}
#else
#define wm8350_codec_suspend NULL
#define wm8350_codec_resume NULL
#endif

static struct platform_driver wm8350_codec_driver = {
.driver = {
.name = "wm8350-codec",
.owner = THIS_MODULE,
},
.probe = wm8350_codec_probe,
.remove = __devexit_p(wm8350_codec_remove),
.suspend = wm8350_codec_suspend,
.resume = wm8350_codec_resume,
};

static __init int wm8350_init(void)
Expand Down
17 changes: 0 additions & 17 deletions sound/soc/codecs/wm8400.c
Original file line number Diff line number Diff line change
Expand Up @@ -1559,30 +1559,13 @@ static int __exit wm8400_codec_remove(struct platform_device *dev)
return 0;
}

#ifdef CONFIG_PM
static int wm8400_pdev_suspend(struct platform_device *pdev, pm_message_t msg)
{
return snd_soc_suspend_device(&pdev->dev);
}

static int wm8400_pdev_resume(struct platform_device *pdev)
{
return snd_soc_resume_device(&pdev->dev);
}
#else
#define wm8400_pdev_suspend NULL
#define wm8400_pdev_resume NULL
#endif

static struct platform_driver wm8400_codec_driver = {
.driver = {
.name = "wm8400-codec",
.owner = THIS_MODULE,
},
.probe = wm8400_codec_probe,
.remove = __exit_p(wm8400_codec_remove),
.suspend = wm8400_pdev_suspend,
.resume = wm8400_pdev_resume,
};

static int __init wm8400_codec_init(void)
Expand Down
17 changes: 0 additions & 17 deletions sound/soc/codecs/wm8523.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,21 +638,6 @@ static __devexit int wm8523_i2c_remove(struct i2c_client *client)
return 0;
}

#ifdef CONFIG_PM
static int wm8523_i2c_suspend(struct i2c_client *i2c, pm_message_t msg)
{
return snd_soc_suspend_device(&i2c->dev);
}

static int wm8523_i2c_resume(struct i2c_client *i2c)
{
return snd_soc_resume_device(&i2c->dev);
}
#else
#define wm8523_i2c_suspend NULL
#define wm8523_i2c_resume NULL
#endif

static const struct i2c_device_id wm8523_i2c_id[] = {
{ "wm8523", 0 },
{ }
Expand All @@ -666,8 +651,6 @@ static struct i2c_driver wm8523_i2c_driver = {
},
.probe = wm8523_i2c_probe,
.remove = __devexit_p(wm8523_i2c_remove),
.suspend = wm8523_i2c_suspend,
.resume = wm8523_i2c_resume,
.id_table = wm8523_i2c_id,
};
#endif
Expand Down
17 changes: 0 additions & 17 deletions sound/soc/codecs/wm8580.c
Original file line number Diff line number Diff line change
Expand Up @@ -961,21 +961,6 @@ static int wm8580_i2c_remove(struct i2c_client *client)
return 0;
}

#ifdef CONFIG_PM
static int wm8580_i2c_suspend(struct i2c_client *client, pm_message_t msg)
{
return snd_soc_suspend_device(&client->dev);
}

static int wm8580_i2c_resume(struct i2c_client *client)
{
return snd_soc_resume_device(&client->dev);
}
#else
#define wm8580_i2c_suspend NULL
#define wm8580_i2c_resume NULL
#endif

static const struct i2c_device_id wm8580_i2c_id[] = {
{ "wm8580", 0 },
{ }
Expand All @@ -989,8 +974,6 @@ static struct i2c_driver wm8580_i2c_driver = {
},
.probe = wm8580_i2c_probe,
.remove = wm8580_i2c_remove,
.suspend = wm8580_i2c_suspend,
.resume = wm8580_i2c_resume,
.id_table = wm8580_i2c_id,
};
#endif
Expand Down
17 changes: 0 additions & 17 deletions sound/soc/codecs/wm8711.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,30 +548,13 @@ static int __devexit wm8711_spi_remove(struct spi_device *spi)
return 0;
}

#ifdef CONFIG_PM
static int wm8711_spi_suspend(struct spi_device *spi, pm_message_t msg)
{
return snd_soc_suspend_device(&spi->dev);
}

static int wm8711_spi_resume(struct spi_device *spi)
{
return snd_soc_resume_device(&spi->dev);
}
#else
#define wm8711_spi_suspend NULL
#define wm8711_spi_resume NULL
#endif

static struct spi_driver wm8711_spi_driver = {
.driver = {
.name = "wm8711",
.bus = &spi_bus_type,
.owner = THIS_MODULE,
},
.probe = wm8711_spi_probe,
.suspend = wm8711_spi_suspend,
.resume = wm8711_spi_resume,
.remove = __devexit_p(wm8711_spi_remove),
};
#endif /* CONFIG_SPI_MASTER */
Expand Down
34 changes: 0 additions & 34 deletions sound/soc/codecs/wm8731.c
Original file line number Diff line number Diff line change
Expand Up @@ -623,30 +623,13 @@ static int __devexit wm8731_spi_remove(struct spi_device *spi)
return 0;
}

#ifdef CONFIG_PM
static int wm8731_spi_suspend(struct spi_device *spi, pm_message_t msg)
{
return snd_soc_suspend_device(&spi->dev);
}

static int wm8731_spi_resume(struct spi_device *spi)
{
return snd_soc_resume_device(&spi->dev);
}
#else
#define wm8731_spi_suspend NULL
#define wm8731_spi_resume NULL
#endif

static struct spi_driver wm8731_spi_driver = {
.driver = {
.name = "wm8731",
.bus = &spi_bus_type,
.owner = THIS_MODULE,
},
.probe = wm8731_spi_probe,
.suspend = wm8731_spi_suspend,
.resume = wm8731_spi_resume,
.remove = __devexit_p(wm8731_spi_remove),
};
#endif /* CONFIG_SPI_MASTER */
Expand Down Expand Up @@ -679,21 +662,6 @@ static __devexit int wm8731_i2c_remove(struct i2c_client *client)
return 0;
}

#ifdef CONFIG_PM
static int wm8731_i2c_suspend(struct i2c_client *i2c, pm_message_t msg)
{
return snd_soc_suspend_device(&i2c->dev);
}

static int wm8731_i2c_resume(struct i2c_client *i2c)
{
return snd_soc_resume_device(&i2c->dev);
}
#else
#define wm8731_i2c_suspend NULL
#define wm8731_i2c_resume NULL
#endif

static const struct i2c_device_id wm8731_i2c_id[] = {
{ "wm8731", 0 },
{ }
Expand All @@ -707,8 +675,6 @@ static struct i2c_driver wm8731_i2c_driver = {
},
.probe = wm8731_i2c_probe,
.remove = __devexit_p(wm8731_i2c_remove),
.suspend = wm8731_i2c_suspend,
.resume = wm8731_i2c_resume,
.id_table = wm8731_i2c_id,
};
#endif
Expand Down
35 changes: 0 additions & 35 deletions sound/soc/codecs/wm8753.c
Original file line number Diff line number Diff line change
Expand Up @@ -1767,21 +1767,6 @@ static int wm8753_i2c_remove(struct i2c_client *client)
return 0;
}

#ifdef CONFIG_PM
static int wm8753_i2c_suspend(struct i2c_client *client, pm_message_t msg)
{
return snd_soc_suspend_device(&client->dev);
}

static int wm8753_i2c_resume(struct i2c_client *client)
{
return snd_soc_resume_device(&client->dev);
}
#else
#define wm8753_i2c_suspend NULL
#define wm8753_i2c_resume NULL
#endif

static const struct i2c_device_id wm8753_i2c_id[] = {
{ "wm8753", 0 },
{ }
Expand All @@ -1795,8 +1780,6 @@ static struct i2c_driver wm8753_i2c_driver = {
},
.probe = wm8753_i2c_probe,
.remove = wm8753_i2c_remove,
.suspend = wm8753_i2c_suspend,
.resume = wm8753_i2c_resume,
.id_table = wm8753_i2c_id,
};
#endif
Expand Down Expand Up @@ -1852,22 +1835,6 @@ static int __devexit wm8753_spi_remove(struct spi_device *spi)
return 0;
}

#ifdef CONFIG_PM
static int wm8753_spi_suspend(struct spi_device *spi, pm_message_t msg)
{
return snd_soc_suspend_device(&spi->dev);
}

static int wm8753_spi_resume(struct spi_device *spi)
{
return snd_soc_resume_device(&spi->dev);
}

#else
#define wm8753_spi_suspend NULL
#define wm8753_spi_resume NULL
#endif

static struct spi_driver wm8753_spi_driver = {
.driver = {
.name = "wm8753",
Expand All @@ -1876,8 +1843,6 @@ static struct spi_driver wm8753_spi_driver = {
},
.probe = wm8753_spi_probe,
.remove = __devexit_p(wm8753_spi_remove),
.suspend = wm8753_spi_suspend,
.resume = wm8753_spi_resume,
};
#endif

Expand Down
34 changes: 0 additions & 34 deletions sound/soc/codecs/wm8776.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,30 +616,13 @@ static int __devexit wm8776_spi_remove(struct spi_device *spi)
return 0;
}

#ifdef CONFIG_PM
static int wm8776_spi_suspend(struct spi_device *spi, pm_message_t msg)
{
return snd_soc_suspend_device(&spi->dev);
}

static int wm8776_spi_resume(struct spi_device *spi)
{
return snd_soc_resume_device(&spi->dev);
}
#else
#define wm8776_spi_suspend NULL
#define wm8776_spi_resume NULL
#endif

static struct spi_driver wm8776_spi_driver = {
.driver = {
.name = "wm8776",
.bus = &spi_bus_type,
.owner = THIS_MODULE,
},
.probe = wm8776_spi_probe,
.suspend = wm8776_spi_suspend,
.resume = wm8776_spi_resume,
.remove = __devexit_p(wm8776_spi_remove),
};
#endif /* CONFIG_SPI_MASTER */
Expand Down Expand Up @@ -673,21 +656,6 @@ static __devexit int wm8776_i2c_remove(struct i2c_client *client)
return 0;
}

#ifdef CONFIG_PM
static int wm8776_i2c_suspend(struct i2c_client *i2c, pm_message_t msg)
{
return snd_soc_suspend_device(&i2c->dev);
}

static int wm8776_i2c_resume(struct i2c_client *i2c)
{
return snd_soc_resume_device(&i2c->dev);
}
#else
#define wm8776_i2c_suspend NULL
#define wm8776_i2c_resume NULL
#endif

static const struct i2c_device_id wm8776_i2c_id[] = {
{ "wm8776", 0 },
{ }
Expand All @@ -701,8 +669,6 @@ static struct i2c_driver wm8776_i2c_driver = {
},
.probe = wm8776_i2c_probe,
.remove = __devexit_p(wm8776_i2c_remove),
.suspend = wm8776_i2c_suspend,
.resume = wm8776_i2c_resume,
.id_table = wm8776_i2c_id,
};
#endif
Expand Down
Loading

0 comments on commit d2058b0

Please sign in to comment.