Kernel will give us page aligned memory anyway.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
}
}
-#define DWC3_ALIGN_MASK (16 - 1)
-
static int dwc3_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
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);