Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1275052pxb; Fri, 24 Sep 2021 00:19:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfiHTprgLAiobgSy52gDLze2dBb671dDpbdgBor9y9BJotznoMYOlHJfBj99PNbflQ+K+q X-Received: by 2002:a5e:930a:: with SMTP id k10mr7672284iom.61.1632467989773; Fri, 24 Sep 2021 00:19:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632467989; cv=none; d=google.com; s=arc-20160816; b=ukC9CuN8hIun+zjdp1DCD7863cgfbza0SzT5oyv6Gi8Lu7XXHZ9K4FcRbZOOdutBmt 0WvImF7UdYGsNRgVP16WSRktkWnb/RSsbuA1nbCeGo8DbnunkKADmmKWeQeCyzx+B2sh 08DbbyYmhwSl+xduRqxpp1raAhaVX6iWvzoSGF+jVFrl+xchYh7EcRCndwG1UFnTdVYV sYoz6WXCVCNnpKes5ruSTVogypc1WLMETQt449IzOdkEVuJ6rwTnp8XGKQ6r4/zqoCFD VOQXCEN9a07a2zub4g8MOjeOn2xegYYhi47szE7HyxKwa8QZdaNQBVzU1oWe+LLfnNCt +A1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=GiEC6S0g4fQmQVAg9E+PDWtQBh04P1HB71S1Hhvc3No=; b=OdFvwZUMgIT/Id0iiQ0kddgusZSwS3quvLNgvvV6FLEogBtrbxNRqFR39VIMWT36CT 0Re8MzrfFUXTG7kCAm4TnSZBQA8Ip/+mDR5KU/EseZ803tC54DZQIzKBV39oBW/2V9Xb ZmA45lDtgixW23midF8pUEy2wuYUo6efA+XSTc2xinPN89z1mp7+d72lLY/fSYI3f59H u+HghLIi0//FkU0QAdUlqtc5p5yXJV0gNGiqnIGbI4R91+pvN2vSMSC/VhXq+TP4iYf1 xsWN0DSZXlDMpbY+s7lha3Li3Uq0Xf12HgImxZyIk6wlSr8VsKr0om26ecLbogDp8MTo 6p+A== ARC-Authentication-Results: i=1; mx.google.com; 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 u15si10662838jak.129.2021.09.24.00.19.38; Fri, 24 Sep 2021 00:19:49 -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; 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 S244374AbhIXHTj (ORCPT + 99 others); Fri, 24 Sep 2021 03:19:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244366AbhIXHTi (ORCPT ); Fri, 24 Sep 2021 03:19:38 -0400 Received: from andre.telenet-ops.be (andre.telenet-ops.be [IPv6:2a02:1800:120:4::f00:15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16B99C061756 for ; Fri, 24 Sep 2021 00:18:05 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed10:5dd8:9bc4:3752:5710]) by andre.telenet-ops.be with bizsmtp id xjJ42500L2gynNa01jJ468; Fri, 24 Sep 2021 09:18:04 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1mTfTA-008Vhv-5e; Fri, 24 Sep 2021 09:18:04 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1mTfT9-007LXe-M2; Fri, 24 Sep 2021 09:18:03 +0200 From: Geert Uytterhoeven To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] Input: gpio-keys - print button label in IRQ button error messages Date: Fri, 24 Sep 2021 09:18:02 +0200 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When an error message related to IRQ buttons is printed, no clue is given about the actual button that caused the failure. Fix this by including the button label, to make it more obvious which button has an incomplete or incorrect hardware description. Signed-off-by: Geert Uytterhoeven --- drivers/input/keyboard/gpio_keys.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 0f2250c6aa4978d5..fc706918d7b103cb 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -617,14 +617,16 @@ static int gpio_keys_setup_key(struct platform_device *pdev, } } else { if (!button->irq) { - dev_err(dev, "Found button without gpio or irq\n"); + dev_err(dev, "Found button %s without gpio or irq\n", + desc); return -EINVAL; } bdata->irq = button->irq; if (button->type && button->type != EV_KEY) { - dev_err(dev, "Only EV_KEY allowed for IRQ buttons.\n"); + dev_err(dev, "Only EV_KEY allowed for IRQ button %s\n", + desc); return -EINVAL; } -- 2.25.1