[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK8P3a2v_6T5pkAUR0erFgCN6C4S2zUqq4EEa5nNo+gYdJ+0qw@mail.gmail.com>
Date: Wed, 24 Oct 2018 08:14:40 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Al Cooper <alcooperx@...il.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Alan Stern <stern@...land.harvard.edu>,
Alban Bedel <albeu@...e.fr>, Alex Elder <elder@...aro.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Avi Fishman <avifishman70@...il.com>,
bcm-kernel-feedback-list@...adcom.com,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Chunfeng Yun <chunfeng.yun@...iatek.com>,
David Miller <davem@...emloft.net>,
DTML <devicetree@...r.kernel.org>,
Dmitry Osipenko <digetx@...il.com>,
gregkh <gregkh@...uxfoundation.org>,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>,
Hans de Goede <hdegoede@...hat.com>,
James Hogan <jhogan@...nel.org>, sunjianguo1@...wei.com,
Johan Hovold <johan@...nel.org>,
Kees Cook <keescook@...omium.org>,
USB list <linux-usb@...r.kernel.org>,
Lu Baolu <baolu.lu@...ux.intel.com>,
Mark Rutland <mark.rutland@....com>,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
Mathias Nyman <mathias.nyman@...el.com>,
Mathias Nyman <mathias.nyman@...ux.intel.com>,
Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
rishabhb@...eaurora.org, Rob Herring <robh+dt@...nel.org>,
Roger Quadros <rogerq@...com>
Subject: Re: [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@...il.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
Powered by blists - more mailing lists