diff options
author | John Youn <johnyoun@synopsys.com> | 2016-11-03 17:55:53 -0700 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-11-18 13:54:11 +0200 |
commit | bea8e86c51cf9cf637e5bf0610d14674e9115783 (patch) | |
tree | 12340f7d5354c95e6194f0d737ad41e9f6fc28f1 /drivers/usb/dwc2/platform.c | |
parent | 323230ef4ef17512007c22898b008e9fb87b372e (diff) | |
download | lwn-bea8e86c51cf9cf637e5bf0610d14674e9115783.tar.gz lwn-bea8e86c51cf9cf637e5bf0610d14674e9115783.zip |
usb: dwc2: Declare the core params struct statically
This makes it consistent with the hw_params struct and simplifies the
memory management for future refactoring. Fix up usage in all files.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc2/platform.c')
-rw-r--r-- | drivers/usb/dwc2/platform.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index c4b855b4e783..d335e3644c6f 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -418,12 +418,7 @@ static int dwc2_driver_probe(struct platform_device *dev) spin_lock_init(&hsotg->lock); - hsotg->core_params = devm_kzalloc(&dev->dev, - sizeof(*hsotg->core_params), GFP_KERNEL); - if (!hsotg->core_params) - return -ENOMEM; - - dwc2_set_all_params(hsotg->core_params, -1); + dwc2_set_all_params(&hsotg->params, -1); hsotg->irq = platform_get_irq(dev, 0); if (hsotg->irq < 0) { |