Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3384495ybt; Tue, 23 Jun 2020 00:34:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw01ZWew+aBxOdOwPkKbpmSS4sR/de76luRHFceHXR7C5yqZ7EXuMcexG4+doA71pxnfz+k X-Received: by 2002:aa7:c986:: with SMTP id c6mr21110707edt.335.1592897652843; Tue, 23 Jun 2020 00:34:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592897652; cv=none; d=google.com; s=arc-20160816; b=noQO6q4t9F0Wkjtw6GbLvzF64ZrEsxmyamZM32AbKW/nYPAI13T9SAKPYk4EfChfw2 q6NTdZPBiyFUsy/eM+uT290768GxgVdYLqoSwkSUhzJQv1MjkKpNKr/M6ngKxUyg9VlE RQAWiQcJuzXqqaHslYLHt8bXghFaWbPGTKDtQ9HvsLrVb+PGOZ24l37P+K4XRMwxHXvB 2QKxififw6pn4kfJeBxiNnB3hUqvD/kLYpULAC/YdxvxJdB76MZRJ/1+fvUFsN7aTyTz opsaUq22d3eoqs79hFvxzestAtkmHd+svTVEggNsCsX+nIMBxo/0ZW1ZOm6Y01Zy46mD E3Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature; bh=PrPh+eMP5+ZYRmG5TKB2ISg2GXa+N21InNQiBC7iQu8=; b=knTRioqDmh8icX5fy6RwLoRG+4yaA4oMvZjcU6kKZWQIau+Rp/ELvSd17qHOw/dW97 l1c3WOYSyAgVYe75l+DbZFNkLDdhLZ6xOkOqrZE1uk1YaWY0EE7KsK9P3I2JUbaqWrbi 61R1RTAVRoZk6MkxomeB9gpPKjqSqa4gdCkneTgXLrJenTvz65CWhzF31yc9ZO5Y9A9Q YHUPqb1Mqb+xCrHOJM37U3sK93/+OkWUVKPxa1wPW7Y2OYm5V9At3dJSvHDBy/NLdcus orc9g/6FTkOmcZeiOuc8m1hqQjCaM3pEQ/GgT6IEEngRze3jlnCQxf2GpmeZ9SNt1mL/ ZK2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=UYBpcPaj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v12si733977eja.379.2020.06.23.00.33.50; Tue, 23 Jun 2020 00:34:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=UYBpcPaj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731756AbgFWHbW (ORCPT + 99 others); Tue, 23 Jun 2020 03:31:22 -0400 Received: from mail29.static.mailgun.info ([104.130.122.29]:53504 "EHLO mail29.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731718AbgFWHbT (ORCPT ); Tue, 23 Jun 2020 03:31:19 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1592897479; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=PrPh+eMP5+ZYRmG5TKB2ISg2GXa+N21InNQiBC7iQu8=; b=UYBpcPajRZPc5281mtukx4nbHOomBeUpK/uJ2aJY4KmlXCSPy7MnqLokY/cexGaeOnZnimRi uHbkjdboQvqLHKImlegepLrsE+IubP+7clMzlKrd7Y4chYJyNlPBDbsH1yFQXfdLlmPhN850 jBqmO+0yrkIuOxH9k6giHT5Y0xg= X-Mailgun-Sending-Ip: 104.130.122.29 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n07.prod.us-west-2.postgun.com with SMTP id 5ef1afc63a8a8b20b8f78150 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 23 Jun 2020 07:31:18 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 49A24C433BA; Tue, 23 Jun 2020 07:31:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from jprakash-linux.qualcomm.com (blr-c-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jprakash) by smtp.codeaurora.org (Postfix) with ESMTPSA id D5358C433C6; Tue, 23 Jun 2020 07:31:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org D5358C433C6 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=jprakash@codeaurora.org From: Jishnu Prakash To: agross@kernel.org, bjorn.andersson@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, mka@chromium.org, linus.walleij@linaro.org, Jonathan.Cameron@huawei.com, andy.shevchenko@gmail.com, amit.kucheria@verdurent.com, smohanad@codeaurora.org, kgunda@codeaurora.org, aghayal@codeaurora.org, Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-arm-msm@vger.kernel.org, linux-iio@vger.kernel.org Cc: linux-arm-msm-owner@vger.kernel.org, Jishnu Prakash Subject: [PATCH V7 6/7] iio: adc: Update debug prints Date: Tue, 23 Jun 2020 12:59:58 +0530 Message-Id: <1592897399-24089-7-git-send-email-jprakash@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1592897399-24089-1-git-send-email-jprakash@codeaurora.org> References: <1592897399-24089-1-git-send-email-jprakash@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Change pr_err/pr_debug statements to dev_err/dev_dbg for increased clarity. Signed-off-by: Jishnu Prakash Reviewed-by: Andy Shevchenko --- drivers/iio/adc/qcom-spmi-adc5.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/iio/adc/qcom-spmi-adc5.c b/drivers/iio/adc/qcom-spmi-adc5.c index 3022313..0f9af66 100644 --- a/drivers/iio/adc/qcom-spmi-adc5.c +++ b/drivers/iio/adc/qcom-spmi-adc5.c @@ -246,11 +246,11 @@ static int adc5_read_voltage_data(struct adc5_chip *adc, u16 *data) *data = (rslt_msb << 8) | rslt_lsb; if (*data == ADC5_USR_DATA_CHECK) { - pr_err("Invalid data:0x%x\n", *data); + dev_err(adc->dev, "Invalid data:0x%x\n", *data); return -EINVAL; } - pr_debug("voltage raw code:0x%x\n", *data); + dev_dbg(adc->dev, "voltage raw code:0x%x\n", *data); return 0; } @@ -382,24 +382,24 @@ static int adc5_do_conversion(struct adc5_chip *adc, ret = adc5_configure(adc, prop); if (ret) { - pr_err("ADC configure failed with %d\n", ret); + dev_err(adc->dev, "ADC configure failed with %d\n", ret); goto unlock; } if (adc->poll_eoc) { ret = adc5_poll_wait_eoc(adc); if (ret) { - pr_err("EOC bit not set\n"); + dev_err(adc->dev, "EOC bit not set\n"); goto unlock; } } else { ret = wait_for_completion_timeout(&adc->complete, ADC5_CONV_TIMEOUT); if (!ret) { - pr_debug("Did not get completion timeout.\n"); + dev_dbg(adc->dev, "Did not get completion timeout.\n"); ret = adc5_poll_wait_eoc(adc); if (ret) { - pr_err("EOC bit not set\n"); + dev_err(adc->dev, "EOC bit not set\n"); goto unlock; } } @@ -721,7 +721,7 @@ static int adc5_get_dt_channel_data(struct adc5_chip *adc, channel_name = of_get_property(node, "label", NULL) ? : node->name; if (!channel_name) { - pr_err("Invalid channel name\n"); + dev_err(dev, "Invalid channel name\n"); return -EINVAL; } prop->datasheet_name = channel_name; @@ -764,7 +764,7 @@ static int adc5_get_dt_channel_data(struct adc5_chip *adc, return ret; } - pr_debug("dig_ver:minor:%d, major:%d\n", dig_version[0], + dev_dbg(dev, "dig_ver:minor:%d, major:%d\n", dig_version[0], dig_version[1]); /* Digital controller >= 5.3 have hw_settle_2 option */ if ((dig_version[0] >= ADC5_HW_SETTLE_DIFF_MINOR && @@ -966,7 +966,7 @@ static int adc5_probe(struct platform_device *pdev) ret = adc5_get_dt_data(adc, node); if (ret) { - pr_err("adc get dt data failed\n"); + dev_err(dev, "adc get dt data failed\n"); return ret; } -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project