aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/fsl-mc/include/mc-sys.h
diff options
context:
space:
mode:
authorJ. German Rivera <German.Rivera@freescale.com>2015-10-17 11:18:15 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-17 20:53:38 -0700
commitd2f8499153aa78b21881b3ca1fcdc026c3a79079 (patch)
tree0e93d6a8bb38e20655fef65642b49a50dc58ce38 /drivers/staging/fsl-mc/include/mc-sys.h
parentstaging: fsl-mc: fsl_mc_io object refactoring (diff)
downloadlinux-dev-d2f8499153aa78b21881b3ca1fcdc026c3a79079.tar.xz
linux-dev-d2f8499153aa78b21881b3ca1fcdc026c3a79079.zip
staging: fsl-mc: dpmcp opening/closing refactoring
Before, we were opening and closing a mc_io's dpmcp object in fsl_mc_portal_reset(), since that was the only function that was calling dpmcp MC operations. However, it is better for maintainability to open the dpmcp object when it gets associated with an mc_io object, and close it when this association is terminated. This way, we are free to call dpmcp operations on a mc_io's dpmcp object at any time, without having to check if the dpmcp object is opened or not. Consequently, the creation/teardown of the association between an mc_io object and a dpmcp is now encapsulated in two functions: fsl_mc_io_set_dpmcp()/fsl_mc_io_unset_dpmcp(). Besides, setting the corresponding pointers for the association, these functions open and close the dpmcp object respectively. Signed-off-by: J. German Rivera <German.Rivera@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fsl-mc/include/mc-sys.h')
-rw-r--r--drivers/staging/fsl-mc/include/mc-sys.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/staging/fsl-mc/include/mc-sys.h b/drivers/staging/fsl-mc/include/mc-sys.h
index bfbecafe75d9..d4fb60289df7 100644
--- a/drivers/staging/fsl-mc/include/mc-sys.h
+++ b/drivers/staging/fsl-mc/include/mc-sys.h
@@ -69,6 +69,11 @@ int __must_check fsl_create_mc_io(struct device *dev,
void fsl_destroy_mc_io(struct fsl_mc_io *mc_io);
+int fsl_mc_io_set_dpmcp(struct fsl_mc_io *mc_io,
+ struct fsl_mc_device *dpmcp_dev);
+
+void fsl_mc_io_unset_dpmcp(struct fsl_mc_io *mc_io);
+
int mc_send_command(struct fsl_mc_io *mc_io, struct mc_command *cmd);
#endif /* _FSL_MC_SYS_H */