lkml.org 
[lkml]   [2018]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH V2 5/6] usb: ehci: Add new EHCI driver for Broadcom STB SoC's
On Wed, Oct 17, 2018 at 11:30 PM Al Cooper <alcooperx@gmail.com> 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

\
 
 \ /
  Last update: 2018-10-24 09:15    [W:0.118 / U:33.780 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site