[alsa-devel] [PATCH 15/19] ASoC: wm8731: Convert to module_i2c/spi_driver()
kbuild test robot
lkp at intel.com
Tue Nov 15 19:07:00 CET 2016
Hi Kuninori,
[auto build test WARNING on v4.9-rc5]
[cannot apply to asoc/for-next next-20161115]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Kuninori-Morimoto/ASoC-Convert-to-module_i2c-spi_driver/20161116-005820
config: i386-randconfig-x008-201646 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
In file included from sound/soc/codecs/wm8731.c:16:0:
include/linux/module.h:130:27: error: redefinition of '__inittest'
static inline initcall_t __inittest(void) \
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8731.c:810:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8731_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:130:27: note: previous definition of '__inittest' was here
static inline initcall_t __inittest(void) \
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8731.c:731:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8731_spi_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:132:6: error: redefinition of 'init_module'
int init_module(void) __attribute__((alias(#initfn)));
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8731.c:810:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8731_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:132:6: note: previous definition of 'init_module' was here
int init_module(void) __attribute__((alias(#initfn)));
^
include/linux/device.h:1353:1: note: in expansion of macro 'module_init'
module_init(__driver##_init); \
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8731.c:731:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8731_spi_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:136:27: error: redefinition of '__exittest'
static inline exitcall_t __exittest(void) \
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8731.c:810:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8731_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:136:27: note: previous definition of '__exittest' was here
static inline exitcall_t __exittest(void) \
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8731.c:731:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8731_spi_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:138:7: error: redefinition of 'cleanup_module'
void cleanup_module(void) __attribute__((alias(#exitfn)));
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/i2c.h:751:2: note: in expansion of macro 'module_driver'
module_driver(__i2c_driver, i2c_add_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8731.c:810:1: note: in expansion of macro 'module_i2c_driver'
module_i2c_driver(wm8731_i2c_driver);
^~~~~~~~~~~~~~~~~
include/linux/module.h:138:7: note: previous definition of 'cleanup_module' was here
void cleanup_module(void) __attribute__((alias(#exitfn)));
^
include/linux/device.h:1358:1: note: in expansion of macro 'module_exit'
module_exit(__driver##_exit);
^~~~~~~~~~~
include/linux/spi/spi.h:290:2: note: in expansion of macro 'module_driver'
module_driver(__spi_driver, spi_register_driver, \
^~~~~~~~~~~~~
>> sound/soc/codecs/wm8731.c:731:1: note: in expansion of macro 'module_spi_driver'
module_spi_driver(wm8731_spi_driver);
^~~~~~~~~~~~~~~~~
vim +/module_i2c_driver +810 sound/soc/codecs/wm8731.c
725 .name = "wm8731",
726 .of_match_table = wm8731_of_match,
727 },
728 .probe = wm8731_spi_probe,
729 .remove = wm8731_spi_remove,
730 };
> 731 module_spi_driver(wm8731_spi_driver);
732 #endif /* CONFIG_SPI_MASTER */
733
734 #if IS_ENABLED(CONFIG_I2C)
735 static int wm8731_i2c_probe(struct i2c_client *i2c,
736 const struct i2c_device_id *id)
737 {
738 struct wm8731_priv *wm8731;
739 int ret;
740
741 wm8731 = devm_kzalloc(&i2c->dev, sizeof(struct wm8731_priv),
742 GFP_KERNEL);
743 if (wm8731 == NULL)
744 return -ENOMEM;
745
746 wm8731->mclk = devm_clk_get(&i2c->dev, "mclk");
747 if (IS_ERR(wm8731->mclk)) {
748 ret = PTR_ERR(wm8731->mclk);
749 if (ret == -ENOENT) {
750 wm8731->mclk = NULL;
751 dev_warn(&i2c->dev, "Assuming static MCLK\n");
752 } else {
753 dev_err(&i2c->dev, "Failed to get MCLK: %d\n",
754 ret);
755 return ret;
756 }
757 }
758
759 mutex_init(&wm8731->lock);
760
761 i2c_set_clientdata(i2c, wm8731);
762
763 ret = wm8731_request_supplies(&i2c->dev, wm8731);
764 if (ret != 0)
765 return ret;
766
767 wm8731->regmap = devm_regmap_init_i2c(i2c, &wm8731_regmap);
768 if (IS_ERR(wm8731->regmap)) {
769 ret = PTR_ERR(wm8731->regmap);
770 dev_err(&i2c->dev, "Failed to allocate register map: %d\n",
771 ret);
772 return ret;
773 }
774
775 ret = wm8731_hw_init(&i2c->dev, wm8731);
776 if (ret != 0)
777 return ret;
778
779 ret = snd_soc_register_codec(&i2c->dev,
780 &soc_codec_dev_wm8731, &wm8731_dai, 1);
781 if (ret != 0) {
782 dev_err(&i2c->dev, "Failed to register CODEC: %d\n", ret);
783 return ret;
784 }
785
786 return 0;
787 }
788
789 static int wm8731_i2c_remove(struct i2c_client *client)
790 {
791 snd_soc_unregister_codec(&client->dev);
792 return 0;
793 }
794
795 static const struct i2c_device_id wm8731_i2c_id[] = {
796 { "wm8731", 0 },
797 { }
798 };
799 MODULE_DEVICE_TABLE(i2c, wm8731_i2c_id);
800
801 static struct i2c_driver wm8731_i2c_driver = {
802 .driver = {
803 .name = "wm8731",
804 .of_match_table = wm8731_of_match,
805 },
806 .probe = wm8731_i2c_probe,
807 .remove = wm8731_i2c_remove,
808 .id_table = wm8731_i2c_id,
809 };
> 810 module_i2c_driver(wm8731_i2c_driver);
811 #endif
812
813 MODULE_DESCRIPTION("ASoC WM8731 driver");
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 29570 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20161116/7dddbe7a/attachment-0001.bin>
More information about the Alsa-devel
mailing list