Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp3779283ybh; Tue, 6 Aug 2019 01:10:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqxsRfSLpiQa/AkwaZP53wLgRbAQihEELZvt/j/8t+hCh3GwiEb4W5jMBFXhdXlc0UoIVxJW X-Received: by 2002:a63:3407:: with SMTP id b7mr1914678pga.143.1565079024140; Tue, 06 Aug 2019 01:10:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565079024; cv=none; d=google.com; s=arc-20160816; b=Z9AoQjz1D3Ko9bPtWQU1LmgNFnwxsqBOS2+Dw5qglSY5WV39XRm1aNcZTAB6J0Chhi H3nvOSc8VNcvetWiK2eTJsRmm+H6kRB2UMDzJnpeq+7kb+l8V6ER7xj9XSuCg3Ptdh/o 6Zbx+J1WER7o2sfkCfw90ZJUeTgUzQefiKuyeE1ojIPk9WTznBxruqdOk18ZU4QXnOuM sJqiBoUrBaf/W7oPwEv+Yvo2JDTNwTxNjprfvZpOajuE8FCxTqllBB5PChljiHmsvhQt ghrmQiAR4feitM+CwkxoZwonJpdXGdfKf2i88VF1NwWdNsi6IDOdflTtITTGIXclm/3q 20+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=xqMzHVpDgAOeonwqolEAexQrNRkRWUmsMZx6uc5Di+U=; b=kXjwO8Rias9HgStgsKm6nrbXdY3osJCXoiT7sF8ajIw1nzTpmwwW9d5K62ZtrlEtHz OoyBs4vnDdFPMYuLoAHnl3W9QfBo7SnN9TyJCuphq1w8fytE8bJrIF3NXosctPUGHnle xCzmqDpVl/3AfBS2J48+Q5ajlrfBPAGzQ4BMMdoBlODzG+SsxJH+iZrTbYM3HWD3Gk7/ X05cRv8e1MUQ5k8mqa1ulI0202QmPm7KQ2H5X4ZAHYWr/gET6Ju6nx5yYw4cuZtnmDd7 zFUV78iWaGTPbImzcMTFoZ1XlJaimxPTCC5XzuA77m7SClFBoKpShUFnK/2j/rZN07Dx ngIA== 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 f131si43606060pgc.265.2019.08.06.01.10.07; Tue, 06 Aug 2019 01:10:24 -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 S1732079AbfHFIJ3 (ORCPT + 99 others); Tue, 6 Aug 2019 04:09:29 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:45007 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727259AbfHFIJ3 (ORCPT ); Tue, 6 Aug 2019 04:09:29 -0400 Received: by mail-ot1-f65.google.com with SMTP id b7so40188330otl.11; Tue, 06 Aug 2019 01:09:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xqMzHVpDgAOeonwqolEAexQrNRkRWUmsMZx6uc5Di+U=; b=ncTnZ643a6F6/xp7C4uOVK+6KbeNgPn9gNgcJf7vG+uXSvns3V5UXQsVE89o+4nJ0B ej7lG5JEgwrvEuEK/MGRpgOX8pW7BF/cQ7oEbQnIZQOEvLP31VZPK2DRAml4bSOmRgL0 NTi0wE7rRWNeFg+sV1kzZRFLb9a5QK12C2tyOVNVbP4aCv0HLeo/GsOtSKPxVCgdKAlC nUhMRvKafaDansoPNHHNHQYRJTZc42izS7PRqLCo3mhmguFHt0ELsBkdf1ZVH8+YuUG3 9TXRtJ/ChZXKInqaSsFZ5FPsIohuz0oi+zK4RKxLZsCn0iQusa86iIdKCKCVIGFymjCT h2bA== X-Gm-Message-State: APjAAAVXi/GWjde0GnCJY1G4fBLrKzpJzCtxPEJr7S/e1VHcKqmiuvQC +IkAyhkHvfHVfKYFMgph2cD5aeHIxTajxJtc/0mH3A== X-Received: by 2002:a9d:5c11:: with SMTP id o17mr1832302otk.107.1565078968223; Tue, 06 Aug 2019 01:09:28 -0700 (PDT) MIME-Version: 1.0 References: <20190802100349.8659-1-frieder.schrempf@kontron.de> In-Reply-To: <20190802100349.8659-1-frieder.schrempf@kontron.de> From: Geert Uytterhoeven Date: Tue, 6 Aug 2019 10:09:17 +0200 Message-ID: Subject: Re: [PATCH v3 1/4] serial: mctrl_gpio: Avoid probe failures in case of missing gpiolib To: Schrempf Frieder Cc: "u.kleine-koenig@pengutronix.de" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "linux-imx@nxp.com" , Greg Kroah-Hartman , "linux-arm-kernel@lists.infradead.org" , "geert+renesas@glider.be" , Jiri Slaby , "linux-serial@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 2, 2019 at 12:04 PM 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: Geert Uytterhoeven Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds