~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to sound/soc/codecs/wm2000.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
836
836
}
837
837
 
838
838
#ifdef CONFIG_PM
839
 
static int wm2000_i2c_suspend(struct i2c_client *i2c, pm_message_t mesg)
 
839
static int wm2000_i2c_suspend(struct device *dev)
840
840
{
 
841
        struct i2c_client *i2c = to_i2c_client(dev);
841
842
        struct wm2000_priv *wm2000 = dev_get_drvdata(&i2c->dev);
842
843
 
843
844
        return wm2000_anc_transition(wm2000, ANC_OFF);
844
845
}
845
846
 
846
 
static int wm2000_i2c_resume(struct i2c_client *i2c)
 
847
static int wm2000_i2c_resume(struct device *dev)
847
848
{
 
849
        struct i2c_client *i2c = to_i2c_client(dev);
848
850
        struct wm2000_priv *wm2000 = dev_get_drvdata(&i2c->dev);
849
851
 
850
852
        return wm2000_anc_set_mode(wm2000);
851
853
}
852
 
#else
853
 
#define wm2000_i2c_suspend NULL
854
 
#define wm2000_i2c_resume NULL
855
854
#endif
856
855
 
 
856
static SIMPLE_DEV_PM_OPS(wm2000_pm, wm2000_i2c_suspend, wm2000_i2c_resume);
 
857
 
857
858
static const struct i2c_device_id wm2000_i2c_id[] = {
858
859
        { "wm2000", 0 },
859
860
        { }
864
865
        .driver = {
865
866
                .name = "wm2000",
866
867
                .owner = THIS_MODULE,
 
868
                .pm = &wm2000_pm,
867
869
        },
868
870
        .probe = wm2000_i2c_probe,
869
871
        .remove = __devexit_p(wm2000_i2c_remove),
870
 
        .suspend = wm2000_i2c_suspend,
871
 
        .resume = wm2000_i2c_resume,
872
872
        .shutdown = wm2000_i2c_shutdown,
873
873
        .id_table = wm2000_i2c_id,
874
874
};