]> git.baikalelectronics.ru Git - kernel.git/commit
soc: fsl: dpio: keep a per dpio device MC portal
authorIoana Ciornei <ioana.ciornei@nxp.com>
Mon, 10 Dec 2018 16:50:17 +0000 (16:50 +0000)
committerLi Yang <leoyang.li@nxp.com>
Fri, 11 Jan 2019 21:06:54 +0000 (15:06 -0600)
commit8f3b7b42ead5fd96feb22a39b7b491ba29fc9bd0
tree5c374342b6def794d45331633dd30500ae146dac
parentc05583ff3ac0a326be561066ed705c3aa2929dd9
soc: fsl: dpio: keep a per dpio device MC portal

At the moment, the dpio-driver allocates an MC portal at probe time and
frees it right after usage. The same thing happens on the remove path.
This behavior could lead to scenarios where an MC portal is available
for use at probing but not longer free on the remove path which could
lead to unproper unbind of resources.

Change the driver's behavior in such a way that an MC portal is
allocated at probe and kept until the DPIO device is removed. This will
ensure that at any time after a DPIO device was successfully probed, all
its dependencies will be met.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
drivers/soc/fsl/dpio/dpio-driver.c