Skip to content

Commit

Permalink
tty: xuartps: Print warning in clock notifier
Browse files Browse the repository at this point in the history
Print a warning if the clock notifier rejects a clock frequency change
to facilitate debugging (see:
http://thread.gmane.org/gmane.linux.ports.arm.kernel/304329/focus=304379)

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Soren Brinkmann authored and Greg Kroah-Hartman committed Apr 24, 2014
1 parent e555a21 commit 5ce15d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/tty/serial/xilinx_uartps.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,10 @@ static int xuartps_clk_notifier_cb(struct notifier_block *nb,
* frequency.
*/
if (!xuartps_calc_baud_divs(ndata->new_rate, xuartps->baud,
&bdiv, &cd, &div8))
&bdiv, &cd, &div8)) {
dev_warn(port->dev, "clock rate change rejected\n");
return NOTIFY_BAD;
}

spin_lock_irqsave(&xuartps->port->lock, flags);

Expand Down

0 comments on commit 5ce15d2

Please sign in to comment.