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