| .. | .. |
|---|
| 86 | 86 | |
|---|
| 87 | 87 | printf("Rockchip watchdog timeout: %lld sec\n", timeout / 1000); |
|---|
| 88 | 88 | |
|---|
| 89 | | - reset_deassert(&priv->rst); |
|---|
| 89 | + if (priv->rst.dev) |
|---|
| 90 | + reset_deassert(&priv->rst); |
|---|
| 90 | 91 | |
|---|
| 91 | 92 | rockchip_wdt_reset(dev); |
|---|
| 92 | 93 | rockchip_wdt_settimeout(timeout, priv); |
|---|
| .. | .. |
|---|
| 100 | 101 | { |
|---|
| 101 | 102 | struct rockchip_wdt_priv *priv = dev_get_priv(dev); |
|---|
| 102 | 103 | |
|---|
| 103 | | - reset_assert(&priv->rst); |
|---|
| 104 | | - reset_deassert(&priv->rst); |
|---|
| 104 | + if (priv->rst.dev) { |
|---|
| 105 | + reset_assert(&priv->rst); |
|---|
| 106 | + reset_deassert(&priv->rst); |
|---|
| 107 | + } |
|---|
| 105 | 108 | |
|---|
| 106 | 109 | printf("Rockchip watchdog stop\n"); |
|---|
| 107 | 110 | |
|---|
| .. | .. |
|---|
| 133 | 136 | ret = reset_get_by_name(dev, "reset", &priv->rst); |
|---|
| 134 | 137 | if (ret) { |
|---|
| 135 | 138 | pr_err("reset_get_by_name(reset) failed: %d\n", ret); |
|---|
| 136 | | - return ret; |
|---|
| 139 | + priv->rst.dev = NULL; |
|---|
| 137 | 140 | } |
|---|
| 138 | 141 | |
|---|
| 139 | 142 | ret = clk_get_by_index(dev, 0, &priv->clk); |
|---|