From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shubhrajyoti Datta Subject: [PATCHv2 6/9] i2c: xiic: Add a debug msg in case of timeout Date: Wed, 17 Jun 2015 20:48:16 +0530 Message-ID: <1434554299-23443-7-git-send-email-shubhraj@xilinx.com> References: <1434554299-23443-1-git-send-email-shubhraj@xilinx.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <1434554299-23443-1-git-send-email-shubhraj-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Shubhrajyoti Datta List-Id: linux-i2c@vger.kernel.org Currently we return silently upon a timeout. Adding an error message to aid debugability. Not a functional change. Signed-off-by: Shubhrajyoti Datta --- drivers/i2c/busses/i2c-xiic.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index a83f300..66c571e 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -692,6 +692,7 @@ static int xiic_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) i2c->tx_msg = NULL; i2c->rx_msg = NULL; i2c->nmsgs = 0; + dev_err(adap->dev.parent, "Controller timed out\n"); return -ETIMEDOUT; } } -- 1.7.1