aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/layerscape/patches-4.4/7196-staging-fsl-mc-make-fsl_mc_get_root_dprc-public.patch
blob: d465f90c33686c7f92a259e7b6c9f506a6ce94ec (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
39
40
41
42
43
44
45
From 12b1317fb3ab5b56efd833fa3b22965adf1d2c96 Mon Sep 17 00:00:00 2001
From: Stuart Yoder <stuart.yoder@nxp.com>
Date: Fri, 15 Apr 2016 17:07:16 -0500
Subject: [PATCH 196/226] staging: fsl-mc: make fsl_mc_get_root_dprc public

this is needed by other components (e.g. vfio) to find
the root dprc

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
---
 drivers/staging/fsl-mc/bus/mc-bus.c |    3 ++-
 drivers/staging/fsl-mc/include/mc.h |    3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

--- a/drivers/staging/fsl-mc/bus/mc-bus.c
+++ b/drivers/staging/fsl-mc/bus/mc-bus.c
@@ -358,7 +358,7 @@ EXPORT_SYMBOL_GPL(fsl_mc_bus_exists);
 /**
 * fsl_mc_get_root_dprc - function to traverse to the root dprc
 */
-static void fsl_mc_get_root_dprc(struct device *dev,
+void fsl_mc_get_root_dprc(struct device *dev,
 				 struct device **root_dprc_dev)
 {
 	if (WARN_ON(!dev)) {
@@ -371,6 +371,7 @@ static void fsl_mc_get_root_dprc(struct
 			*root_dprc_dev = (*root_dprc_dev)->parent;
 	}
 }
+EXPORT_SYMBOL_GPL(fsl_mc_get_root_dprc);
 
 static int get_dprc_attr(struct fsl_mc_io *mc_io,
 			 int container_id, struct dprc_attributes *attr)
--- a/drivers/staging/fsl-mc/include/mc.h
+++ b/drivers/staging/fsl-mc/include/mc.h
@@ -191,6 +191,9 @@ void fsl_mc_driver_unregister(struct fsl
 
 bool fsl_mc_bus_exists(void);
 
+void fsl_mc_get_root_dprc(struct device *dev,
+                                 struct device **root_dprc_dev);
+
 int __must_check fsl_mc_portal_allocate(struct fsl_mc_device *mc_dev,
 					u16 mc_io_flags,
 					struct fsl_mc_io **new_mc_io);