Hi Alexandr, On Thu, 28 Feb 2008 21:52:02 +0300 Alexandr Smirnov <[EMAIL PROTECTED]> wrote: > > +void __iomem *cpld_base = NULL;
Should this be static? > +static void cpm2_cascade(unsigned int irq, struct irq_desc *desc) > +{ > + int cascade_irq; > + > + while ((cascade_irq = cpm2_get_irq()) >= 0) { > + generic_handle_irq(cascade_irq); > + } We normally don't bracket single line blocks. > +static void __init ksi8560_pic_init(void) > +{ > + struct mpic *mpic; > + struct resource r; > + struct device_node *np = NULL; > +#ifdef CONFIG_CPM2 > + int irq; > +#endif > + > + np = of_find_node_by_type(np, "open-pic"); You can pass NULL as the first argument here, so you don't need the initialisation of "np" above. > +static struct cpm_pin ksi8560_pins[] = { This should be marked __init. > +static void ksi8560_show_cpuinfo(struct seq_file *m) > +{ > + seq_printf(m, "Hardware rev\t: %d\n", > + in_8(cpld_base + KSI8560_CPLD_HVR)); What if cpld_base is NULL? > +static struct of_device_id __initdata of_bus_ids[] = { > + { .type = "soc", }, > + { .name = "cpm", }, > + { .name = "localbus", }, > + {}, > +}; > + > +static int __init declare_of_platform_devices(void) > +{ > + if (!machine_is(ksi8560)) > + return 0; You don't need this test because this is a machine_init_call. > +static int __init ksi8560_probe(void) > +{ > + unsigned long root = of_get_flat_dt_root(); > + > + return of_flat_dt_is_compatible(root, "emerson,KSI8560"); You need to include asm/prom.h to use these routines. -- Cheers, Stephen Rothwell [EMAIL PROTECTED] http://www.canb.auug.org.au/~sfr/
pgpCSsAb2qNIG.pgp
Description: PGP signature
_______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev