Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754060AbaDEAYM (ORCPT ); Fri, 4 Apr 2014 20:24:12 -0400 Received: from mail-qg0-f50.google.com ([209.85.192.50]:65296 "EHLO mail-qg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752898AbaDEAYI (ORCPT ); Fri, 4 Apr 2014 20:24:08 -0400 From: Soren Brinkmann To: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Randy Dunlap , Russell King , Michal Simek , Greg Kroah-Hartman , Jiri Slaby , Grant Likely Cc: Peter Crosthwaite , One Thousand Gnomes , Soren Brinkmann , devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org Subject: [RESEND PATCH v3 4/9] tty: xuartps: Print warning in clock notifier Date: Fri, 4 Apr 2014 17:23:40 -0700 Message-Id: <1396657425-31029-4-git-send-email-soren.brinkmann@xilinx.com> X-Mailer: git-send-email 1.9.1.1.gbb9f595 In-Reply-To: <1396657425-31029-1-git-send-email-soren.brinkmann@xilinx.com> References: <1396657425-31029-1-git-send-email-soren.brinkmann@xilinx.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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 Tested-by: Michal Simek --- Changes in v3: None Changes in v2: None 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 787a12064fa0..814391038abb 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.1.1.gbb9f595 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/