diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-10-30 06:12:50 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-10-30 06:12:50 +0100 |
commit | fe0f59c41255d339f4f059be62c350c3c48a3f95 (patch) | |
tree | fde2381bf94a14ea1553f88f9e9e37b45ed280dc /drivers/tty/serial/mxs-auart.c | |
parent | cpufreq: intel_pstate: Always set max P-state in performance mode (diff) | |
parent | Documentation: intel_pstate: PID tuning is not always available (diff) | |
download | linux-fe0f59c41255d339f4f059be62c350c3c48a3f95.tar.xz linux-fe0f59c41255d339f4f059be62c350c3c48a3f95.zip |
Merge back earlier cpufreq material for v4.10.
Diffstat (limited to 'drivers/tty/serial/mxs-auart.c')
-rw-r--r-- | drivers/tty/serial/mxs-auart.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c index eb54e5c77ead..770454e0dfa3 100644 --- a/drivers/tty/serial/mxs-auart.c +++ b/drivers/tty/serial/mxs-auart.c @@ -1317,7 +1317,7 @@ static void mxs_auart_break_ctl(struct uart_port *u, int ctl) mxs_clr(AUART_LINECTRL_BRK, s, REG_LINECTRL); } -static struct uart_ops mxs_auart_ops = { +static const struct uart_ops mxs_auart_ops = { .tx_empty = mxs_auart_tx_empty, .start_tx = mxs_auart_start_tx, .stop_tx = mxs_auart_stop_tx, @@ -1510,10 +1510,7 @@ static int mxs_get_clks(struct mxs_auart_port *s, if (!is_asm9260_auart(s)) { s->clk = devm_clk_get(&pdev->dev, NULL); - if (IS_ERR(s->clk)) - return PTR_ERR(s->clk); - - return 0; + return PTR_ERR_OR_ZERO(s->clk); } s->clk = devm_clk_get(s->dev, "mod"); @@ -1537,16 +1534,20 @@ static int mxs_get_clks(struct mxs_auart_port *s, err = clk_set_rate(s->clk, clk_get_rate(s->clk_ahb)); if (err) { dev_err(s->dev, "Failed to set rate!\n"); - return err; + goto disable_clk_ahb; } err = clk_prepare_enable(s->clk); if (err) { dev_err(s->dev, "Failed to enable clk!\n"); - return err; + goto disable_clk_ahb; } return 0; + +disable_clk_ahb: + clk_disable_unprepare(s->clk_ahb); + return err; } /* |