From patchwork Thu Jan 19 22:40:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 9527075 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 18A4A6020B for ; Thu, 19 Jan 2017 22:42:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 097B528531 for ; Thu, 19 Jan 2017 22:42:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F09F028671; Thu, 19 Jan 2017 22:42:34 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 83A7B28531 for ; Thu, 19 Jan 2017 22:42:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753801AbdASWls (ORCPT ); Thu, 19 Jan 2017 17:41:48 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:34761 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753415AbdASWlD (ORCPT ); Thu, 19 Jan 2017 17:41:03 -0500 Received: by mail-pg0-f65.google.com with SMTP id t6so5164834pgt.1; Thu, 19 Jan 2017 14:41:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7J++qzMBeQLXA1KQKmp+pcbd4p4sOZXOqXAGAHc+hXE=; b=V3GEkGKXHij9N5/IB8gg1RDi8JaONqg4mm0kmkefp2nNZ4KJAHbswhtma0xYo8vUlx UNymT8uEW2zuYIcN8X8dHlZDWSkp8nd03bg+ed+Oc/gyKPJIyNxbAOpENw9d+8n0RFBn fKp7xc03FRR12RveQ0lj4nk3iHmK0SMDRUTl9HwzSmjJY8mm34u/UNF15Jy1DTNnM36N Ha1JiJAb8fLYhyei4LBqu3YOA5Cpk++OHSuqcMXUb0b6Fz+Td8t9iwynIdLwURA6alAs M8u/250bUT9JocV+I0Zrnwu0TdNW34um4tmqsqAWm35z0TnDp46wPzhxcQ9oN1dmm5u8 8w5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7J++qzMBeQLXA1KQKmp+pcbd4p4sOZXOqXAGAHc+hXE=; b=BG0s/7B/igOyiO4FiZV8T2ymoUFoeoXAk7G5AQBVm3ypLrPjXfwtPdHzJbXLE6d02M J01Z6ndKQ6ILp3Ec57QC5Ianjqv9wdyV0FxkBROGqMj45Twgi1yd2J7GZWJvP/L0gZJ7 FcWliiGyhsGLhnelWCjVfKVu9jZzQvESPAbM2SjDqnAqpfvpbJy/AwZV3IzZsHU4GpIr kFL9s2HebMnlgK+1/dZWgPo+U1M64V2AINxz8jXLzLDjXDbeuqcqOoWx7odD4zZ25Wh2 sxud8+855HUgd0Uyhh+/cE7ekrMuGXXNDsJLXKT5TlAGlT0TpAsTvmJfmJgNH/2eJQ/F g7GA== X-Gm-Message-State: AIkVDXK4ScwwhSpNUVny5Yj9ebQ5ypNXWWtFWliCnYyiFaZ02OyJkyK4TweSs8CkyoQcRw== X-Received: by 10.84.193.36 with SMTP id e33mr16775699pld.4.1484865663091; Thu, 19 Jan 2017 14:41:03 -0800 (PST) Received: from dtor-ws.mtv.corp.google.com ([172.22.152.34]) by smtp.gmail.com with ESMTPSA id s136sm11207573pgc.38.2017.01.19.14.41.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Jan 2017 14:41:02 -0800 (PST) From: Dmitry Torokhov To: linux-input@vger.kernel.org Cc: David Lechner , Thierry Reding , linux-kernel@vger.kernel.org, Frieder Schrempf Subject: [PATCH v2 5/7] Input: pwm-beeper - suppress error message on probe defer Date: Thu, 19 Jan 2017 14:40:55 -0800 Message-Id: <20170119224057.9995-5-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.11.0.483.g087da7b7c-goog In-Reply-To: <20170119224057.9995-1-dmitry.torokhov@gmail.com> References: <20170119224057.9995-1-dmitry.torokhov@gmail.com> 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 From: David Lechner 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 Patchwork-Id: 9499915 Signed-off-by: Dmitry Torokhov Reviewed-by: Thierry Reding --- drivers/input/misc/pwm-beeper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/misc/pwm-beeper.c b/drivers/input/misc/pwm-beeper.c index 04c8ad3827d9..9964c46468d3 100644 --- a/drivers/input/misc/pwm-beeper.c +++ b/drivers/input/misc/pwm-beeper.c @@ -108,7 +108,8 @@ static int pwm_beeper_probe(struct platform_device *pdev) 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); + if (error != -EPROBE_DEFER) + dev_err(dev, "Failed to request pwm device\n"); return error; }