pr_debug("%s @ %d:DEBUG PLUG/UNPLUG : HAD_DRV_DISCONNECTED\n",
__func__, __LINE__);
+ intelhaddata->dev = &devptr->dev;
intelhaddata->card = card;
intelhaddata->card_id = hdmi_card_id;
intelhaddata->card_index = card->number;
if (retval)
goto err;
- retval = snd_card_register(card);
- if (retval)
- goto err;
-
/* IEC958 controls */
retval = snd_ctl_add(card, snd_ctl_new1(&had_control_iec958_mask,
intelhaddata));
if (retval < 0)
goto err;
- intelhaddata->dev = &devptr->dev;
+ retval = snd_card_register(card);
+ if (retval)
+ goto err;
+
pm_runtime_set_active(intelhaddata->dev);
pm_runtime_enable(intelhaddata->dev);