lkml.org 
[lkml]   [2015]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH v4 2/5] PCI: iproc: Add PAXC interface support
    Date
    On Friday 27 November 2015 09:37:45 Ray Jui wrote:
    >
    > +static const struct of_device_id iproc_pcie_of_match_table[] = {
    > + {
    > + .compatible = "brcm,iproc-pcie",
    > + .data = (int *)IPROC_PCIE_PAXB,
    > + }, {
    > + .compatible = "brcm,iproc-pcie-paxc",
    > + .data = (int *)IPROC_PCIE_PAXC,
    > + },
    > + { /* sentinel */ }
    > +};
    > +MODULE_DEVICE_TABLE(of, iproc_pcie_of_match_table);

    You seem to only need the identifiers in order to set a single
    pointer, so just point to that array directly. Alternatively,
    do the more common thing and point to a structure of function
    pointers and have different implementations of the low-level
    access functions there.

    Arnd


    \
     
     \ /
      Last update: 2015-11-27 22:01    [W:5.338 / U:1.120 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site