aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.19/950-0211-staging-vchiq_arm-Register-a-platform-device-for-the.patch
blob: 793fc21396268de070a0bb88a36124d3bd81d5cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From 0ca486925a32b7c95752ff250afdd59bcf6c8574 Mon Sep 17 00:00:00 2001
From: Stefan Wahren <stefan.wahren@i2se.com>
Date: Sat, 20 Oct 2018 20:25:41 +0200
Subject: [PATCH] staging: vchiq_arm: Register a platform device for
 the audio driver

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -170,6 +170,7 @@ static struct class  *vchiq_class;
 static struct device *vchiq_dev;
 static DEFINE_SPINLOCK(msg_queue_spinlock);
 static struct platform_device *bcm2835_camera;
+static struct platform_device *bcm2835_audio;
 
 static const char *const ioctl_names[] = {
 	"CONNECT",
@@ -3654,6 +3655,7 @@ static int vchiq_probe(struct platform_d
 		MAJOR(vchiq_devid), MINOR(vchiq_devid));
 
 	bcm2835_camera = vchiq_register_child(pdev, "bcm2835-camera");
+	bcm2835_audio = vchiq_register_child(pdev, "bcm2835_audio");
 
 	return 0;
 
@@ -3670,6 +3672,8 @@ failed_platform_init:
 
 static int vchiq_remove(struct platform_device *pdev)
 {
+	if (!IS_ERR(bcm2835_audio))
+		platform_device_unregister(bcm2835_audio);
 	if (!IS_ERR(bcm2835_camera))
 		platform_device_unregister(bcm2835_camera);
 	vchiq_debugfs_deinit();