From patchwork Fri Jan 6 02:43:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lechner X-Patchwork-Id: 9499915 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 44FB960236 for ; Fri, 6 Jan 2017 02:44:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B5352848B for ; Fri, 6 Jan 2017 02:44:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 302BA2848D; Fri, 6 Jan 2017 02:44:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDA2B2848B for ; Fri, 6 Jan 2017 02:44:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936178AbdAFCoB (ORCPT ); Thu, 5 Jan 2017 21:44:01 -0500 Received: from vern.gendns.com ([206.190.152.46]:56116 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754260AbdAFCn7 (ORCPT ); Thu, 5 Jan 2017 21:43:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject :Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=CtPi/5wqsxiBAfhwJhhqPwhD0XPgX5Cp690Xnv03Eq0=; b=oIKrL6DXuVExS2MNVtWUVowMr R49Wzh3e72MM3byN5O29ZEVszb8NuXLi6bXt8msyYXC+0FEofoopVlAy095mZyb8KkPQHp9jNO++F X99kLECxIhgShQRa1EVFzyZjb0v3ejRSLXhWLWxQO/ndHu1uoPUMRgIbVeOx+fj11dxsqESLVUmVh 2EiHf/Y2Mqn8b2KCPPy3tu+13nVXQgBoQBZoyi92pXbYIrxVha+TyYQRgPhpjBhzfwWTwOxdcvw6m PICJS/kAixJWCpWSRJ1aeQb+2L4xn3Jz6YZPdnOZQa4DtAPBtYmnZk3WBVvaoEgKMkQc0dt6cbJHs tErmPtQ9g==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:47742 helo=freyr.lechnology.com) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-SHA256:128) (Exim 4.87) (envelope-from ) id 1cPKVX-000JaJ-Mz; Thu, 05 Jan 2017 21:43:56 -0500 From: David Lechner To: Dmitry Torokhov , Rob Herring , Mark Rutland Cc: David Lechner , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] Input: pwm-beeper: suppress error message on probe defer Date: Thu, 5 Jan 2017 20:43:52 -0600 Message-Id: <1483670635-25060-2-git-send-email-david@lechnology.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1483670635-25060-1-git-send-email-david@lechnology.com> References: <1483670635-25060-1-git-send-email-david@lechnology.com> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This suppress printing an error message when pwm_get/pwm_request returns -EPROBE_DEFER. Otherwise you get a bunch of noise in the kernel log. Signed-off-by: David Lechner --- drivers/input/misc/pwm-beeper.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/input/misc/pwm-beeper.c b/drivers/input/misc/pwm-beeper.c index 5f9655d..e76b710 100644 --- a/drivers/input/misc/pwm-beeper.c +++ b/drivers/input/misc/pwm-beeper.c @@ -109,9 +109,10 @@ static int pwm_beeper_probe(struct platform_device *pdev) beeper->pwm = pwm_request(pwm_id, "pwm beeper"); } - if (IS_ERR(beeper->pwm)) { - error = PTR_ERR(beeper->pwm); - dev_err(&pdev->dev, "Failed to request pwm device: %d\n", error); + error = PTR_ERR_OR_ZERO(beeper->pwm); + if (error) { + if (error != -EPROBE_DEFER) + dev_err(&pdev->dev, "Failed to request pwm device\n"); goto err_free; }