Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1407331ybi; Fri, 2 Aug 2019 15:11:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqwXEnYS6jqEOt5D4g58gbRprxrzOymsy3xFpEuRR1EaiOYJl6qE9ztfmUz1kLGrTjfUDuTo X-Received: by 2002:a17:90a:350c:: with SMTP id q12mr6433268pjb.46.1564783865600; Fri, 02 Aug 2019 15:11:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564783865; cv=none; d=google.com; s=arc-20160816; b=lt3nt/T1664JQBAR81vPjVhFWN85Z0wuootgVK0mKyBxUyAwBt42MtpR8+lhEn3pUW +cm1usnTFXtKq7K+vbfeA1PIkq5fpg6rCxh7Fxl875LzCuy4DH01fzbw3eG2d4m8LnNJ lIyX8dtjwCVK9jpUYrAUL7cA3VWw6sEeWlU7EaEaArrmt6H9H4u0GzNyxoSRGoWL9hrA 7xF8luWOWKuNhZAlF9kAqhsDdLsRbX+A8ToUlj0jO2Yhzn3Kh/XCg3upSDEtcjQIH3Yj 2/vN1CdnLb+MjHzeDhka1z8Psm/bIIk3+c/XkDYsvmh7QhdSqlp4XN5lNU5uBD2DhmgV yZqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=YzrCXJHt2c4jOmdi1zyUVDwqPlWP6rklmxOhumMIwGQ=; b=bNy2lrBGb4d7/V5qxG7UvpWzjlPjb/VCN8gQsIpQS0v2hLPaivyVYkxmIkr9m37byw D5ikfiJHqS3lGvD1fKOjN4Bc+F0QXFdlGPOseTQwPl+Z5O6ME85+JP8/khbbC68Rysfe R6H72z8Z/Be2uZYrIo/FplDiSVlxuvWCf4EPo3pEFFxrd8fEyZQFfvH2QwFtCjVoi5Uh Zlekmr41jWCDLQ11QTdenFmAkzr42RzIRVGm4NLMTc9qNnnziqzGuhfuHWgWhubMXgTN V5TnYcJICDkf12+urFkGHVjdp4r+hJ3TejVwYFIVBlFiofsdS0TUZYwQDYuF+ku4BNDP 3WQw== 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 72si35371258plc.415.2019.08.02.15.10.50; Fri, 02 Aug 2019 15:11:05 -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 S1730764AbfHBMJB (ORCPT + 99 others); Fri, 2 Aug 2019 08:09:01 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:53057 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729980AbfHBMJB (ORCPT ); Fri, 2 Aug 2019 08:09:01 -0400 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1htWMj-0006yJ-AT; Fri, 02 Aug 2019 14:08:57 +0200 Received: from ukl by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1htWMg-0006mZ-Uv; Fri, 02 Aug 2019 14:08:54 +0200 Date: Fri, 2 Aug 2019 14:08:54 +0200 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Schrempf Frieder Cc: "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "linux-imx@nxp.com" , Greg Kroah-Hartman , "geert+renesas@glider.be" , "linux-kernel@vger.kernel.org" , "linux-serial@vger.kernel.org" , Jiri Slaby , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH v3 1/4] serial: mctrl_gpio: Avoid probe failures in case of missing gpiolib Message-ID: <20190802120854.k3arbz6pk6n5ayti@pengutronix.de> References: <20190802100349.8659-1-frieder.schrempf@kontron.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190802100349.8659-1-frieder.schrempf@kontron.de> User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 02, 2019 at 10:04:09AM +0000, Schrempf Frieder wrote: > From: Frieder Schrempf > > If CONFIG_GPIOLIB is not enabled, mctrl_gpio_init() and > mctrl_gpio_init_noauto() will currently return an error pointer with > -ENOSYS. As the mctrl GPIOs are usually optional, drivers need to > check for this condition to allow continue probing. > > To avoid the need for this check in each driver, we return NULL > instead, as all the mctrl_gpio_*() functions are skipped anyway. > We also adapt mctrl_gpio_to_gpiod() to be in line with this change. > > Reviewed-by: Fabio Estevam > Signed-off-by: Frieder Schrempf Reviewed-by: Uwe Kleine-K?nig Thanks Uwe -- Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |