From dac935533b354a9be9167013e999d128bfc8392b Mon Sep 17 00:00:00 2001 From: Michal Meloun Date: Sun, 10 Jul 2016 18:28:15 +0000 Subject: EXTRES: Add OF node as argument to all _get_by_ofw_() functions. In some cases, the driver must handle given properties located in specific OF subnode. Instead of creating duplicate set of function, add 'node' as argument to existing functions, defaulting it to device OF node. MFC after: 3 weeks --- sys/dev/usb/controller/generic_ohci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/dev/usb/controller') diff --git a/sys/dev/usb/controller/generic_ohci.c b/sys/dev/usb/controller/generic_ohci.c index 9656c8faa1c8c..beafd0614b67c 100644 --- a/sys/dev/usb/controller/generic_ohci.c +++ b/sys/dev/usb/controller/generic_ohci.c @@ -161,7 +161,7 @@ generic_ohci_attach(device_t dev) #ifdef EXT_RESOURCES TAILQ_INIT(&sc->clk_list); /* Enable clock */ - for (off = 0; clk_get_by_ofw_index(dev, off, &clk) == 0; off++) { + for (off = 0; clk_get_by_ofw_index(dev, 0, off, &clk) == 0; off++) { err = clk_enable(clk); if (err != 0) { device_printf(dev, "Could not enable clock %s\n", @@ -174,7 +174,7 @@ generic_ohci_attach(device_t dev) } /* De-assert reset */ - if (hwreset_get_by_ofw_idx(dev, 0, &sc->rst) == 0) { + if (hwreset_get_by_ofw_idx(dev, 0, 0, &sc->rst) == 0) { err = hwreset_deassert(sc->rst); if (err != 0) { device_printf(dev, "Could not de-assert reset %d\n", @@ -184,7 +184,7 @@ generic_ohci_attach(device_t dev) } /* Enable phy */ - if (phy_get_by_ofw_name(dev, "usb", &sc->phy) == 0) { + if (phy_get_by_ofw_name(dev, 0, "usb", &sc->phy) == 0) { err = phy_enable(dev, sc->phy); if (err != 0) { device_printf(dev, "Could not enable phy\n"); -- cgit v1.3