diff options
| author | Roland Stigge <stigge@antcom.de> | 2012-04-29 10:47:03 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-01 13:30:01 -0400 |
| commit | 2265efea38c45ba42a4e483eee11740730f053d2 (patch) | |
| tree | f4049c53c5e3653cc7e6a7374a869ede2cdd46c3 /drivers/usb/host | |
| parent | a6a99cf0713c5336ad564b055d4ed34537700df4 (diff) | |
ohci-nxp: Device tree support
This patch adds device tree support to ohci-nxp.c
Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
| -rw-r--r-- | drivers/usb/host/ohci-nxp.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c index 63261f7c2f79..bf542e7e2b1c 100644 --- a/drivers/usb/host/ohci-nxp.c +++ b/drivers/usb/host/ohci-nxp.c | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
| 23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
| 24 | #include <linux/i2c.h> | 24 | #include <linux/i2c.h> |
| 25 | #include <linux/of.h> | ||
| 25 | 26 | ||
| 26 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
| 27 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
| @@ -525,10 +526,19 @@ static int usb_hcd_nxp_remove(struct platform_device *pdev) | |||
| 525 | /* work with hotplug and coldplug */ | 526 | /* work with hotplug and coldplug */ |
| 526 | MODULE_ALIAS("platform:usb-ohci"); | 527 | MODULE_ALIAS("platform:usb-ohci"); |
| 527 | 528 | ||
| 529 | #ifdef CONFIG_OF | ||
| 530 | static const struct of_device_id usb_hcd_nxp_match[] = { | ||
| 531 | { .compatible = "nxp,ohci-nxp" }, | ||
| 532 | {}, | ||
| 533 | }; | ||
| 534 | MODULE_DEVICE_TABLE(of, usb_hcd_nxp_match); | ||
| 535 | #endif | ||
| 536 | |||
| 528 | static struct platform_driver usb_hcd_nxp_driver = { | 537 | static struct platform_driver usb_hcd_nxp_driver = { |
| 529 | .driver = { | 538 | .driver = { |
| 530 | .name = "usb-ohci", | 539 | .name = "usb-ohci", |
| 531 | .owner = THIS_MODULE, | 540 | .owner = THIS_MODULE, |
| 541 | .of_match_table = of_match_ptr(usb_hcd_nxp_match), | ||
| 532 | }, | 542 | }, |
| 533 | .probe = usb_hcd_nxp_probe, | 543 | .probe = usb_hcd_nxp_probe, |
| 534 | .remove = usb_hcd_nxp_remove, | 544 | .remove = usb_hcd_nxp_remove, |
