Re: device model documentation 1/3

Patrick Mochel (mochel@osdl.org)
Tue, 4 Jun 2002 11:26:41 -0700 (PDT)


On Tue, 4 Jun 2002, Patrick Mochel wrote:

>
> > > int (*bind) (struct device * dev, struct device_driver * drv);
> > > };
> > >
> >
> > Please - Why do you call it bind? Does it have something with
> > netowrking to do? Please just name it attach. This way the old UNIX
> > guys among us won't have to drag a too big
> > "UNIX to Linux translation dictionary" around with them.
> > As an "added bonus" you will stay consistent with -
> >
> > PCMCIA code base in kernel
> > USB code base in kernel
> > IDE code base (well recently)
>
> Ok, I can live with that.

Actually, I take that back. attach is the wrong nomenclature as well for
the action. 'match' would be more correct.

The entry point is the opportunity for the bus to compare a device ID with
a list of IDs that a particular driver supports. It's a 'compare' or
'match' operation. At this point, the driver is not attaching to the
device; it's only checking that's its ok to attach.

So, how about naming it 'match', and changing the
{driver,device}_{,un}bind() in drivers/base/core.c to
{driver,device}_{,un}attach() (since those are what is doing the
attachment)?

The entire process, though, I think is still best described as "Driver
Binding", as it is a common, modern term for what's happening.

-pat

-
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/