Skip to content

Commit

Permalink
cdx: disable cdx bus from bus shutdown callback
Browse files Browse the repository at this point in the history
disable cdx bus when bus shutdown is called.

Signed-off-by: Abhijit Gangurde <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
abhijitG-xlnx authored and gregkh committed Jan 10, 2025
1 parent 235b630 commit 6d2478a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/cdx/cdx.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,10 @@ static void cdx_shutdown(struct device *dev)
{
struct cdx_driver *cdx_drv = to_cdx_driver(dev->driver);
struct cdx_device *cdx_dev = to_cdx_device(dev);
struct cdx_controller *cdx = cdx_dev->cdx;

if (cdx_dev->is_bus && cdx_dev->enabled && cdx->ops->bus_disable)
cdx->ops->bus_disable(cdx, cdx_dev->bus_num);
if (cdx_drv && cdx_drv->shutdown)
cdx_drv->shutdown(cdx_dev);
}
Expand Down

0 comments on commit 6d2478a

Please sign in to comment.