Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161076AbdD0OHz (ORCPT ); Thu, 27 Apr 2017 10:07:55 -0400 Received: from mail-qt0-f178.google.com ([209.85.216.178]:32979 "EHLO mail-qt0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033530AbdD0OHZ (ORCPT ); Thu, 27 Apr 2017 10:07:25 -0400 MIME-Version: 1.0 In-Reply-To: <1493275956-14759-1-git-send-email-agust@denx.de> References: <1493275956-14759-1-git-send-email-agust@denx.de> From: Andy Shevchenko Date: Thu, 27 Apr 2017 17:07:23 +0300 Message-ID: Subject: Re: [PATCH v2] gpiolib: Add stubs for gpiod lookup table interface To: Anatolij Gustschin Cc: Linus Walleij , Alexandre Courbot , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 916 Lines: 31 On Thu, Apr 27, 2017 at 9:52 AM, Anatolij Gustschin wrote: > Add stubs for gpiod_add_lookup_table() and gpiod_remove_lookup_table() > for the !GPIOLIB case to prevent build errors. Also add prototypes. > > Signed-off-by: Anatolij Gustschin > Reviewed-by: Andy Shevchenko Oh, has to take my tag back. See below why. > --- a/include/linux/gpio/consumer.h > +++ b/include/linux/gpio/consumer.h It is already defined in machine.h. What you basically need is to add stubs for !GPIOLIB case #ifdef ... ...existing prototypes... #else /* GPIOLIB */ static inline void gpiod_add_lookup_table(struct gpiod_lookup_table *table) {} static inline void gpiod_remove_lookup_table(struct gpiod_lookup_table *table) {} #endif /* !GPIOLIB */ P.S. please notice how I put the stubs. It would be good to keep them in two lines. -- With Best Regards, Andy Shevchenko