On Fri, 12 Oct 2007 21:28:42 +0800 Li Yang <[EMAIL PROTECTED]> wrote: > > +++ b/arch/powerpc/sysdev/fsl_serdes.c > +static int __init setup_serdes(struct device_node *np) > +{ > + void __iomem *regs; > + const void *prot;
Maybe "const char *prot" (it is used as a string). > + const unsigned int *freq; > + struct resource res; > + u32 rfcks; > + > + of_address_to_resource(np, 0, &res); > + regs = ioremap(res.start, res.end - res.start + 1); > + > + prot = of_get_property(np, "protocol", NULL); > + if (!prot) > + return -EINVAL; > + freq = of_get_property(np, "clock", NULL); > + switch (*freq) { You should probably check for !freq. I guess it depends on how much we trust the device tree. > +static int __init fsl_serdes_init(void) { > + struct device_node *np; > + > + for (np = NULL; (np = of_find_compatible_node(np, NULL, "fsl,serdes")) > != NULL;) for_each_compatible_node(np, NULL, "fsl,serdes") -- Cheers, Stephen Rothwell [EMAIL PROTECTED] http://www.canb.auug.org.au/~sfr/
pgpbmTCI51tgk.pgp
Description: PGP signature
_______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev