]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
xhci: plat: adapt to unified device property interface
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Tue, 21 Jun 2016 07:58:08 +0000 (10:58 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Jun 2016 18:43:39 +0000 (11:43 -0700)
Requesting the only property that the driver needs using the
unified device property interface so it will be available
for all types of platforms, not just the ones using DT.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-plat.c

index 1f3f981fe7f8182b4b4b1707aa4d5f439e556fe6..d1db8bb10554299ebf5427508787bf38b422b837 100644 (file)
@@ -138,7 +138,6 @@ MODULE_DEVICE_TABLE(of, usb_xhci_of_match);
 
 static int xhci_plat_probe(struct platform_device *pdev)
 {
-       struct device_node      *node = pdev->dev.of_node;
        struct usb_xhci_pdata   *pdata = dev_get_platdata(&pdev->dev);
        const struct of_device_id *match;
        const struct hc_driver  *driver;
@@ -202,7 +201,7 @@ static int xhci_plat_probe(struct platform_device *pdev)
        }
 
        xhci = hcd_to_xhci(hcd);
-       match = of_match_node(usb_xhci_of_match, node);
+       match = of_match_node(usb_xhci_of_match, pdev->dev.of_node);
        if (match) {
                const struct xhci_plat_priv *priv_match = match->data;
                struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd);
@@ -223,7 +222,7 @@ static int xhci_plat_probe(struct platform_device *pdev)
                goto disable_clk;
        }
 
-       if ((node && of_property_read_bool(node, "usb3-lpm-capable")) ||
+       if (device_property_read_bool(&pdev->dev, "usb3-lpm-capable") ||
                        (pdata && pdata->usb3_lpm_capable))
                xhci->quirks |= XHCI_LPM_SUPPORT;