Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9025f39c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: f_uac2: Fix sound card registration failure"

parents c4515b1a 3b2423e2
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -162,6 +162,8 @@ struct audio_dev {
	struct delayed_work p_work;
	struct delayed_work c_work;
	struct work_struct  disconnect_work;

	struct device *gdev;
};

static inline
@@ -545,7 +547,7 @@ static int snd_uac2_probe(struct platform_device *pdev)
	c_chmask = opts->c_chmask;

	/* Choose any slot, with no id */
	err = snd_card_new(&pdev->dev, -1, NULL, THIS_MODULE, 0, &card);
	err = snd_card_new(audio_dev->gdev, -1, NULL, THIS_MODULE, 0, &card);
	if (err < 0)
		return err;

@@ -1620,6 +1622,7 @@ afunc_bind(struct usb_configuration *cfg, struct usb_function *fn)
		goto err_free_descs;
	}

	agdev->gdev = &gadget->dev;
	ret = alsa_uac2_init(agdev);
	if (ret)
		goto err_free_descs;