[PATCH] usb: gadget: udc: use USB API functions rather than constants

2014-08-23 Thread Himangi Saraogi
num(epd) @@ struct usb_endpoint_descriptor *epd; @@ - (epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) + usb_endpoint_type(epd) Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/usb/gadget/udc/r8a66597-udc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH] usb: phy: drop kfree of devm_kzalloc's data

2014-08-10 Thread Himangi Saraogi
Using kfree to free data allocated with devm_kzalloc causes double frees. The Coccinelle semantic patch that fixes this problem is as follows: // @@ expression x; @@ x = devm_kzalloc(...) ... ?-kfree(x); // Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/usb/phy/phy-gpio

[PATCH] fotg210: Use managed interfaces for allocation of resources

2014-07-01 Thread Himangi Saraogi
IORESOURCE_IO is removed as it allocates memory that is not needed. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/usb/host/fotg210-hcd.c | 48 -- 1 file changed, 9 insertions(+), 39 deletions(-) diff --git a/drivers/usb/host/fotg210

[PATCH] USB: oxu210hp-hcd.c: use devm_ functions

2014-06-29 Thread Himangi Saraogi
allocated memory in the probe and remove functions are done away with. Some labels are removed and a label error is added to make is less specific to the context. The debug message is removed as devm_ioremap generates debug messages of its own. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall

[PATCH] usb: host: ohci-tmio: Use managed interfaces for resource allocation

2014-06-28 Thread Himangi Saraogi
label err added to make it less specific to the context. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/usb/host/ohci-tmio.c | 36 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/drivers/usb/host/ohci-tmio.c b/drivers/usb

[PATCH] usb: gadget: pxa25x_udc: use devm_ functions

2014-06-22 Thread Himangi Saraogi
done away with and the name of the label err_gpio_pullup is changed to make it less specific to the context. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/usb/gadget/pxa25x_udc.c | 73 + 1 file changed, 22 insertions(+), 51 deletions

[PATCH] usb: musb: ux500: use devm_ functions

2014-06-20 Thread Himangi Saraogi
This patch introduces the use of managed interfaces for clk_get and kzalloc and removes the corresponding free function calls in the probe and remove functions. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/usb/musb/ux500.c | 28 ++-- 1 file changed

[PATCH] usb: host: xhci-plat: use devm_functions

2014-06-20 Thread Himangi Saraogi
This patch introduces the use of managed interface devm_ioremap_resource for ioremap_nocache and request_mem_region and removes the corresponding free functions in the probe and remove functions. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/usb/host/xhci-plat.c | 24

[PATCH] usb: host: xhci-plat: use devm_functions

2014-06-20 Thread Himangi Saraogi
This patch introduces the use of managed interface devm_ioremap_resource for ioremap_nocache and request_mem_region and removes the corresponding free functions in the probe and remove functions. Signed-off-by: Himangi Saraogi --- drivers/usb/host/xhci-plat.c | 25 + 1

[PATCH v2] net/nxp/lpc_eth: use devm_ functions

2014-06-19 Thread Himangi Saraogi
are removed and many labels are done away with. Also, linux/device.h is added to make sure the devm_*() routine declarations are unambiguously available. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- v2: refreshed and sent again as failed to apply drivers/net/ethernet/nxp/lpc_eth.c

[PATCH] usb: gadget: fsl_qe_udc: Introduce use of managed version of kzalloc

2014-06-14 Thread Himangi Saraogi
+ e = devm_kzalloc(&pdev->dev, e1, e2) ... ?-kfree(e); ...+> } @rem depends on prb@ identifier platform.removefn; expression e; @@ removefn(...) { <... - kfree(e); ...> } Signed-off-by: Himangi Saraogi --- Not compile tested due to incompatible architecture. drivers/usb/gadge

[PATCH v2] uhci-platform: use devm_ioremap resource

2014-06-11 Thread Himangi Saraogi
with and linux/device.h is added to make sure the devm_*() outine declarations are unambiguously available. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- v2: pass correct arguments to devm_ioremap_resource Not compile tested due to incompatible architecture. drivers/usb/host/uhci

