staging: fsl-mc: dpmcp opening/closing refactoring
authorJ. German Rivera <German.Rivera@freescale.com>
Sat, 17 Oct 2015 16:18:15 +0000 (11:18 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 Oct 2015 03:53:38 +0000 (20:53 -0700)
commitd2f8499153aa78b21881b3ca1fcdc026c3a79079
tree0e93d6a8bb38e20655fef65642b49a50dc58ce38
parentffcd52ef0907f56181a28f4ae5ab6f0b39e3cf58
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>
drivers/staging/fsl-mc/bus/mc-allocator.c
drivers/staging/fsl-mc/bus/mc-sys.c
drivers/staging/fsl-mc/include/mc-sys.h
This page took 0.02751 seconds and 5 git commands to generate.