diff -urN linux-2.6.22.5-orig/sound/soc/s3c24xx/neo1973_wm8753.c linux-2.6.22.5/sound/soc/s3c24xx/neo1973_wm8753.c
|
old
|
new
|
|
| 615 | 615 | return i2c_probe(adap, &addr_data, lm4857_amp_probe); |
| 616 | 616 | } |
| 617 | 617 | |
| | 618 | static u8 lm4857_state; |
| | 619 | |
| | 620 | static int lm4857_suspend(struct device * dev, pm_message_t state) |
| | 621 | { |
| | 622 | //printk("Suspend Called"); |
| | 623 | if (lm4857_state = (lm4857_regs[LM4857_CTRL] & 0xF)) { |
| | 624 | lm4857_regs[LM4857_CTRL] &= 0xf0; |
| | 625 | lm4857_write_regs(); |
| | 626 | } |
| | 627 | return 0; |
| | 628 | } |
| | 629 | |
| | 630 | static int lm4857_resume(struct device * dev) |
| | 631 | { |
| | 632 | //printk("Resume Called"); |
| | 633 | if (lm4857_state) { |
| | 634 | lm4857_regs[LM4857_CTRL] |= (lm4857_state & 0x0f); |
| | 635 | lm4857_write_regs(); |
| | 636 | } |
| | 637 | return 0; |
| | 638 | } |
| | 639 | |
| | 640 | static void lm4857_shutdown(struct device * dev) |
| | 641 | { |
| | 642 | lm4857_regs[LM4857_CTRL] &= 0xf0; |
| | 643 | lm4857_write_regs(); |
| | 644 | } |
| | 645 | |
| 618 | 646 | /* corgi i2c codec control layer */ |
| 619 | 647 | static struct i2c_driver lm4857_i2c_driver = { |
| 620 | 648 | .driver = { |
| 621 | 649 | .name = "LM4857 I2C Amp", |
| 622 | 650 | .owner = THIS_MODULE, |
| | 651 | .suspend = lm4857_suspend, |
| | 652 | .resume = lm4857_resume, |
| | 653 | .shutdown = lm4857_shutdown, |
| 623 | 654 | }, |
| 624 | 655 | .id = I2C_DRIVERID_LM4857, |
| 625 | 656 | .attach_adapter = lm4857_i2c_attach, |