Re: [PATCH 1/4] spi: altera: remove unnecessary #ifdef CONFIG_OF

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

 



On Tue, Sep 02, 2014 at 01:34:39PM +0800, Axel Lin wrote:

> > -#ifdef CONFIG_OF
> >  static const struct of_device_id altera_spi_match[] = {
> >         { .compatible = "ALTR,spi-1.0", },
> >         { .compatible = "altr,spi-1.0", },
> >         {},
> >  };
> >  MODULE_DEVICE_TABLE(of, altera_spi_match);
> > -#endif /* CONFIG_OF */

> For !CONFIG_OF case:
>         #define of_match_ptr(_ptr)      NULL
> Can you explain how of_match_ptr() handle this?

Unless MODULE_DEVICE_TABLE knows about OF that's not going to trigger
the dead code elimination.

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [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