Re: [PATCH] init. mca_bus_type even if !MCA_bus

From: Andrew Morton
Date: Mon May 17 2004 - 17:52:35 EST


"Randy.Dunlap" <rddunlap@xxxxxxxx> wrote:
>
> On Mon, 17 May 2004 15:14:12 -0700 Andrew Morton wrote:
>
> | "Randy.Dunlap" <rddunlap@xxxxxxxx> wrote:
> | >
> | > - if(mca_system_init()) {
> | > + if (mca_system_init()) {
> | > printk(KERN_ERR "MCA bus system initialisation failed\n");
> | > return -ENODEV;
> | > }
> | >
> | > + if (!MCA_bus)
> | > + return -ENODEV;
> |
> | Why is it appropriate to register the MCA bus type when there is no
> | MCA bus present?
>
> Mostly because it was selected with CONFIG_MCA=y.
>
> Another option (I think, need to test) is to check !MCA_bus
> in drivers/mca/mca-legacy.c::find_mca_adapter(), so that
> mca_bus_type isn't used when it shouldn't be.
>
> Do you prefer that approach?

well my question really was a question, rather than a reimplementation
suggestion. If it _is_ appropriate that mca_bus_type be registered on a
platform which is discovered to have no MCA hardware then fine.

Greg? James? Any insights?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/