Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932185AbaFISgw (ORCPT ); Mon, 9 Jun 2014 14:36:52 -0400 Received: from mail-lb0-f180.google.com ([209.85.217.180]:38371 "EHLO mail-lb0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753861AbaFISgt (ORCPT ); Mon, 9 Jun 2014 14:36:49 -0400 Message-ID: <5395FEBF.3040608@cogentembedded.com> Date: Mon, 09 Jun 2014 22:36:47 +0400 From: Sergei Shtylyov Organization: Cogent Embedded User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: One Thousand Gnomes , Sascha Silbe CC: Johan Hovold , Linus Walleij , Alexandre Courbot , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] USB: ftdi_sio: add GPIO support References: <1402320115-13171-1-git-send-email-x-linux@infra-silbe.de> <20140609152313.45f353d6@alan.etchedpixels.co.uk> In-Reply-To: <20140609152313.45f353d6@alan.etchedpixels.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello. On 06/09/2014 06:23 PM, One Thousand Gnomes wrote: >> #include >> #include >> +#ifdef CONFIG_GPIOLIB >> +#include >> +#endif > Please create a new struct, a new file and put all the GPIO stuff in > there rather than #if bombing the driver. > You can then declare blank methods for the gpio stuff if GPIO is not > compiled in - ie in the headers > #ifdef CONFIG_GPIOLIB > extern int ftdi_gpio_open(struct ftdi_private *priv); > etc... > #else > extern inline int ftdi_gpio_open(struct ftdi_private *priv) { return 0 }; I guess you meant *static* instead of *extern* here? > #endif WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/