Hello Arnd,

I think, the function of_find_compatible_node(), which is called in the
for loop, has already done that. So definitely, no need to call
of_device_is_compatible() any more.

Thanks
Mark Zhan
On Tue, 2007-07-17 at 03:02 +0200, Arnd Bergmann wrote:
> On Monday 16 July 2007, Mark Zhan wrote:
> > -               cpm_uart_data.uart_clk = ppc_proc_freq;
> > +               if (strstr(model, "SMC")) {
> > +                       cpm_uart_dev = 
> > platform_device_register_simple("fsl-cpm-smc:uart",
> > +                                                       i, &r[0], 3);
> > +               } else if (strstr(model, "SCC")) {
> > +                       cpm_uart_dev = 
> > platform_device_register_simple("fsl-cpm-scc:uart",
> > +                                                       i, &r[0], 3);
> > +               }
> > 
> 
> You should probably use of_device_is_compatible() to check
> if a given device can be used by a particular driver.
> 
>       Arnd <><
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to