From mboxrd@z Thu Jan 1 00:00:00 1970 From: Soren Brinkmann Subject: [PATCH v2 2/7] tty: xuartps: Print warning in clock notifier Date: Mon, 10 Mar 2014 14:40:05 -0700 Message-ID: <1394487610-2419-3-git-send-email-soren.brinkmann@xilinx.com> References: <1394487610-2419-1-git-send-email-soren.brinkmann@xilinx.com> Return-path: In-Reply-To: <1394487610-2419-1-git-send-email-soren.brinkmann@xilinx.com> Sender: linux-kernel-owner@vger.kernel.org To: Russell King , Greg Kroah-Hartman , Jiri Slaby , One Thousand Gnomes Cc: Michal Simek , Peter Crosthwaite , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Rob Landley , Grant Likely , devicetree@vger.kernel.org, linux-doc@vger.kernel.org, Soren Brinkmann List-Id: devicetree@vger.kernel.org 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 --- drivers/tty/serial/xilinx_uartps.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 1c6e1a68ae95..b00060052316 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -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); -- 1.9.0.1.g4196000