This patch adds the fix for runtime power management.
Without this the device usage counter decremented and device
is going to suspend state.This patch resumes the device and
prevents it from being suspended again.
Signed-off-by: Mousumi Jana <mousumij@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
pm_runtime_set_active(&pdev->dev);
pm_runtime_enable(&pdev->dev);
+ pm_runtime_get_sync(&pdev->dev);
if (priv->read_reg(priv, XCAN_SR_OFFSET) != XCAN_SR_CONFIG_MASK) {
priv->write_reg = xcan_write_reg_be;