X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=recipes-kernel%2Fmost%2Ffiles%2F0002-most-pass-parent-devcie-to-snd_card_new.patch;fp=recipes-kernel%2Fmost%2Ffiles%2F0002-most-pass-parent-devcie-to-snd_card_new.patch;h=2e341dd948f7ebb3051f36a22c2c0d70fc83ef42;hb=e3253ac2cbc5fb9df6fcc6df6b0de1db34490abf;hp=0000000000000000000000000000000000000000;hpb=c3b43f6db27847fec4588e709d6d16f24065655c;p=AGL%2Fmeta-agl-demo.git diff --git a/recipes-kernel/most/files/0002-most-pass-parent-devcie-to-snd_card_new.patch b/recipes-kernel/most/files/0002-most-pass-parent-devcie-to-snd_card_new.patch new file mode 100644 index 000000000..2e341dd94 --- /dev/null +++ b/recipes-kernel/most/files/0002-most-pass-parent-devcie-to-snd_card_new.patch @@ -0,0 +1,52 @@ +From c4a379b4d3058b153832991ba1a1d697cad06600 Mon Sep 17 00:00:00 2001 +From: Christian Gromm +Date: Fri, 1 Sep 2017 13:53:32 +0200 +Subject: [PATCH 2/5] most: pass parent devcie to snd_card_new + +Signed-off-by: Christian Gromm +--- + driver/aim-sound/sound.c | 2 +- + driver/hdm-usb/hdm_usb.c | 1 + + driver/include/mostcore.h | 1 + + 3 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/aim-sound/sound.c b/aim-sound/sound.c +index e4198e5..a2ccc79 100644 +--- a/aim-sound/sound.c ++++ b/aim-sound/sound.c +@@ -595,7 +595,7 @@ static int audio_probe_channel(struct most_interface *iface, int channel_id, + return ret; + } + +- ret = snd_card_new(NULL, -1, card_name, THIS_MODULE, ++ ret = snd_card_new(iface->dev, -1, card_name, THIS_MODULE, + sizeof(*channel), &card); + if (ret < 0) + return ret; +diff --git a/hdm-usb/hdm_usb.c b/hdm-usb/hdm_usb.c +index 0b689b5..0937496 100644 +--- a/hdm-usb/hdm_usb.c ++++ b/hdm-usb/hdm_usb.c +@@ -1160,6 +1160,7 @@ hdm_probe(struct usb_interface *interface, const struct usb_device_id *id) + mdev->iface.dma_free = hdm_dma_free; + mdev->iface.description = mdev->description; + mdev->iface.num_channels = num_endpoints; ++ mdev->iface.dev = &interface->dev; + + snprintf(mdev->description, sizeof(mdev->description), + "usb_device %d-%s:%d.%d", +diff --git a/include/mostcore.h b/include/mostcore.h +index deefe25..d3523a9 100644 +--- a/include/mostcore.h ++++ b/include/mostcore.h +@@ -237,6 +237,7 @@ struct mbo { + */ + struct most_interface { + struct module *mod; ++ struct device *dev; + enum most_interface_type interface; + const char *description; + int num_channels; +-- +2.7.4 +