tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: MODULE_CLASS_DRIVER and locators stuff



2008/5/3 Juan RP <xtraeme%gmail.com@localhost>:
> On Sat, 3 May 2008 12:50:07 +0200
>  Juan RP <xtraeme%gmail.com@localhost> wrote:
>
>  > Future work:
>  >
>  > -  Get rid of DRIVER_RESCAN() and find a way to declare multiple
>  >     interface attributes.
>
>  To get rid of DRIVER_RESCAN I think the following code in module's source
>  can be used:
>
>  ---
>  extern const struct cfiattrdata audiobuscf_iattrdata;
>
>
>  static int locs[] = { -1, -1 };
>  static const struct cfiattrdata * const attrs[] = {
>         &audiobuscf_iattrdata, NULL
>  };
>
>  DRIVER_MODULE(MODULE_CLASS_DRIVER, auich, pci, locs, attrs, NULL);
>  ---
>
>  If a driver doesn't use any interface attributes, NULL may be used.
>  Also with that way is possible to pass multiple iattrs.
>
>
>

Very nice :)


>  --
>  Juan Romero Pardines - xtraeme at gmail|netbsd dot org
>         The NetBSD Project
>
>  Make your own NetBSD/x86 Live CD:
>  http://www.netbsd.org/~xtraeme/mklivecd/
>


Home | Main Index | Thread Index | Old Index