1
0
Fork 0

usb: dwc3: core: remove unnecessary alignment

Kernel will give us page aligned memory anyway.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
hifive-unleashed-5.1
Felipe Balbi 2016-10-14 16:28:32 +03:00
parent 941f918ecf
commit 3b2733227f
1 changed files with 2 additions and 6 deletions

View File

@ -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)
{
struct device *dev = &pdev->dev;
@ -962,13 +960,11 @@ static int dwc3_probe(struct platform_device *pdev)
int ret;
void __iomem *regs;
void *mem;
mem = devm_kzalloc(dev, sizeof(*dwc) + DWC3_ALIGN_MASK, GFP_KERNEL);
if (!mem)
dwc = devm_kzalloc(dev, sizeof(*dwc), GFP_KERNEL);
if (!dwc)
return -ENOMEM;
dwc = PTR_ALIGN(mem, DWC3_ALIGN_MASK + 1);
dwc->dev = dev;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);