[PATCH v3] usb: host: uhci-grlib.c : use devm_ functions

2014-06-11 Thread Himangi Saraogi
done away with. Also, linux/device.h is added to make sure the devm_*() routine declarations are unambiguously available. Signed-off-by: Himangi Saraogi --- Not compile tested due to incompatible architecture. v3: pass correct arguments to devm_ioremap_resource drivers/usb/host/uhci-grlib.c

[PATCH] usb: host: uhci-grlib.c : use devm_ functions

2014-06-08 Thread Himangi Saraogi
done away with. Also, linux/device.h is added to make sure the devm_*() routine declarations are unambiguously available. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/usb/host/uhci-grlib.c | 26 +++--- 1 file changed, 7 insertions(+), 19 deletions

[PATCH] uhci-platform: use devm_ioremap resource

2014-06-08 Thread Himangi Saraogi
with and linux/device.h is added to make sure the devm_*() outine declarations are unambiguously available. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- Not compile tested due to incompatible architecture. drivers/usb/host/uhci-platform.c | 23 ++- 1 file

[PATCH] usb: phy: phy-gpio-vbus-usb: use devm_ functions

2014-06-03 Thread Himangi Saraogi
corresponding free functions are removed and the labels are done away with. Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- drivers/usb/phy/phy-gpio-vbus-usb.c | 45 +++-- 1 file changed, 13 insertions(+), 32 deletions(-) diff --git a/drivers/usb/phy/phy

[PATCH 1/2] usb: gadget: mv_u3d_core: Correct clk_disable twice

2014-06-03 Thread Himangi Saraogi
There is a call to clk_disable a few lines before the goto err_alloc_ep_context. The clk goes not get enabled anywhere after that so this is not required. This patch fixes the bug by removing the deinit and clk_disable after the goto statement. Signed-off-by: Himangi Saraogi --- drivers/usb

[PATCH 2/2] usb: gadget: mv_u3d_core: use devm_ functions

2014-06-03 Thread Himangi Saraogi
in the remove function. The corresponding free functions are removed and many labels are done away with. Also, linux/device.h is added to make sure the devm_*() routine declarations are unambiguously available. Signed-off-by: Himangi Saraogi --- drivers/usb/gadget/mv_u3d_core.c | 128

[PATCH 0/2] Fix double clk_diable and use _devm functions

2014-06-03 Thread Himangi Saraogi
The first patch fixed the bug of calling clk_disable when the clk is not enabled and the second patch uses devm function and removes the corresponding free and error handling code and does away with all labels in the probe function. Himangi Saraogi (2): usb: gadget: mv_u3d_core: Correct

[PATCH] iusb: musb: davinci: use devm_ functions.

2014-06-02 Thread Himangi Saraogi
(struct platform_device *pdev, ...) { <+... - e = kzalloc(e1, e2) + e = devm_kzalloc(&pdev->dev, e1, e2) ... ?-kfree(e); ...+> } @rem depends on prb@ identifier platform.removefn; expression e; @@ removefn(...) { <... - kfree(e); ...> } Signed-off-by: Himangi Sarao

[PATCH] usb: musb: tusb6010: Introduce the use of the managed version of kzalloc

2014-06-02 Thread Himangi Saraogi
, ...) { <+... - e = kzalloc(e1, e2) + e = devm_kzalloc(&pdev->dev, e1, e2) ... ?-kfree(e); ...+> } @rem depends on prb@ identifier platform.removefn; expression e; @@ removefn(...) { <... - kfree(e); ...> } Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --

[PATCH] usb: musb/backfin: Introduce the use of the managed version of kzalloc

2014-06-01 Thread Himangi Saraogi
ev, e1, e2) ... ?-kfree(e); ...+> } @rem depends on prb@ identifier platform.removefn; expression e; @@ removefn(...) { <... - kfree(e); ...> } Signed-off-by: Himangi Saraogi Acked-by: Julia Lawall --- Not compile tested due to incompatible architechture. why is platform_device_alloc ca