aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Griffin <peter.griffin@linaro.org>2014-07-06 12:50:28 +0100
committerPeter Griffin <peter.griffin@linaro.org>2014-07-06 12:50:46 +0100
commit987146138af156d81b2cd4091b22f18ea8545a61 (patch)
tree76321b3ed1a385b45b5fce1c50cbf8769bc8e206
parent1d6d79faabad1ce9b99abe23a4b55e3c88ee40a3 (diff)
usb: st-hcd: Fixup ready for upstreaming.usb-st-hcd
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
-rw-r--r--drivers/usb/host/st-hcd.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/usb/host/st-hcd.c b/drivers/usb/host/st-hcd.c
index 7c889274a094..d2409d59b833 100644
--- a/drivers/usb/host/st-hcd.c
+++ b/drivers/usb/host/st-hcd.c
@@ -117,13 +117,12 @@ static struct platform_device *st_hcd_device_create(const char *name, int id,
if (ret)
goto error;
- if (!strcmp(name, "ohci")) {
+ if (!strcmp(name, "ohci"))
ret = platform_device_add_data(pdev, &ohci_pdata,
sizeof(ohci_pdata));
- } else {
+ else
ret = platform_device_add_data(pdev, &ehci_pdata,
sizeof(ehci_pdata));
- }
if (ret)
goto error;
@@ -205,16 +204,13 @@ static int st_hcd_suspend(struct device *dev)
return 0;
}
-static SIMPLE_DEV_PM_OPS(st_hcd_pm, st_hcd_suspend, st_hcd_resume);
-#define ST_HCD_PM (&st_hcd_pm)
-#else
-#define ST_HCD_PM NULL
#endif
+static SIMPLE_DEV_PM_OPS(st_hcd_pm, st_hcd_suspend, st_hcd_resume);
static struct of_device_id st_hcd_match[] = {
{ .compatible = "st,usb-300x" },
- {},
+ { /* sentinel */ },
};
MODULE_DEVICE_TABLE(of, st_hcd_match);
@@ -377,7 +373,7 @@ static struct platform_driver st_hcd_driver = {
.driver = {
.name = "st-hcd",
.owner = THIS_MODULE,
- .pm = ST_HCD_PM,
+ .pm = &st_hcd_pm,
.of_match_table = st_hcd_match,
},
};