]> git.karo-electronics.de Git - linux-beck.git/commitdiff
usb: dwc3: core: remove unnecessary alignment
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Fri, 14 Oct 2016 13:28:32 +0000 (16:28 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 3 Nov 2016 08:38:34 +0000 (10:38 +0200)
Kernel will give us page aligned memory anyway.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/core.c

index e65f30afb89a4bafa7a487dad8b8c92ad09136cb..1f33abf21e0f1425a9570e0890bf985ee5c57042 100644 (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);