Re: [PATCH] USB: ftdi_sio: add GPIO support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

On 06/09/2014 06:23 PM, One Thousand Gnomes wrote:

  #include <linux/kernel.h>
  #include <linux/errno.h>
+#ifdef CONFIG_GPIOLIB
+#include <linux/gpio.h>
+#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-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux