IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / usb / gadget / lh7a40x_udc.c
index 1a362c5e7f3d05c88fdfc66af743c30dfc067a91..179259664c18de7260c115bbe28b86c4f20739d3 100644 (file)
@@ -922,7 +922,7 @@ static void lh7a40x_reset_intr(struct lh7a40x_udc *dev)
 /*
  *     lh7a40x usb client interrupt handler.
  */
-static irqreturn_t lh7a40x_udc_irq(int irq, void *_dev, struct pt_regs *r)
+static irqreturn_t lh7a40x_udc_irq(int irq, void *_dev)
 {
        struct lh7a40x_udc *dev = _dev;
 
@@ -1114,11 +1114,10 @@ static struct usb_request *lh7a40x_alloc_request(struct usb_ep *ep,
 
        DEBUG("%s, %p\n", __FUNCTION__, ep);
 
-       req = kmalloc(sizeof *req, gfp_flags);
+       req = kzalloc(sizeof(*req), gfp_flags);
        if (!req)
                return 0;
 
-       memset(req, 0, sizeof *req);
        INIT_LIST_HEAD(&req->queue);
 
        return &req->req;
@@ -2108,7 +2107,7 @@ static int lh7a40x_udc_probe(struct platform_device *pdev)
 
        /* irq setup after old hardware state is cleaned up */
        retval =
-           request_irq(IRQ_USBINTR, lh7a40x_udc_irq, SA_INTERRUPT, driver_name,
+           request_irq(IRQ_USBINTR, lh7a40x_udc_irq, IRQF_DISABLED, driver_name,
                        dev);
        if (retval != 0) {
                DEBUG(KERN_ERR "%s: can't get irq %i, err %d\n", driver_name,
@@ -2144,7 +2143,7 @@ static int lh7a40x_udc_remove(struct platform_device *pdev)
 
 static struct platform_driver udc_driver = {
        .probe = lh7a40x_udc_probe,
-       .remove = lh7a40x_udc_remove
+       .remove = lh7a40x_udc_remove,
            /* FIXME power management support */
            /* .suspend = ... disable UDC */
            /* .resume = ... re-enable UDC */