From patchwork Mon Dec 7 10:47:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 7781951 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EDC90BEEE1 for ; Mon, 7 Dec 2015 10:51:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1316320461 for ; Mon, 7 Dec 2015 10:51:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 317502045A for ; Mon, 7 Dec 2015 10:51:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755806AbbLGKsc (ORCPT ); Mon, 7 Dec 2015 05:48:32 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:33756 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755425AbbLGKr7 (ORCPT ); Mon, 7 Dec 2015 05:47:59 -0500 Received: by pabfh17 with SMTP id fh17so126775773pab.0; Mon, 07 Dec 2015 02:47:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VSP1DQj0Iq5GNXM6CbPa3Aa1nbaHmrIpcpb5cxeNeSU=; b=hSjKWZFPVc5i5Oyhh3ISAOb4wSUhZtIIZeJ+xocfksRVbUH1fHJNYExlx/O0tOZiwY PUWhTM2LUt9AhjNUzdFi0WoD201gl4U3CmcEOOjhFw7tE2t5l/e+2g/JM9jRBpmbZdtP km6Qyp/YOt1mdFgxr486oZ8OTqlzabFBA3HQGvxvc74CqfLYYLe1wDSoAfQ8B9YhFR1A P+w3ZIyATF/EXe3U8qMCOW07bzisVEY2htEvGwioDkf1sQq763fVRRCKVa4Uo8ysMFr1 54RYN/vUbaSnKEcKQGrUYWtIKPE1Zkra/rdjLy9e3cABXo+C30YuJWxNhF/Ikjz4wyy0 id9g== X-Received: by 10.66.149.229 with SMTP id ud5mr41471169pab.83.1449485279025; Mon, 07 Dec 2015 02:47:59 -0800 (PST) Received: from sudip-pc.vectortproxy.org ([122.169.145.251]) by smtp.gmail.com with ESMTPSA id 6sm33768892pfm.58.2015.12.07.02.47.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 07 Dec 2015 02:47:58 -0800 (PST) From: Sudip Mukherjee To: Mark Brown Cc: linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, Sudip Mukherjee Subject: [PATCH v2 7/8] spi: lm70llp: use dev_warn Date: Mon, 7 Dec 2015 16:17:34 +0530 Message-Id: <1449485255-1103-7-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1449485255-1103-1-git-send-email-sudipm.mukherjee@gmail.com> References: <1449485255-1103-1-git-send-email-sudipm.mukherjee@gmail.com> Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As we have a struct device available it is better to use dev_warn() instead of printk. Signed-off-by: Sudip Mukherjee --- drivers/spi/spi-lm70llp.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-lm70llp.c b/drivers/spi/spi-lm70llp.c index 9d45a63..393eb2b 100644 --- a/drivers/spi/spi-lm70llp.c +++ b/drivers/spi/spi-lm70llp.c @@ -249,9 +249,8 @@ static void spi_lm70llp_attach(struct parport *p) */ status = spi_bitbang_start(&pp->bitbang); if (status < 0) { - printk(KERN_WARNING - "%s: spi_bitbang_start failed with status %d\n", - DRVNAME, status); + dev_warn(&pd->dev, "spi_bitbang_start failed with status %d\n", + status); goto out_off_and_release; } @@ -278,7 +277,7 @@ static void spi_lm70llp_attach(struct parport *p) dev_dbg(&pp->spidev_lm70->dev, "spidev_lm70 at %s\n", dev_name(&pp->spidev_lm70->dev)); else { - printk(KERN_WARNING "%s: spi_new_device failed\n", DRVNAME); + dev_warn(&pd->dev, "spi_new_device failed\n"); status = -ENODEV; goto out_bitbang_stop; }