From patchwork Tue Jun 20 01:18:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Packham X-Patchwork-Id: 778049 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 3ws93Z0LcLz9s4s for ; Tue, 20 Jun 2017 11:19:06 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=alliedtelesis.co.nz header.i=@alliedtelesis.co.nz header.b="cNfpI3ka"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752872AbdFTBSs (ORCPT ); Mon, 19 Jun 2017 21:18:48 -0400 Received: from gate2.alliedtelesis.co.nz ([202.36.163.20]:48567 "EHLO gate2.alliedtelesis.co.nz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752824AbdFTBSq (ORCPT ); Mon, 19 Jun 2017 21:18:46 -0400 Received: from mmarshal3.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 4C3C98448C; Tue, 20 Jun 2017 13:18:44 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail; t=1497921524; bh=VJN7ku3kzmmWUdrbB6ifDNHizaVOwnKP7o3oS24GUeY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=cNfpI3kaf585ikzU4/58WLbhHQXawJUpxeVHUCkcBdOYB5CT358Nx+VP1DYm5UICA SzbmyrHJ6065GrCrY1keg+a+81AlqzmjQa+9QcWwMyfgj+2cTKjoqaLBk884M2p/sB 91OboV2EmuBo/lWJ0J2uFzVMaxxQWZ/rr1eyuMNM= Received: from smtp (Not Verified[10.32.16.33]) by mmarshal3.atlnz.lc with Trustwave SEG (v7, 5, 7, 9061) id ; Tue, 20 Jun 2017 13:18:44 +1200 Received: from chrisp-dl.atlnz.lc (chrisp-dl.ws.atlnz.lc [10.33.22.30]) by smtp (Postfix) with ESMTP id 54B8513F0F5; Tue, 20 Jun 2017 13:18:47 +1200 (NZST) Received: by chrisp-dl.atlnz.lc (Postfix, from userid 1030) id 26F071E1E3D; Tue, 20 Jun 2017 13:18:43 +1200 (NZST) From: Chris Packham To: wsa@the-dreams.de, robh+dt@kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Chris Packham Subject: [PATCH v2 5/5] i2c: pca-platform: use dev_warn/dev_info instead of printk Date: Tue, 20 Jun 2017 13:18:37 +1200 Message-Id: <20170620011837.14010-6-chris.packham@alliedtelesis.co.nz> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170620011837.14010-1-chris.packham@alliedtelesis.co.nz> References: <20170620011837.14010-1-chris.packham@alliedtelesis.co.nz> Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Signed-off-by: Chris Packham --- drivers/i2c/busses/i2c-pca-platform.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-pca-platform.c b/drivers/i2c/busses/i2c-pca-platform.c index 12ab0cafa7c9..27175d681548 100644 --- a/drivers/i2c/busses/i2c-pca-platform.c +++ b/drivers/i2c/busses/i2c-pca-platform.c @@ -107,8 +107,8 @@ static int i2c_pca_pf_waitforcompletion(void *pd) static void i2c_pca_pf_dummyreset(void *pd) { struct i2c_pca_pf_data *i2c = pd; - printk(KERN_WARNING "%s: No reset-pin found. Chip may get stuck!\n", - i2c->adap.name); + + dev_warn(&i2c->adap.dev, "No reset-pin found. Chip may get stuck!\n"); } static void i2c_pca_pf_resetchip(void *pd) @@ -214,8 +214,7 @@ static int i2c_pca_pf_probe(struct platform_device *pdev) gpio_direction_output(i2c->gpio, 1); i2c->algo_data.reset_chip = i2c_pca_pf_resetchip; } else { - printk(KERN_WARNING "%s: Registering gpio failed!\n", - i2c->adap.name); + dev_warn(&pdev->dev, "Registering gpio failed!\n"); i2c->gpio = ret; } } @@ -233,7 +232,7 @@ static int i2c_pca_pf_probe(struct platform_device *pdev) platform_set_drvdata(pdev, i2c); - printk(KERN_INFO "%s registered.\n", i2c->adap.name); + dev_info(&pdev->dev, "registered.\n"); return 0; }