static int hsw_stream_volume_put(struct snd_kcontrol *kcontrol,
                                struct snd_ctl_elem_value *ucontrol)
 {
-       struct snd_soc_platform *platform = snd_soc_kcontrol_platform(kcontrol);
+       struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
        struct soc_mixer_control *mc =
                (struct soc_mixer_control *)kcontrol->private_value;
        struct hsw_priv_data *pdata =
-               snd_soc_platform_get_drvdata(platform);
+               snd_soc_component_get_drvdata(component);
        struct hsw_pcm_data *pcm_data;
        struct sst_hsw *hsw = pdata->hsw;
        u32 volume;
 static int hsw_stream_volume_get(struct snd_kcontrol *kcontrol,
                                struct snd_ctl_elem_value *ucontrol)
 {
-       struct snd_soc_platform *platform = snd_soc_kcontrol_platform(kcontrol);
+       struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
        struct soc_mixer_control *mc =
                (struct soc_mixer_control *)kcontrol->private_value;
        struct hsw_priv_data *pdata =
-               snd_soc_platform_get_drvdata(platform);
+               snd_soc_component_get_drvdata(component);
        struct hsw_pcm_data *pcm_data;
        struct sst_hsw *hsw = pdata->hsw;
        u32 volume;
 static int hsw_volume_put(struct snd_kcontrol *kcontrol,
                                struct snd_ctl_elem_value *ucontrol)
 {
-       struct snd_soc_platform *platform = snd_soc_kcontrol_platform(kcontrol);
-       struct hsw_priv_data *pdata = snd_soc_platform_get_drvdata(platform);
+       struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
+       struct hsw_priv_data *pdata = snd_soc_component_get_drvdata(component);
        struct sst_hsw *hsw = pdata->hsw;
        u32 volume;
 
 static int hsw_volume_get(struct snd_kcontrol *kcontrol,
                                struct snd_ctl_elem_value *ucontrol)
 {
-       struct snd_soc_platform *platform = snd_soc_kcontrol_platform(kcontrol);
-       struct hsw_priv_data *pdata = snd_soc_platform_get_drvdata(platform);
+       struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
+       struct hsw_priv_data *pdata = snd_soc_component_get_drvdata(component);
        struct sst_hsw *hsw = pdata->hsw;
        unsigned int volume = 0;
 
 static int hsw_waves_switch_get(struct snd_kcontrol *kcontrol,
                                struct snd_ctl_elem_value *ucontrol)
 {
-       struct snd_soc_platform *platform = snd_soc_kcontrol_platform(kcontrol);
-       struct hsw_priv_data *pdata = snd_soc_platform_get_drvdata(platform);
+       struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
+       struct hsw_priv_data *pdata = snd_soc_component_get_drvdata(component);
        struct sst_hsw *hsw = pdata->hsw;
        enum sst_hsw_module_id id = SST_HSW_MODULE_WAVES;
 
 static int hsw_waves_switch_put(struct snd_kcontrol *kcontrol,
                                struct snd_ctl_elem_value *ucontrol)
 {
-       struct snd_soc_platform *platform = snd_soc_kcontrol_platform(kcontrol);
-       struct hsw_priv_data *pdata = snd_soc_platform_get_drvdata(platform);
+       struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
+       struct hsw_priv_data *pdata = snd_soc_component_get_drvdata(component);
        struct sst_hsw *hsw = pdata->hsw;
        int ret = 0;
        enum sst_hsw_module_id id = SST_HSW_MODULE_WAVES;
 static int hsw_waves_param_get(struct snd_kcontrol *kcontrol,
                                struct snd_ctl_elem_value *ucontrol)
 {
-       struct snd_soc_platform *platform = snd_soc_kcontrol_platform(kcontrol);
-       struct hsw_priv_data *pdata = snd_soc_platform_get_drvdata(platform);
+       struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
+       struct hsw_priv_data *pdata = snd_soc_component_get_drvdata(component);
        struct sst_hsw *hsw = pdata->hsw;
 
        /* return a matching line from param buffer */
 static int hsw_waves_param_put(struct snd_kcontrol *kcontrol,
                                struct snd_ctl_elem_value *ucontrol)
 {
-       struct snd_soc_platform *platform = snd_soc_kcontrol_platform(kcontrol);
-       struct hsw_priv_data *pdata = snd_soc_platform_get_drvdata(platform);
+       struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
+       struct hsw_priv_data *pdata = snd_soc_component_get_drvdata(component);
        struct sst_hsw *hsw = pdata->hsw;
        int ret;
        enum sst_hsw_module_id id = SST_HSW_MODULE_WAVES;
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_pcm_runtime *runtime = substream->runtime;
-       struct hsw_priv_data *pdata =
-               snd_soc_platform_get_drvdata(rtd->platform);
+       struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
+       struct hsw_priv_data *pdata = snd_soc_component_get_drvdata(component);
        struct hsw_pcm_data *pcm_data;
        struct sst_hsw *hsw = pdata->hsw;
        struct sst_module *module_data;
 static int hsw_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
-       struct hsw_priv_data *pdata =
-               snd_soc_platform_get_drvdata(rtd->platform);
+       struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
+       struct hsw_priv_data *pdata = snd_soc_component_get_drvdata(component);
        struct hsw_pcm_data *pcm_data;
        struct sst_hsw_stream *sst_stream;
        struct sst_hsw *hsw = pdata->hsw;
        struct snd_pcm_substream *substream = pcm_data->substream;
        struct snd_pcm_runtime *runtime = substream->runtime;
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
-       struct hsw_priv_data *pdata =
-               snd_soc_platform_get_drvdata(rtd->platform);
+       struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
+       struct hsw_priv_data *pdata = snd_soc_component_get_drvdata(component);
        struct sst_hsw *hsw = pdata->hsw;
        u32 pos;
        snd_pcm_uframes_t position = bytes_to_frames(runtime,
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_pcm_runtime *runtime = substream->runtime;
-       struct hsw_priv_data *pdata =
-               snd_soc_platform_get_drvdata(rtd->platform);
+       struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
+       struct hsw_priv_data *pdata = snd_soc_component_get_drvdata(component);
        struct hsw_pcm_data *pcm_data;
        struct sst_hsw *hsw = pdata->hsw;
        snd_pcm_uframes_t offset;
 static int hsw_pcm_open(struct snd_pcm_substream *substream)
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
-       struct hsw_priv_data *pdata =
-               snd_soc_platform_get_drvdata(rtd->platform);
+       struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
+       struct hsw_priv_data *pdata = snd_soc_component_get_drvdata(component);
        struct hsw_pcm_data *pcm_data;
        struct sst_hsw *hsw = pdata->hsw;
        int dai;
 static int hsw_pcm_close(struct snd_pcm_substream *substream)
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
-       struct hsw_priv_data *pdata =
-               snd_soc_platform_get_drvdata(rtd->platform);
+       struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
+       struct hsw_priv_data *pdata = snd_soc_component_get_drvdata(component);
        struct hsw_pcm_data *pcm_data;
        struct sst_hsw *hsw = pdata->hsw;
        int ret, dai;
 static int hsw_pcm_new(struct snd_soc_pcm_runtime *rtd)
 {
        struct snd_pcm *pcm = rtd->pcm;
-       struct snd_soc_platform *platform = rtd->platform;
-       struct sst_pdata *pdata = dev_get_platdata(platform->dev);
-       struct hsw_priv_data *priv_data = dev_get_drvdata(platform->dev);
+       struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
+       struct sst_pdata *pdata = dev_get_platdata(component->dev);
+       struct hsw_priv_data *priv_data = dev_get_drvdata(component->dev);
        struct device *dev = pdata->dma_dev;
        int ret = 0;
 
        {"Analog Capture", NULL, "SSP0 CODEC IN"},
 };
 
-static int hsw_pcm_probe(struct snd_soc_platform *platform)
+static int hsw_pcm_probe(struct snd_soc_component *component)
 {
-       struct hsw_priv_data *priv_data = snd_soc_platform_get_drvdata(platform);
-       struct sst_pdata *pdata = dev_get_platdata(platform->dev);
+       struct hsw_priv_data *priv_data = snd_soc_component_get_drvdata(component);
+       struct sst_pdata *pdata = dev_get_platdata(component->dev);
        struct device *dma_dev, *dev;
        int i, ret = 0;
 
        if (!pdata)
                return -ENODEV;
 
-       dev = platform->dev;
+       dev = component->dev;
        dma_dev = pdata->dma_dev;
 
        priv_data->hsw = pdata->dsp;
-       priv_data->dev = platform->dev;
+       priv_data->dev = dev;
        priv_data->pm_state = HSW_PM_STATE_D0;
-       priv_data->soc_card = platform->component.card;
+       priv_data->soc_card = component->card;
 
        /* allocate DSP buffer page tables */
        for (i = 0; i < ARRAY_SIZE(hsw_dais); i++) {
                goto err;
 
        /* enable runtime PM with auto suspend */
-       pm_runtime_set_autosuspend_delay(platform->dev,
-               SST_RUNTIME_SUSPEND_DELAY);
-       pm_runtime_use_autosuspend(platform->dev);
-       pm_runtime_enable(platform->dev);
-       pm_runtime_idle(platform->dev);
+       pm_runtime_set_autosuspend_delay(dev, SST_RUNTIME_SUSPEND_DELAY);
+       pm_runtime_use_autosuspend(dev);
+       pm_runtime_enable(dev);
+       pm_runtime_idle(dev);
 
        return 0;
 
        return ret;
 }
 
-static int hsw_pcm_remove(struct snd_soc_platform *platform)
+static void hsw_pcm_remove(struct snd_soc_component *component)
 {
        struct hsw_priv_data *priv_data =
-               snd_soc_platform_get_drvdata(platform);
+               snd_soc_component_get_drvdata(component);
        int i;
 
-       pm_runtime_disable(platform->dev);
+       pm_runtime_disable(component->dev);
        hsw_pcm_free_modules(priv_data);
 
        for (i = 0; i < ARRAY_SIZE(hsw_dais); i++) {
                if (hsw_dais[i].capture.channels_min)
                        snd_dma_free_pages(&priv_data->dmab[i][1]);
        }
-
-       return 0;
 }
 
-static const struct snd_soc_platform_driver hsw_soc_platform = {
+static const struct snd_soc_component_driver hsw_dai_component = {
+       .name           = DRV_NAME,
        .probe          = hsw_pcm_probe,
        .remove         = hsw_pcm_remove,
        .ops            = &hsw_pcm_ops,
        .pcm_new        = hsw_pcm_new,
-};
-
-static const struct snd_soc_component_driver hsw_dai_component = {
-       .name = "haswell-dai",
-       .controls = hsw_volume_controls,
-       .num_controls = ARRAY_SIZE(hsw_volume_controls),
-       .dapm_widgets = widgets,
+       .controls       = hsw_volume_controls,
+       .num_controls   = ARRAY_SIZE(hsw_volume_controls),
+       .dapm_widgets   = widgets,
        .num_dapm_widgets = ARRAY_SIZE(widgets),
-       .dapm_routes = graph,
+       .dapm_routes    = graph,
        .num_dapm_routes = ARRAY_SIZE(graph),
 };
 
        priv_data->hsw = sst_pdata->dsp;
        platform_set_drvdata(pdev, priv_data);
 
-       ret = snd_soc_register_platform(&pdev->dev, &hsw_soc_platform);
-       if (ret < 0)
-               goto err_plat;
-
-       ret = snd_soc_register_component(&pdev->dev, &hsw_dai_component,
+       ret = devm_snd_soc_register_component(&pdev->dev, &hsw_dai_component,
                hsw_dais, ARRAY_SIZE(hsw_dais));
        if (ret < 0)
-               goto err_comp;
+               goto err_plat;
 
        return 0;
 
-err_comp:
-       snd_soc_unregister_platform(&pdev->dev);
 err_plat:
        sst_hsw_dsp_free(&pdev->dev, sst_pdata);
        return 0;
 {
        struct sst_pdata *sst_pdata = dev_get_platdata(&pdev->dev);
 
-       snd_soc_unregister_platform(&pdev->dev);
-       snd_soc_unregister_component(&pdev->dev);
        sst_hsw_dsp_free(&pdev->dev, sst_pdata);
 
        return 0;