On Thu, Mar 27, 2014 at 12:49:55PM +0530, Varka Bhadram wrote:
> 
> Ya its okay for me . But I think the code should be
> 
> #if IS_ENABLED(CONFIG_OF)                                  //For DT supported
> boards
> static struct of_device_id at86rf230_of_match [] = {
>         { . compatible = "atmel,at86rf230" , },
>         { . compatible = "atmel,at86rf231" , },
>         { . compatible = "atmel,at86rf233" , },
>         { . compatible = "atmel,at86rf212" , },
>         { },
> };
> MODULE_DEVICE_TABLE(of,  at86rf230_of_match);
> #else

btw. I think the else would be here wrong because we can boot also
without devicetree if devicetree is enabled. I only see sometimes a
#ifdef CONFIG_OF in driver to give the compiler a little help to remove
the struct if it's not enabled.

I think we should remove that #if IS_ENABLED(CONFIG_OF). The struct is
unused because of_match_ptr(at86rf230_of_match) returns NULL if
!CONFIG_OF.

- Alex

------------------------------------------------------------------------------
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to