From patchwork Tue Nov 19 18:46:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 3203561 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D4F9FC045B for ; Tue, 19 Nov 2013 18:47:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C64D92015D for ; Tue, 19 Nov 2013 18:47:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 47ACB2012F for ; Tue, 19 Nov 2013 18:47:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751829Ab3KSSrF (ORCPT ); Tue, 19 Nov 2013 13:47:05 -0500 Received: from qmta10.emeryville.ca.mail.comcast.net ([76.96.30.17]:45336 "EHLO qmta10.emeryville.ca.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751667Ab3KSSrE (ORCPT ); Tue, 19 Nov 2013 13:47:04 -0500 Received: from omta24.emeryville.ca.mail.comcast.net ([76.96.30.92]) by qmta10.emeryville.ca.mail.comcast.net with comcast id rRsc1m0031zF43QAAWn3Sv; Tue, 19 Nov 2013 18:47:03 +0000 Received: from mail.gonehiking.org ([50.134.149.16]) by omta24.emeryville.ca.mail.comcast.net with comcast id rWn11m00l0MU7Qa8kWn2wx; Tue, 19 Nov 2013 18:47:03 +0000 Received: from orthanc.internal (orthanc.internal [192.168.1.24]) by mail.gonehiking.org (Postfix) with ESMTP id 890FD803B3; Tue, 19 Nov 2013 11:47:01 -0700 (MST) From: Shuah Khan To: len.brown@intel.com, pavel@ucw.cz, gregkh@linuxfoundation.org, rjw@rjwysocki.net, joe@perches.com Cc: Shuah Khan , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, shuahkhan@gmail.com Subject: [PATCH v2] power: Replace printks with dev_* and pr_* routines Date: Tue, 19 Nov 2013 11:46:58 -0700 Message-Id: <1384886818-11861-1-git-send-email-shuah.kh@samsung.com> X-Mailer: git-send-email 1.8.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1384886823; bh=7KO0/VgG/Ohd2UNWgnV7bufedHqx4CoYX4e+YfjqOEw=; h=Received:Received:Received:From:To:Subject:Date:Message-Id; b=AHxaTTAKyWJL1NO4bzspyZUUpd2tS9AfDLV7Fm0yK2zGjUYoRXHXJLJOYjvxmXYTo ZVwZkf6cA+0Mwr0IxX1D5hOCW1cWnEDBNmYr7/R0dpUW8CU0Iyqzy7tmkF6HeVSNCB sDvhmh72+bLFcrol3M8SDo/fTPKrArMAHjGWI1OgmDdTJAp1Mo3FcNyIvql47b2GA2 x1amKAvBKmzDN5cd4x678/E3jncEdKMQLlSs0/elliy43+QjsMtr5O8x14O8QwaZAl r0fOsnq64wxC3ZQ0LTSVcxlornkAJSzRt6XojyeSQbW7+o5h44XW8fIH6wwqiuFKDY Ad6SWiWd2ndjw== Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, 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 Replaced printks with dev_* and pr_* routines. Replacing printk in __suspend_report_result() will require passing in struct device * pointer from calling routines and this will require changes to external interface suspend_report_result() which is used by several drivers. Hence, this one instance is replaced by pr_err(). Signed-off-by: Shuah Khan --- drivers/base/power/main.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 9f098a8..3f42c43 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -349,8 +349,8 @@ static void pm_dev_dbg(struct device *dev, pm_message_t state, char *info) static void pm_dev_err(struct device *dev, pm_message_t state, char *info, int error) { - printk(KERN_ERR "PM: Device %s failed to %s%s: error %d\n", - dev_name(dev), pm_verb(state.event), info, error); + dev_err(dev, "PM: failed to %s%s: error %d\n", + pm_verb(state.event), info, error); } static void dpm_show_time(ktime_t starttime, pm_message_t state, char *info) @@ -1308,9 +1308,8 @@ int dpm_prepare(pm_message_t state) error = 0; continue; } - printk(KERN_INFO "PM: Device %s not prepared " - "for power transition: code %d\n", - dev_name(dev), error); + dev_info("PM: not prepared for power transition: ", + "code %d\n", error); put_device(dev); break; } @@ -1347,7 +1346,7 @@ EXPORT_SYMBOL_GPL(dpm_suspend_start); void __suspend_report_result(const char *function, void *fn, int ret) { if (ret) - printk(KERN_ERR "%s(): %pF returns %d\n", function, fn, ret); + pr_err("%s(): %pF returns %d\n", function, fn, ret); } EXPORT_SYMBOL_GPL(__suspend_report_result);