EXPORT_SYMBOL_GPL(snd_soc_dapm_mixer_update_power);
 
 static ssize_t dapm_widget_show_component(struct snd_soc_component *cmpnt,
-       char *buf)
+                                         char *buf, int count)
 {
        struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(cmpnt);
        struct snd_soc_dapm_widget *w;
-       int count = 0;
        char *state = "not set";
 
        /* card won't be set for the dummy component, as a spot fix
                case snd_soc_dapm_pinctrl:
                case snd_soc_dapm_clock_supply:
                        if (w->name)
-                               count += sprintf(buf + count, "%s: %s\n",
+                               count += sysfs_emit_at(buf, count, "%s: %s\n",
                                        w->name, w->power ? "On":"Off");
                break;
                default:
                state = "Off";
                break;
        }
-       count += sprintf(buf + count, "PM State: %s\n", state);
+       count += sysfs_emit_at(buf, count, "PM State: %s\n", state);
 
        return count;
 }
        for_each_rtd_codec_dais(rtd, i, codec_dai) {
                struct snd_soc_component *cmpnt = codec_dai->component;
 
-               count += dapm_widget_show_component(cmpnt, buf + count);
+               count = dapm_widget_show_component(cmpnt, buf, count);
        }
 
        mutex_unlock(&rtd->card->dapm_mutex);