From patchwork Wed Jan 11 20:01:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lechner X-Patchwork-Id: 9511149 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 B7FBC6075C for ; Wed, 11 Jan 2017 20:03:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A740A28675 for ; Wed, 11 Jan 2017 20:03:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9BD5428689; Wed, 11 Jan 2017 20:03:03 +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 3080428675 for ; Wed, 11 Jan 2017 20:03:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757392AbdAKUCT (ORCPT ); Wed, 11 Jan 2017 15:02:19 -0500 Received: from vern.gendns.com ([206.190.152.46]:49949 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750707AbdAKUCR (ORCPT ); Wed, 11 Jan 2017 15:02:17 -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=QXnw10uYIflEfywXFXLrJbNdwZCb2Ond+sl4QU/4F84=; b=a8fvo0aRWv5rzvdRt+lyaHU9d wY6EK4w1RAJk3NrJ2aL313ufq6xg7NS5j95rq5MmRHQ7kxxMUdkvDVazpZU5otR6zn0+oxhClz0x+ bp3pgAsa42OClY97eUgHBeKgYHfrbQ1LhHymr/UEtmJWZb4eQHAvsMLLGTyxmp4u1XbHT4RvGtsn4 q1+yloMnlM6Nt26phZ/n1Q09EF873iLpzG9iJpfe0sD381NU9gxaNJ2g6GzcEXppu4LwovPaCgGM0 T6S3QKqAvlUTfRoF+rE5L/FFfYWrRir7U5Tx8nj8BMhxNJ460Xr9Lg5mc+rsfpkicQ4RE7jKg0luX HPAsVpOJw==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:52454 helo=freyr.lechnology.com) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-SHA256:128) (Exim 4.87) (envelope-from ) id 1cRP64-001Exb-4a; Wed, 11 Jan 2017 15:02:12 -0500 From: David Lechner To: linux-input@vger.kernel.org, devicetree@vger.kernel.org Cc: David Lechner , Dmitry Torokhov , Rob Herring , Mark Rutland , linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] Input: pwm-beeper: suppress error message on probe defer Date: Wed, 11 Jan 2017 14:01:59 -0600 Message-Id: <1484164921-30587-2-git-send-email-david@lechnology.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1484164921-30587-1-git-send-email-david@lechnology.com> References: <1484164921-30587-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 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 ce6eec4..30ac227 100644 --- a/drivers/input/misc/pwm-beeper.c +++ b/drivers/input/misc/pwm-beeper.c @@ -104,9 +104,10 @@ static int pwm_beeper_probe(struct platform_device *pdev) return -ENOMEM; beeper->pwm = devm_pwm_get(dev, NULL); - if (IS_ERR(beeper->pwm)) { - error = PTR_ERR(beeper->pwm); - dev_err(dev, "Failed to request pwm device: %d\n", error); + error = PTR_ERR_OR_ZERO(beeper->pwm); + if (error) { + if (error != -EPROBE_DEFER) + dev_err(dev, "Failed to request pwm device\n"); return error; }