433d940521213e3d624b1a578fb0e093ec888184
[openwrt/staging/neocturne.git] /
1 From 573c48f66b727c8418896e720ff98cd30c0f5aa0 Mon Sep 17 00:00:00 2001
2 From: Stefan Wahren <stefan.wahren@i2se.com>
3 Date: Sat, 20 Oct 2018 20:25:41 +0200
4 Subject: [PATCH 231/782] staging: vchiq_arm: Register a platform device for
5 the audio driver
6
7 Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
8 ---
9 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 4 ++++
10 1 file changed, 4 insertions(+)
11
12 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
13 +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
14 @@ -170,6 +170,7 @@ static struct class *vchiq_class;
15 static struct device *vchiq_dev;
16 static DEFINE_SPINLOCK(msg_queue_spinlock);
17 static struct platform_device *bcm2835_camera;
18 +static struct platform_device *bcm2835_audio;
19
20 static const char *const ioctl_names[] = {
21 "CONNECT",
22 @@ -3654,6 +3655,7 @@ static int vchiq_probe(struct platform_d
23 MAJOR(vchiq_devid), MINOR(vchiq_devid));
24
25 bcm2835_camera = vchiq_register_child(pdev, "bcm2835-camera");
26 + bcm2835_audio = vchiq_register_child(pdev, "bcm2835_audio");
27
28 return 0;
29
30 @@ -3670,6 +3672,8 @@ failed_platform_init:
31
32 static int vchiq_remove(struct platform_device *pdev)
33 {
34 + if (!IS_ERR(bcm2835_audio))
35 + platform_device_unregister(bcm2835_audio);
36 if (!IS_ERR(bcm2835_camera))
37 platform_device_unregister(bcm2835_camera);
38 vchiq_debugfs_deinit();