Re: [PATCH V2 5/6] usb: ehci: Add new EHCI driver for Broadcom STB SoC's

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

 



On Wed, Oct 17, 2018 at 11:30 PM Al Cooper <alcooperx@xxxxxxxxx> wrote:

> +
> +static int ehci_brcm_probe(struct platform_device *pdev)
> +{
> +       struct usb_hcd *hcd;
> +       struct resource *res_mem;
> +       struct brcm_priv *priv;
> +       int irq;
> +       int err;
> +
> +       if (usb_disabled())
> +               return -ENODEV;
> +
> +       err = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
> +       if (err)
> +               return err;

You should never use "dma_coerce_mask_and_coherent" in new code. Make sure that
the DT is correct and call dma_set_mask_and_coherent() instead.

> +#ifdef CONFIG_OF
> +static const struct of_device_id brcm_ehci_of_match[] = {
> +       { .compatible = "brcm,bcm7445-ehci", },
> +       {}
> +};
> +
> +MODULE_DEVICE_TABLE(of, brcm_ehci_of_match);
> +#endif /* CONFIG_OF */
> +
> +static struct platform_driver ehci_brcm_driver = {
> +       .probe          = ehci_brcm_probe,
> +       .remove         = ehci_brcm_remove,
> +       .shutdown       = usb_hcd_platform_shutdown,
> +       .driver         = {
> +               .owner  = THIS_MODULE,
> +               .name   = "ehci-brcm",
> +               .pm     = &ehci_brcm_pm_ops,
> +               .of_match_table = of_match_ptr(brcm_ehci_of_match),
> +       }
> +};

You won't ever use this driver without CONFIG_OF, so just remove the #ifdef and
of_match_ptr() wrapper here. It will still build fine without CONFIG_OF.

      Arnd



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux