From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C916ECAAD3 for ; Fri, 9 Sep 2022 13:47:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231741AbiIINrB (ORCPT ); Fri, 9 Sep 2022 09:47:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231584AbiIINqp (ORCPT ); Fri, 9 Sep 2022 09:46:45 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B849912E1AF; Fri, 9 Sep 2022 06:46:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662731194; x=1694267194; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=tV01OCiZqy6nXlyR7eAfCljasS50nB/vF+IgCufZZUE=; b=maIfq4KDFkhkLOgbNbQ20ZzVuqE/nJllh6ru6GJ5a2LTFLErxWJpDIyy 6BxShoSvqnIc3g/PkSbEXVkDfLaFRxGAL4pMDSYsPZ4+z1f3PmyK42p7a mK8hqzDNKeGGpPI0sBx5pfbOoA9z5vNT98orN2zlK3YWKWFgjCHS4puSn 3vMo71QRQxMU18YJlP757iZXRTDquCFCgawbC7ZHnQm/2pNUtQH7uG8LI wXgeFmbUIra9Y8J79vrObfOJW9WIhAtNCbF5Kx9NKK9DIzgX4OpTxVmHx 8cQYQoP5L48JO1Ka4BtNzKfMWYdHM2u91PrO8Giv+jTVqraXRVTJC5LCj g==; X-IronPort-AV: E=McAfee;i="6500,9779,10464"; a="383769238" X-IronPort-AV: E=Sophos;i="5.93,303,1654585200"; d="scan'208";a="383769238" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Sep 2022 06:45:43 -0700 X-IronPort-AV: E=Sophos;i="5.93,303,1654585200"; d="scan'208";a="566371087" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Sep 2022 06:45:41 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1oWeKA-00Aa6F-0b; Fri, 09 Sep 2022 16:45:38 +0300 Date: Fri, 9 Sep 2022 16:45:37 +0300 From: Andy Shevchenko To: Bartosz Golaszewski Cc: Kent Gibson , Linus Walleij , Viresh Kumar , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] gpiolib: un-inline gpiod_request_user() Message-ID: References: <20220909121329.42004-1-brgl@bgdev.pl> <20220909121329.42004-2-brgl@bgdev.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220909121329.42004-2-brgl@bgdev.pl> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 09, 2022 at 02:13:28PM +0200, Bartosz Golaszewski wrote: > Pull this bit of code into gpiolib.c as we're soon be calling certain > symbols static in this compilation unit. Reviewed-by: Andy Shevchenko > Signed-off-by: Bartosz Golaszewski > --- > drivers/gpio/gpiolib.c | 11 +++++++++++ > drivers/gpio/gpiolib.h | 12 +----------- > 2 files changed, 12 insertions(+), 11 deletions(-) > > diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c > index cc9c0a12259e..6768734b9e15 100644 > --- a/drivers/gpio/gpiolib.c > +++ b/drivers/gpio/gpiolib.c > @@ -2009,6 +2009,17 @@ int gpiod_request(struct gpio_desc *desc, const char *label) > return ret; > } > > +int gpiod_request_user(struct gpio_desc *desc, const char *label) > +{ > + int ret; > + > + ret = gpiod_request(desc, label); > + if (ret == -EPROBE_DEFER) > + ret = -ENODEV; > + > + return ret; > +} > + > static bool gpiod_free_commit(struct gpio_desc *desc) > { > bool ret = false; > diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h > index d900ecdbac46..b35deb08a7f5 100644 > --- a/drivers/gpio/gpiolib.h > +++ b/drivers/gpio/gpiolib.h > @@ -179,19 +179,9 @@ struct gpio_desc { > #define gpiod_not_found(desc) (IS_ERR(desc) && PTR_ERR(desc) == -ENOENT) > > int gpiod_request(struct gpio_desc *desc, const char *label); > +int gpiod_request_user(struct gpio_desc *desc, const char *label); > void gpiod_free(struct gpio_desc *desc); > > -static inline int gpiod_request_user(struct gpio_desc *desc, const char *label) > -{ > - int ret; > - > - ret = gpiod_request(desc, label); > - if (ret == -EPROBE_DEFER) > - ret = -ENODEV; > - > - return ret; > -} > - > int gpiod_configure_flags(struct gpio_desc *desc, const char *con_id, > unsigned long lflags, enum gpiod_flags dflags); > int gpio_set_debounce_timeout(struct gpio_desc *desc, unsigned int debounce); > -- > 2.34.1 > -- With Best Regards, Andy Shevchenko