blob: 30bea2f204182b676c07a2f05b4b80974a40a099 (
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 1f7a4bfbb20d1775eac5b7db7545c0ab35b7642d 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 231/703] 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();
|