Loading sound/soc/stm/stm32_adfsdm.c +18 −3 Original line number Original line Diff line number Diff line Loading @@ -305,6 +305,7 @@ MODULE_DEVICE_TABLE(of, stm32_adfsdm_of_match); static int stm32_adfsdm_probe(struct platform_device *pdev) static int stm32_adfsdm_probe(struct platform_device *pdev) { { struct stm32_adfsdm_priv *priv; struct stm32_adfsdm_priv *priv; struct snd_soc_component *component; int ret; int ret; priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); Loading Loading @@ -332,9 +333,15 @@ static int stm32_adfsdm_probe(struct platform_device *pdev) if (IS_ERR(priv->iio_cb)) if (IS_ERR(priv->iio_cb)) return PTR_ERR(priv->iio_cb); return PTR_ERR(priv->iio_cb); ret = devm_snd_soc_register_component(&pdev->dev, component = devm_kzalloc(&pdev->dev, sizeof(*component), GFP_KERNEL); &stm32_adfsdm_soc_platform, if (!component) NULL, 0); return -ENOMEM; #ifdef CONFIG_DEBUG_FS component->debugfs_prefix = "pcm"; #endif ret = snd_soc_add_component(&pdev->dev, component, &stm32_adfsdm_soc_platform, NULL, 0); if (ret < 0) if (ret < 0) dev_err(&pdev->dev, "%s: Failed to register PCM platform\n", dev_err(&pdev->dev, "%s: Failed to register PCM platform\n", __func__); __func__); Loading @@ -342,12 +349,20 @@ static int stm32_adfsdm_probe(struct platform_device *pdev) return ret; return ret; } } static int stm32_adfsdm_remove(struct platform_device *pdev) { snd_soc_unregister_component(&pdev->dev); return 0; } static struct platform_driver stm32_adfsdm_driver = { static struct platform_driver stm32_adfsdm_driver = { .driver = { .driver = { .name = STM32_ADFSDM_DRV_NAME, .name = STM32_ADFSDM_DRV_NAME, .of_match_table = stm32_adfsdm_of_match, .of_match_table = stm32_adfsdm_of_match, }, }, .probe = stm32_adfsdm_probe, .probe = stm32_adfsdm_probe, .remove = stm32_adfsdm_remove, }; }; module_platform_driver(stm32_adfsdm_driver); module_platform_driver(stm32_adfsdm_driver); Loading Loading
sound/soc/stm/stm32_adfsdm.c +18 −3 Original line number Original line Diff line number Diff line Loading @@ -305,6 +305,7 @@ MODULE_DEVICE_TABLE(of, stm32_adfsdm_of_match); static int stm32_adfsdm_probe(struct platform_device *pdev) static int stm32_adfsdm_probe(struct platform_device *pdev) { { struct stm32_adfsdm_priv *priv; struct stm32_adfsdm_priv *priv; struct snd_soc_component *component; int ret; int ret; priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); Loading Loading @@ -332,9 +333,15 @@ static int stm32_adfsdm_probe(struct platform_device *pdev) if (IS_ERR(priv->iio_cb)) if (IS_ERR(priv->iio_cb)) return PTR_ERR(priv->iio_cb); return PTR_ERR(priv->iio_cb); ret = devm_snd_soc_register_component(&pdev->dev, component = devm_kzalloc(&pdev->dev, sizeof(*component), GFP_KERNEL); &stm32_adfsdm_soc_platform, if (!component) NULL, 0); return -ENOMEM; #ifdef CONFIG_DEBUG_FS component->debugfs_prefix = "pcm"; #endif ret = snd_soc_add_component(&pdev->dev, component, &stm32_adfsdm_soc_platform, NULL, 0); if (ret < 0) if (ret < 0) dev_err(&pdev->dev, "%s: Failed to register PCM platform\n", dev_err(&pdev->dev, "%s: Failed to register PCM platform\n", __func__); __func__); Loading @@ -342,12 +349,20 @@ static int stm32_adfsdm_probe(struct platform_device *pdev) return ret; return ret; } } static int stm32_adfsdm_remove(struct platform_device *pdev) { snd_soc_unregister_component(&pdev->dev); return 0; } static struct platform_driver stm32_adfsdm_driver = { static struct platform_driver stm32_adfsdm_driver = { .driver = { .driver = { .name = STM32_ADFSDM_DRV_NAME, .name = STM32_ADFSDM_DRV_NAME, .of_match_table = stm32_adfsdm_of_match, .of_match_table = stm32_adfsdm_of_match, }, }, .probe = stm32_adfsdm_probe, .probe = stm32_adfsdm_probe, .remove = stm32_adfsdm_remove, }; }; module_platform_driver(stm32_adfsdm_driver); module_platform_driver(stm32_adfsdm_driver); Loading