Re: [Uclinux-dist-devel] [PATCH v2]add analog devices AD714Xcaptouch input driver

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

 



On Tue, Sep 8, 2009 at 23:33, Song, Barry wrote:
> +static inline int ad714x_spi_register_driver(struct spi_driver *spi_drv)
> +{
> +       return spi_register_driver(spi_drv);
> +}
> +
> +static inline void ad714x_spi_unregister_driver(struct spi_driver *spi_drv)
> +{
> +       spi_unregister_driver(spi_drv);
> +}
> +
> +#else
> +#define ad714x_spi_register_driver(p) 0
> +#define ad714x_spi_unregister_driver(p)
>  #endif

i dont think you need the ifdef protection that far up.  what about
using the ifdef in this one place:
static inline int ad714x_spi_register_driver(struct spi_driver *spi_drv)
{
#if defined(CONFIG_SPI) || defined(CONFIG_SPI_MODULE)
    return spi_register_driver(spi_drv);
#else
    return 0;
#endif
}

then i imagine you can have all the other pieces always enabled.  gcc
will see that everything is marked static and not used, so it'll cull
things.
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux