]> rtime.felk.cvut.cz Git - vajnamar/linux-xlnx.git/commitdiff
can: xilinx: fix runtime power management code
authorMousumi Jana <mousumi.jana@xilinx.com>
Mon, 28 Aug 2017 08:25:09 +0000 (13:55 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 28 Aug 2017 09:11:03 +0000 (11:11 +0200)
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>
drivers/net/can/xilinx_can.c

index 24522c2ad85b1b01dd268fd7973e023ee3377561..d33513354aff5a2934e13f296cb58688e0664a41 100644 (file)
@@ -1563,6 +1563,7 @@ static int xcan_probe(struct platform_device *pdev)
 
        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;