Commit 3b273322 authored by Felipe Balbi's avatar Felipe Balbi

usb: dwc3: core: remove unnecessary alignment

Kernel will give us page aligned memory anyway.
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 941f918e
...@@ -948,8 +948,6 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc) ...@@ -948,8 +948,6 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc)
} }
} }
#define DWC3_ALIGN_MASK (16 - 1)
static int dwc3_probe(struct platform_device *pdev) static int dwc3_probe(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
...@@ -962,13 +960,11 @@ static int dwc3_probe(struct platform_device *pdev) ...@@ -962,13 +960,11 @@ static int dwc3_probe(struct platform_device *pdev)
int ret; int ret;
void __iomem *regs; void __iomem *regs;
void *mem;
mem = devm_kzalloc(dev, sizeof(*dwc) + DWC3_ALIGN_MASK, GFP_KERNEL); dwc = devm_kzalloc(dev, sizeof(*dwc), GFP_KERNEL);
if (!mem) if (!dwc)
return -ENOMEM; return -ENOMEM;
dwc = PTR_ALIGN(mem, DWC3_ALIGN_MASK + 1);
dwc->dev = dev; dwc->dev = dev;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment