> Maybe drivers/bus would be more appropriate though. Every platform
> handles platforms differently, and x86 seems to be the only one that
> likes the model of putting stuff under drivers/platform.

I'm fine with that and I agree - it is a bus.

> __devinit/__devexit are going away, so you can skip adding them
> for new code.

I'll strip those out of the upstream version

> > +module_init(goldfish_pdev_bus_init);
> > +module_exit(goldfish_pdev_bus_exit);
> 
> The module_platform_driver() macro takes care of this.

Will change to that.

> 
> > +static struct resource goldfish_pdev_bus_resources[] = {
> > +   {
> > +           .start  = GOLDFISH_PDEV_BUS_BASE,
> > +           .end    = GOLDFISH_PDEV_BUS_BASE +
> > GOLDFISH_PDEV_BUS_END - 1,
> > +           .flags  = IORESOURCE_IO,
> > +   },
> > +   {
> > +           .start  = GOLDFISH_PDEV_BUS_IRQ,
> > +           .end    = GOLDFISH_PDEV_BUS_IRQ,
> > +           .flags  = IORESOURCE_IRQ,
> > +   }
> > +};
> > +
> > +struct platform_device goldfish_pdev_bus_device = {
> > +   .name = "goldfish_pdev_bus",
> > +   .id = -1,
> > +   .num_resources = ARRAY_SIZE(goldfish_pdev_bus_resources),
> > +   .resource = goldfish_pdev_bus_resources
> > +};
> > +
> > +static int __init goldfish_init(void)
> > +{
> > +   return platform_device_register(&goldfish_pdev_bus_device);
> > +}
> > +device_initcall(goldfish_init);
> 
> This is the part that I think should actually be part of the
> architecture tree.

Thinking about it a bit I agree. We still end up needing an
architectural header for early console and the like eventually but it
does eliminate much of the rest.

I'll rework it that way.

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to