Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp364969pxb; Wed, 18 Nov 2020 06:35:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJxxxTYAg5dNvmjfI8AMJemKlqxPHKpwD52LybCtzAdl0W+SvZ3e5X1boTC4ZBuzj87et0zy X-Received: by 2002:a05:6402:b44:: with SMTP id bx4mr15265442edb.373.1605710101965; Wed, 18 Nov 2020 06:35:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605710101; cv=none; d=google.com; s=arc-20160816; b=TAz/rSQvXhrKFQtyO/8AuS3jLB03s2E+7eSSuOUDF8+I+NKUSYVG/X/q4UW5UUpgJG O6pSnWFplw5zzDN71rlkX+YpJrfLErZ938l1s86uMyPB3W9/txxo2UoQ8IdbEeAkVnKx eK6Peu51UNu0SWvFdHo0w9AYWZI5rXWBtCJFaTDcEooGnWPq6Y7eP3WNK79sSnSBXNWu DzVTeo0lZqegbxwBwmDpQrTuA5ksJRuS99vwZrmEf9g/1X7ENqWfnCBafs1WuIgOG6vs FFv4MtqrO7yx4mF9P3CwkYtJf/Q9BW8xH/msQdcjwoX97TU73SoKeuCD3UmlUDyJc7GH qATQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=Ge2t0Q/igfymhtyh+miLyvCJaa9mUFCi6AQqk2DqRPY=; b=dyJaPw3pPyBB7ccwe556ttZJ5XSBRzBVIWNO4tiQR5nZG3N+CC6Sr6tW4yKI/3ca+4 YxqG0/bO2XPamx6CN/S9vhG5XzJ8UBqPJdlmarbjNrVnwCNzKTcXjPKXKKW4CI7CtZ35 aOj7YvU6QjWj5R5wDyXvPupvnjrLmkHnvG/dHENI95QNseOTnu+wznMDrGlUBk58YjO5 74d03ctCYn4wVBhtFo8CMjhEk1lotWJ6zZoJ20jllepyKDb9NMZsdzXFZfN0Uot5G4WV B6ZF+E48cLwA90sC8s1uqmm05JkTZ+Bp6O4mZOOphKc2O2DXpzHGzPC20RaAOZtH6NTT aMCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=dyZ6L6zn; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a14si15918402ejs.111.2020.11.18.06.34.39; Wed, 18 Nov 2020 06:35:01 -0800 (PST) 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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=dyZ6L6zn; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726970AbgKROcB (ORCPT + 99 others); Wed, 18 Nov 2020 09:32:01 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:35394 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726314AbgKROcA (ORCPT ); Wed, 18 Nov 2020 09:32:00 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0AIEVvHv105854; Wed, 18 Nov 2020 08:31:57 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1605709917; bh=Ge2t0Q/igfymhtyh+miLyvCJaa9mUFCi6AQqk2DqRPY=; h=From:To:CC:Subject:Date; b=dyZ6L6zno3pphEK7k6qPejnGlXzFHMw0IDGw/s3l1sGHTsr1WhGr/gXEjzhrQL6Yv eERDmgrqAlRYODKqk0XWkTUme2UwP04E9lzdlvcRVVXWFF8LMwDNQXiTbrcRpcvLwB Qd6xdiLZo7p4pTKZuBo0ZdZcQXSbiihjTveI1/kU= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0AIEVva5022768 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 18 Nov 2020 08:31:57 -0600 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Wed, 18 Nov 2020 08:31:56 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Wed, 18 Nov 2020 08:31:56 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0AIEVu22079492; Wed, 18 Nov 2020 08:31:56 -0600 From: Grygorii Strashko To: Linus Walleij , Bartosz Golaszewski CC: , , , Santosh Shilimkar , Grygorii Strashko Subject: [PATCH] gpio: omap: handle deferred probe with dev_err_probe() for gpiochip_add_data() Date: Wed, 18 Nov 2020 16:31:49 +0200 Message-ID: <20201118143149.26067-1-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The gpiochip_add_data() may return -EPROBE_DEFER which is not handled properly by TI GPIO driver and causes unnecessary boot log messages. Hence, add proper deferred probe handling with new dev_err_probe() API. Signed-off-by: Grygorii Strashko --- drivers/gpio/gpio-omap.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index f7ceb2b11afc..41952bb818ad 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -1049,11 +1049,8 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc) irq->first = irq_base; ret = gpiochip_add_data(&bank->chip, bank); - if (ret) { - dev_err(bank->chip.parent, - "Could not register gpio chip %d\n", ret); - return ret; - } + if (ret) + return dev_err_probe(bank->chip.parent, ret, "Could not register gpio chip\n"); ret = devm_request_irq(bank->chip.parent, bank->irq, omap_gpio_irq_handler, -- 2.17.1