From 0ca486925a32b7c95752ff250afdd59bcf6c8574 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Sat, 20 Oct 2018 20:25:41 +0200 Subject: [PATCH 231/806] staging: vchiq_arm: Register a platform device for the audio driver Signed-off-by: Stefan Wahren --- 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();