Re: driverfs support for motherboard devices

From: Pavel Machek (pavel@suse.cz)
Date: Thu Feb 07 2002 - 15:21:00 EST


Hi!

> > > +static void __init init_8259A_devicefs(void)
> > > +{
> > > + device_register(&device_i8259A);
> > > + strcpy(device_i8259A.name, "i8259A");
> > > + strcpy(device_i8259A.bus_id, "0020");
> > > + device_i8259A.parent = &sys_iobus;
> >
> > I'm not entirely familiar with the driverfs API but wouldn't an API
> > function to do all that strcpy and other init assignments be a bit
> > cleaner? I see lots of retyping going on otherwise, someone feel free to
> > hit me with a clue bat if i'm missing something...
>
> Actually, that's something I didn't notice with the patch: you need a
> non-NULL bus_id inorder to register the device.
>
> Something like this for singular devices would work better:
>
> static struct device device_i8259A = {
> name: "i8259A",
> bus_id: "0020",
> };
>
> Though, where does that bus_id come from?

It is address on (what used to be) ISA bus. I'm selecting lowest when
I have a choice.
                                                                        Pavel

-- 
(about SSSCA) "I don't say this lightly.  However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Feb 07 2002 - 21:01:08 EST