From 4f8b350be0b90554c93908458a27be34e8b722ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 19 Sep 2019 16:43:19 +0200 Subject: brcm2708: update to latest patches from RPi foundation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Álvaro Fernández Rojas --- ...2835-codec-Pass-driver-context-to-create-.patch | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 target/linux/brcm2708/patches-4.19/950-0785-staging-bcm2835-codec-Pass-driver-context-to-create-.patch (limited to 'target/linux/brcm2708/patches-4.19/950-0785-staging-bcm2835-codec-Pass-driver-context-to-create-.patch') diff --git a/target/linux/brcm2708/patches-4.19/950-0785-staging-bcm2835-codec-Pass-driver-context-to-create-.patch b/target/linux/brcm2708/patches-4.19/950-0785-staging-bcm2835-codec-Pass-driver-context-to-create-.patch new file mode 100644 index 0000000000..514d1cc731 --- /dev/null +++ b/target/linux/brcm2708/patches-4.19/950-0785-staging-bcm2835-codec-Pass-driver-context-to-create-.patch @@ -0,0 +1,61 @@ +From 9243f7de67345adfcac52198f78bd12cfebb6867 Mon Sep 17 00:00:00 2001 +From: Kieran Bingham +Date: Wed, 20 Mar 2019 11:35:26 +0000 +Subject: [PATCH 785/806] staging: bcm2835-codec: Pass driver context to create + entities + +Pass the bcm2835_codec_driver driver context directly into the +bcm2835_codec_create() so that it can be used to store driver global +state. Pass the struct platform_device *pdev by adding it to the driver +global state. + +Signed-off-by: Kieran Bingham +--- + .../bcm2835-codec/bcm2835-v4l2-codec.c | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +--- a/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c ++++ b/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c +@@ -457,6 +457,8 @@ struct bcm2835_codec_ctx { + }; + + struct bcm2835_codec_driver { ++ struct platform_device *pdev; ++ + struct bcm2835_codec_dev *encode; + struct bcm2835_codec_dev *decode; + struct bcm2835_codec_dev *isp; +@@ -2587,10 +2589,11 @@ destroy_component: + return ret; + } + +-static int bcm2835_codec_create(struct platform_device *pdev, ++static int bcm2835_codec_create(struct bcm2835_codec_driver *drv, + struct bcm2835_codec_dev **new_dev, + enum bcm2835_codec_role role) + { ++ struct platform_device *pdev = drv->pdev; + struct bcm2835_codec_dev *dev; + struct video_device *vfd; + int video_nr; +@@ -2711,15 +2714,17 @@ static int bcm2835_codec_probe(struct pl + if (!drv) + return -ENOMEM; + +- ret = bcm2835_codec_create(pdev, &drv->decode, DECODE); ++ drv->pdev = pdev; ++ ++ ret = bcm2835_codec_create(drv, &drv->decode, DECODE); + if (ret) + goto out; + +- ret = bcm2835_codec_create(pdev, &drv->encode, ENCODE); ++ ret = bcm2835_codec_create(drv, &drv->encode, ENCODE); + if (ret) + goto out; + +- ret = bcm2835_codec_create(pdev, &drv->isp, ISP); ++ ret = bcm2835_codec_create(drv, &drv->isp, ISP); + if (ret) + goto out; + -- cgit v1.2.3