From patchwork Tue Nov 12 17:45:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Werner X-Patchwork-Id: 290738 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 65EAF2C00C8 for ; Wed, 13 Nov 2013 04:46:12 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753886Ab3KLRpp (ORCPT ); Tue, 12 Nov 2013 12:45:45 -0500 Received: from mout.gmx.net ([212.227.17.21]:64169 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753729Ab3KLRpn (ORCPT ); Tue, 12 Nov 2013 12:45:43 -0500 Received: from thinkpad.fritz.box ([88.217.63.160]) by mail.gmx.com (mrgmx103) with ESMTPA (Nemesis) id 0Lwarz-1VexoY0PN9-018N2j for ; Tue, 12 Nov 2013 18:45:41 +0100 From: Andreas Werner To: wsa@the-dreams.de Cc: jacmet@sunsite.dk, marex@denx.de, baohua.song@csr.com, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, wernerandy@gmx.de Subject: [PATCH] I2C: busses: Do not print error message in syslog if no ACK received Date: Tue, 12 Nov 2013 18:45:36 +0100 Message-Id: <1384278336-3694-1-git-send-email-wernerandy@gmx.de> X-Mailer: git-send-email 1.8.4 X-Provags-ID: V03:K0:WTzoUik3QDZpgArxpAN9tfefDPpueb4c/D9LYHeA5+LBRjg3Rne GLs/zp0dedADmxNKRrmthxs9szR4dICVh0zfJyCkyG6OMdqaW8BvWdtwen5nIRIUX9ktha/ ivYoSjbuODXqN8Ymy+iSZ7px66ca6LmgxLYi9hurAOqeNOUQMgCQ5zgpDVfyZG4iCeAcXKu GOTgTEpwOO0ztxf/948PQ== Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Using the i2c-eg20t driver and call i2cdetect or probe on the bus, the driver will print a lot of error messages if there was no ACK received. i2cdetect normally print a table with all the available devices. If there is no device on the address, the table will be empty. Currently with the i2c-eg20t driver, the table is not visible because the error messages destroy the table. Error message: pch_i2c_getack return -71 This patch prevent the driver to print the messages to syslog if debug is not set. Tested on Intel Atom E6xx and Eg20t Chipset. Signed-off-by: Andreas Werner --- drivers/i2c/busses/i2c-eg20t.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-eg20t.c b/drivers/i2c/busses/i2c-eg20t.c index 0f37529..b10c651 100644 --- a/drivers/i2c/busses/i2c-eg20t.c +++ b/drivers/i2c/busses/i2c-eg20t.c @@ -322,7 +322,7 @@ static s32 pch_i2c_getack(struct i2c_algo_pch_data *adap) reg_val = ioread32(p + PCH_I2CSR) & PCH_GETACK; if (reg_val != 0) { - pch_err(adap, "return%d\n", -EPROTO); + pch_dbg(adap, "return%d\n", -EPROTO); return -EPROTO; }