diff options
author | Umang Jain <[email protected]> | 2023-09-23 20:01:58 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2023-10-05 10:04:45 +0200 |
commit | 162bd0dda990e25a9d55412a8b6db245a2cf77f6 (patch) | |
tree | 401e7b859a8b99fa55f7ab99e9b4a41e98b90dd5 | |
parent | 027e5703de6bfa1887443ed335118658e6fb41aa (diff) |
staging: vc04_services: vchiq_arm: Register vchiq_bus_type
Register the vchiq_bus_type bus with the vchiq interface.
The bcm2835-camera and bcm2835_audio will be registered to this bus type
going ahead.
Signed-off-by: Umang Jain <[email protected]>
Reviewed-by: Kieran Bingham <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index aa2313f3bcab..9388859b9b56 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -12,6 +12,7 @@ #include <linux/cdev.h> #include <linux/fs.h> #include <linux/device.h> +#include <linux/device/bus.h> #include <linux/mm.h> #include <linux/highmem.h> #include <linux/pagemap.h> @@ -33,6 +34,7 @@ #include "vchiq_core.h" #include "vchiq_ioctl.h" #include "vchiq_arm.h" +#include "vchiq_bus.h" #include "vchiq_debugfs.h" #include "vchiq_connected.h" #include "vchiq_pagelist.h" @@ -1870,9 +1872,17 @@ static int __init vchiq_driver_init(void) { int ret; + ret = bus_register(&vchiq_bus_type); + if (ret) { + pr_err("Failed to register %s\n", vchiq_bus_type.name); + return ret; + } + ret = platform_driver_register(&vchiq_driver); - if (ret) + if (ret) { pr_err("Failed to register vchiq driver\n"); + bus_unregister(&vchiq_bus_type); + } return ret; } @@ -1880,6 +1890,7 @@ module_init(vchiq_driver_init); static void __exit vchiq_driver_exit(void) { + bus_unregister(&vchiq_bus_type); platform_driver_unregister(&vchiq_driver); } module_exit(vchiq_driver_exit); |