wm8737.c (bf61c8840efe60fd8f91446860b63338fb424158) | wm8737.c (1037d567fdfc7ab9d3e2328e27bdc1300d3fdb1e) |
---|---|
1/* 2 * wm8737.c -- WM8737 ALSA SoC Audio driver 3 * 4 * Copyright 2010 Wolfson Microelectronics plc 5 * 6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> 7 * 8 * This program is free software; you can redistribute it and/or modify --- 630 unchanged lines hidden (view full) --- 639 640 .reg_defaults = wm8737_reg_defaults, 641 .num_reg_defaults = ARRAY_SIZE(wm8737_reg_defaults), 642 .cache_type = REGCACHE_RBTREE, 643 644 .volatile_reg = wm8737_volatile, 645}; 646 | 1/* 2 * wm8737.c -- WM8737 ALSA SoC Audio driver 3 * 4 * Copyright 2010 Wolfson Microelectronics plc 5 * 6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com> 7 * 8 * This program is free software; you can redistribute it and/or modify --- 630 unchanged lines hidden (view full) --- 639 640 .reg_defaults = wm8737_reg_defaults, 641 .num_reg_defaults = ARRAY_SIZE(wm8737_reg_defaults), 642 .cache_type = REGCACHE_RBTREE, 643 644 .volatile_reg = wm8737_volatile, 645}; 646 |
647#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) | 647#if IS_ENABLED(CONFIG_I2C) |
648static int wm8737_i2c_probe(struct i2c_client *i2c, 649 const struct i2c_device_id *id) 650{ 651 struct wm8737_priv *wm8737; 652 int ret, i; 653 654 wm8737 = devm_kzalloc(&i2c->dev, sizeof(struct wm8737_priv), 655 GFP_KERNEL); --- 97 unchanged lines hidden (view full) --- 753 .probe = wm8737_spi_probe, 754 .remove = wm8737_spi_remove, 755}; 756#endif /* CONFIG_SPI_MASTER */ 757 758static int __init wm8737_modinit(void) 759{ 760 int ret; | 648static int wm8737_i2c_probe(struct i2c_client *i2c, 649 const struct i2c_device_id *id) 650{ 651 struct wm8737_priv *wm8737; 652 int ret, i; 653 654 wm8737 = devm_kzalloc(&i2c->dev, sizeof(struct wm8737_priv), 655 GFP_KERNEL); --- 97 unchanged lines hidden (view full) --- 753 .probe = wm8737_spi_probe, 754 .remove = wm8737_spi_remove, 755}; 756#endif /* CONFIG_SPI_MASTER */ 757 758static int __init wm8737_modinit(void) 759{ 760 int ret; |
761#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) | 761#if IS_ENABLED(CONFIG_I2C) |
762 ret = i2c_add_driver(&wm8737_i2c_driver); 763 if (ret != 0) { 764 printk(KERN_ERR "Failed to register WM8737 I2C driver: %d\n", 765 ret); 766 } 767#endif 768#if defined(CONFIG_SPI_MASTER) 769 ret = spi_register_driver(&wm8737_spi_driver); --- 6 unchanged lines hidden (view full) --- 776} 777module_init(wm8737_modinit); 778 779static void __exit wm8737_exit(void) 780{ 781#if defined(CONFIG_SPI_MASTER) 782 spi_unregister_driver(&wm8737_spi_driver); 783#endif | 762 ret = i2c_add_driver(&wm8737_i2c_driver); 763 if (ret != 0) { 764 printk(KERN_ERR "Failed to register WM8737 I2C driver: %d\n", 765 ret); 766 } 767#endif 768#if defined(CONFIG_SPI_MASTER) 769 ret = spi_register_driver(&wm8737_spi_driver); --- 6 unchanged lines hidden (view full) --- 776} 777module_init(wm8737_modinit); 778 779static void __exit wm8737_exit(void) 780{ 781#if defined(CONFIG_SPI_MASTER) 782 spi_unregister_driver(&wm8737_spi_driver); 783#endif |
784#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) | 784#if IS_ENABLED(CONFIG_I2C) |
785 i2c_del_driver(&wm8737_i2c_driver); 786#endif 787} 788module_exit(wm8737_exit); 789 790MODULE_DESCRIPTION("ASoC WM8737 driver"); 791MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); 792MODULE_LICENSE("GPL"); | 785 i2c_del_driver(&wm8737_i2c_driver); 786#endif 787} 788module_exit(wm8737_exit); 789 790MODULE_DESCRIPTION("ASoC WM8737 driver"); 791MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>"); 792MODULE_LICENSE("GPL"); |