Subject: Re: autoconf changes for loadable drivers - please review
To: None <M.Drochner@fz-juelich.de>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
List: tech-kern
Date: 08/12/2004 12:21:00
After having some sleep, some clarification and refinement:

M.Drochner@fz-juelich.de said:
> A bus can support multiple interface attributes,

Well, as things look now, it can't. This is however just a
limitation of the config(8) syntax. config(8) checks that
of the multiple attributes of a device is only one
"interface attribute", because the locator data in the
config file cannot be interpreted unambigously otherwise.
When the ioconf.c structures are generated, the information
which attribute is the "blessed" one gets lost. For the
in-kernel autoconf framework all attributes are equal.
(see eg subr_autoconf.c:cfparent_match())

[sys/device.h]
> +typedef int (*cfmatch_loc_t)(struct device *, struct cfdata *,
> +			     const char *, const locdesc_t *, void *);

The "const char *ifattr" is redundant. The interface attribute
can be reached as cfdata->cf_pspec->cfp_iattr.
As a consequence, the "ifattr" member of "struct matchinfo"
is unneeded and can be removed as well.

And in case it is not obvious: The code duplication in
subr_autoconf.c (config_search() and config_found_sm())
is just temporarily, for easier transition. It is needed
because the signature of the "submatch" functions has changed
(to support passing of locators), and I didn't want to
adapt all bus drivers at once.

best regards
Matthias