Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4926749imm; Mon, 11 Jun 2018 22:55:36 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ7BsJOzDKNSm5z3YBpACYtE3L8CFr6hmEzWuJSXHH8IqJsX2zK4dBckniPfNv28rUEbbtD X-Received: by 2002:a17:902:5e3:: with SMTP id f90-v6mr2428796plf.175.1528782936531; Mon, 11 Jun 2018 22:55:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528782936; cv=none; d=google.com; s=arc-20160816; b=oFkkD7V0gTuvvUbnnNMsb0gYNru46Ie9m2rqwOujuQ2EK2X2nSpzTSpfl5dxCD/Czv KKncJm3x2ULsIeLf/0La3z6AK2BRcZLHObjaiIgNK0Q5OTGo8lUcWZVyJnvvnqOFJisM NBVR72TJMbdA7UIm1d/K/vqsOF6GN+3zGOsnGye+xSJF4ZdjlM6R7RaGg1wFwZTy88Wu O3RRNx7bIQeV+UC8Sx4ntmN4uXDC2RYZ3JXEYqco3veqCDwD8KXiPPQ3AW3uHgKnMPa5 Ra1PwFQ0whWTL/r2D139LZuzyPg4qdwMRgbQeRs2uBKM2ohGZMlBAYwtdcZyV1Iw9q+M qZQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=yEBNUZgCLs5BG7SmwV/OA8TkurVaBaC709buiU3WyLo=; b=t+8QHbW1gyX32IsRpR5mBCYCTK3rFpmw689KFZYxuaAVc46egxI4honzE2PWi9RgKg l/r5baTcVB+tBGsamyRSiOpRzUOXG9eeVZqKiPlQ+5NYkDB/yfr4VQ5x0XZqJs3Ny9Zx o4n4PxkEGFaoVb+M5U2VQ2HmMvtY2kafBO3obUTZDI4saoxbnYVNRvkXJPcxKM2FVxRB iKJjBIum2Ab2bNlVWrAhmROd40LDYbuokcgowSDaRCs8BrzOTSxxZOuh90AlxpzID4m/ xydEezyQRlY+z7FBYvvDXhpJnNXR5LaOPA64xwT5KPWlgGSxSGzx5RqA51goHpbeMo84 uxXg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y7-v6si68289pgp.157.2018.06.11.22.55.22; Mon, 11 Jun 2018 22:55:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932626AbeFLFyE (ORCPT + 99 others); Tue, 12 Jun 2018 01:54:04 -0400 Received: from webbox1416.server-home.net ([77.236.96.61]:35833 "EHLO webbox1416.server-home.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932357AbeFLFyD (ORCPT ); Tue, 12 Jun 2018 01:54:03 -0400 X-Greylist: delayed 528 seconds by postgrey-1.27 at vger.kernel.org; Tue, 12 Jun 2018 01:54:02 EDT Received: from imapserver.systec-electronic.com (unknown [212.185.67.146]) by webbox1416.server-home.net (Postfix) with ESMTPA id D358527A5CC; Tue, 12 Jun 2018 07:45:13 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by imapserver.systec-electronic.com (Postfix) with ESMTP id 8A5691A59B9; Tue, 12 Jun 2018 07:45:13 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at imapserver.systec-electronic.com Received: from imapserver.systec-electronic.com ([127.0.0.1]) by localhost (imapserver.systec-electronic.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XHbGp3aySHZI; Tue, 12 Jun 2018 07:45:11 +0200 (CEST) Received: from ws-stein.localnet (ws-stein.systec.local [192.168.10.92]) by imapserver.systec-electronic.com (Postfix) with ESMTPA id C97811A59B8; Tue, 12 Jun 2018 07:45:08 +0200 (CEST) From: Alexander Stein To: Keerthy Cc: linus.walleij@linaro.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, grygorii.strashko@ti.com, t-kristo@ti.com Subject: Re: [PATCH v2 1/2] gpio: davinci: Shuffle IRQ resource fetching from DT to beginning of probe Date: Tue, 12 Jun 2018 07:45:08 +0200 Message-ID: <2368406.Am5sO8QqEf@ws-stein> In-Reply-To: <1528781273-18098-1-git-send-email-j-keerthy@ti.com> References: <1528781273-18098-1-git-send-email-j-keerthy@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday, June 12, 2018, 7:27:52 AM CEST Keerthy wrote: > This is needed in case of PROBE_DEFER if IRQ resource is not yet ready. > > Signed-off-by: Keerthy > --- > [...] > --- a/drivers/gpio/gpio-davinci.c > +++ b/drivers/gpio/gpio-davinci.c > [...] > @@ -168,7 +168,7 @@ static int davinci_gpio_probe(struct platform_device *pdev) > { > static int ctrl_num, bank_base; > int gpio, bank, ret = 0; > - unsigned ngpio, nbank; > + unsigned ngpio, nbank, bank_irq; bank_irq should be an int, not unsigned, no? > struct davinci_gpio_controller *chips; > struct davinci_gpio_platform_data *pdata; > struct device *dev = &pdev->dev; > @@ -209,6 +209,12 @@ static int davinci_gpio_probe(struct platform_device *pdev) > if (IS_ERR(gpio_base)) > return PTR_ERR(gpio_base); > > + bank_irq = platform_get_irq(pdev, 0); > + if (bank_irq < 0) { This won't work using an unsigned. Best regards, Alexander