From patchwork Thu Oct 29 21:23:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 7521211 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2BBA49F37F for ; Thu, 29 Oct 2015 21:23:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 630D32061D for ; Thu, 29 Oct 2015 21:23:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 72D6120617 for ; Thu, 29 Oct 2015 21:23:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965132AbbJ2VXv (ORCPT ); Thu, 29 Oct 2015 17:23:51 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:33805 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932530AbbJ2VXo (ORCPT ); Thu, 29 Oct 2015 17:23:44 -0400 Received: by wmff134 with SMTP id f134so32384682wmf.1 for ; Thu, 29 Oct 2015 14:23:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:cc:message-id:date:user-agent:mime-version :content-type:content-transfer-encoding; bh=rtLQDmh2ZDZE/Ml/B5DnZQsd+SixpRtmHINlyNS83CI=; b=H600ZLG6vtIPGVP0IZwgPs8mGqVw7SnWO8Vzej6LQU3bdIW9rZa/z0aITVhVtSp5+E swY9jLhOxbVhmsi3dgmFwuUZ6mCn9YqrtJ2eETbTxUExhEA3qxt5rhZHtyMB4Qp+SfLG xEJlRlTVRa6MlYSJR8glExHOdE+TCGhr5WF1NmN6bIDqFFsuIPGdt8HSHgYV/t7onypH oKInI9txzrVUP/MEQRdQZ893c2DIl/BMSib+KMGwtzx2zYgSd/j75OPNMkLkork/HZ5H rXFhiRBdUO5jzlV/STpXooHNFWRGLMgqhYsn8VZ39y2Y0W5zJjnyZFPUPBLYNEo6iMO6 wOdQ== X-Received: by 10.28.16.1 with SMTP id 1mr9059914wmq.57.1446153823529; Thu, 29 Oct 2015 14:23:43 -0700 (PDT) Received: from ?IPv6:2003:62:5f55:ba00:14ec:a654:7de1:4720? (p200300625F55BA0014ECA6547DE14720.dip0.t-ipconnect.de. [2003:62:5f55:ba00:14ec:a654:7de1:4720]) by smtp.googlemail.com with ESMTPSA id bk2sm3747868wjc.3.2015.10.29.14.23.42 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 29 Oct 2015 14:23:43 -0700 (PDT) From: Heiner Kallweit Subject: [PATCH 8/9] media: rc: nuvoton-cir: replace nvt_pr with dev_ functions To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Message-ID: <56328E35.20708@gmail.com> Date: Thu, 29 Oct 2015 22:23:01 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@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, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable 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 Replace nvt_pr with the respective dev_ functions thus slightly simplifying the code. Signed-off-by: Heiner Kallweit --- drivers/media/rc/nuvoton-cir.c | 15 ++++++++------- drivers/media/rc/nuvoton-cir.h | 3 --- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c index ee1b14e..1ba9c99 100644 --- a/drivers/media/rc/nuvoton-cir.c +++ b/drivers/media/rc/nuvoton-cir.c @@ -274,9 +274,9 @@ static void nvt_hw_detect(struct nvt_dev *nvt) /* warn, but still let the driver load, if we don't know this chip */ if (!chip_name) - nvt_pr(KERN_WARNING, - "unknown chip, id: 0x%02x 0x%02x, it may not work...", - nvt->chip_major, nvt->chip_minor); + dev_warn(&nvt->pdev->dev, + "unknown chip, id: 0x%02x 0x%02x, it may not work...", + nvt->chip_major, nvt->chip_minor); else nvt_dbg("found %s or compatible: chip id: 0x%02x 0x%02x", chip_name, nvt->chip_major, nvt->chip_minor); @@ -482,8 +482,9 @@ static u32 nvt_rx_carrier_detect(struct nvt_dev *nvt) duration *= SAMPLE_PERIOD; if (!count || !duration) { - nvt_pr(KERN_NOTICE, "Unable to determine carrier! (c:%u, d:%u)", - count, duration); + dev_notice(&nvt->pdev->dev, + "Unable to determine carrier! (c:%u, d:%u)", + count, duration); return 0; } @@ -658,7 +659,7 @@ static void nvt_process_rx_ir_data(struct nvt_dev *nvt) static void nvt_handle_rx_fifo_overrun(struct nvt_dev *nvt) { - nvt_pr(KERN_WARNING, "RX FIFO overrun detected, flushing data!"); + dev_warn(&nvt->pdev->dev, "RX FIFO overrun detected, flushing data!"); nvt->pkts = 0; nvt_clear_cir_fifo(nvt); @@ -1087,7 +1088,7 @@ static int nvt_probe(struct pnp_dev *pdev, const struct pnp_device_id *dev_id) device_init_wakeup(&pdev->dev, true); - nvt_pr(KERN_NOTICE, "driver has been successfully loaded\n"); + dev_notice(&pdev->dev, "driver has been successfully loaded\n"); if (debug) { cir_dump_regs(nvt); cir_wake_dump_regs(nvt); diff --git a/drivers/media/rc/nuvoton-cir.h b/drivers/media/rc/nuvoton-cir.h index c96a9d3..0ad15d3 100644 --- a/drivers/media/rc/nuvoton-cir.h +++ b/drivers/media/rc/nuvoton-cir.h @@ -35,9 +35,6 @@ static int debug; -#define nvt_pr(level, text, ...) \ - printk(level KBUILD_MODNAME ": " text, ## __VA_ARGS__) - #define nvt_dbg(text, ...) \ if (debug) \ printk(KERN_DEBUG \