[PATCH RESEND 3/4] usb: phy-tegra-usb: use platform_{get,set}_drvdata()

2013-08-29 Thread Libo Chen
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &of->dev, so we can directly pass a struct platform_device. Signed-off-by: Libo Chen --- drivers/usb/phy/phy-tegra-usb.c |2 +- 1 files cha

[PATCH RESEND 2/4] usb: r8a66597-hcd: use platform_{get,set}_drvdata()

2013-08-29 Thread Libo Chen
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &of->dev, so we can directly pass a struct platform_device. Signed-off-by: Libo Chen --- drivers/usb/host/r8a66597-hcd.c |4 ++-- 1 files cha

Re: [PATCH 2/4] usb: r8a66597-hcd: use platform_{get,set}_drvdata()

2013-08-28 Thread Libo Chen
On 2013/8/28 12:36, Greg KH wrote: > On Tue, Aug 27, 2013 at 04:10:22PM +0800, Libo Chen wrote: >> >> Use the wrapper functions for getting and setting the driver data using >> platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, >>

Re: [PATCH 2/4] usb: r8a66597-hcd: use platform_{get,set}_drvdata()

2013-08-27 Thread Libo Chen
On 2013/8/28 12:36, Greg KH wrote: > On Tue, Aug 27, 2013 at 04:10:22PM +0800, Libo Chen wrote: >> >> Use the wrapper functions for getting and setting the driver data using >> platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, >>

[PATCH 1/4] usb: fotg210-udc: use platform_{get,set}_drvdata()

2013-08-27 Thread Libo Chen
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Signed-off-by: Libo Chen --- drivers/usb/gadget/fotg210-udc.c |4 ++-- 1 files cha

[PATCH 0/4] usb: use platform_{get,set}_drvdata()

2013-08-27 Thread Libo Chen
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Libo Chen (4): usb: fotg210-udc: use platform_{get,set}_drvdata() usb: r8a66597-h

[PATCH 4/4] usb: renesas_usbhs: use platform_{get,set}_drvdata()

2013-08-27 Thread Libo Chen
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Signed-off-by: Libo Chen --- drivers/usb/renesas_usbhs/common.c |2 +- 1 files cha

[PATCH 3/4] usb: phy-tegra-usb: use platform_{get,set}_drvdata()

2013-08-27 Thread Libo Chen
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Signed-off-by: Libo Chen --- drivers/usb/phy/phy-tegra-usb.c |2 +- 1 files cha

[PATCH 2/4] usb: r8a66597-hcd: use platform_{get,set}_drvdata()

2013-08-27 Thread Libo Chen
Use the wrapper functions for getting and setting the driver data using platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev, so we can directly pass a struct platform_device. Signed-off-by: Libo Chen --- drivers/usb/host/r8a66597-hcd.c |4 ++-- 1 files cha

[PATCH] usb: ohci-at91: remove unnecessary dev_set_drvdata()

2013-08-26 Thread Libo Chen
Unnecessary dev_set_drvdata() is removed, because the driver core clears the driver data to NULL after device_release or on probe failure. Signed-off-by: Libo Chen --- drivers/usb/host/ohci-at91.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ohci

Re: [PATCH v2] usb: omap2430: fix memleak in err case

2013-05-28 Thread Libo Chen
On 2013/5/29 1:40, Sergei Shtylyov wrote: > Hello. > > On 22-05-2013 7:30, Libo Chen wrote: > >> when omap_get_control_dev faild, we should release related platform_device > >> * Changelog from v1: >> * fix spell: s/fail/fails/, s/relational/related/ , t

Re: [PATCH v2] usb: omap2430: fix memleak in err case

2013-05-28 Thread Libo Chen
On 2013/5/28 23:34, Andy Shevchenko wrote: > No go. > > Check the 4b7e450fb5cefb5865c77999a675330206ab3b8a > And update you tree, please. > > -- > With Best Regards, > Andy Shevchenko > > It had been changed :( Thanks, Libo -- To unsubscribe from this list: send the line "unsubscribe linux-

Re: [PATCH v2] usb: omap2430: fix memleak in err case

2013-05-28 Thread Libo Chen
ping... On 2013/5/22 11:30, Libo Chen wrote: > > when omap_get_control_dev faild, we should release related platform_device > > * Changelog from v1: > * fix spell: s/fail/fails/, s/relational/related/ , thank Sergei > > > Signed-off-by: Libo Chen > --- >

[PATCH 13/24] drivers/uwb/whci: Convert to module_pci_driver

2013-05-26 Thread Libo Chen
use module_pci_driver instead of init/exit, make code clean. Signed-off-by: Libo Chen --- drivers/uwb/whci.c | 13 + 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/drivers/uwb/whci.c b/drivers/uwb/whci.c index f48093e..deeeba4 100644 --- a/drivers/uwb/whci.c +++ b

[PATCH v2] usb: omap2430: fix memleak in err case

2013-05-21 Thread Libo Chen
when omap_get_control_dev faild, we should release related platform_device * Changelog from v1: * fix spell: s/fail/fails/, s/relational/related/ , thank Sergei Signed-off-by: Libo Chen --- drivers/usb/musb/omap2430.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions

Re: [PATCH 00/19] driver:usb&net: add missing platform_driver owner

2013-05-21 Thread Libo Chen
On 2013/5/21 17:06, Thomas Petazzoni wrote: > Dear Gu Zheng, > > On Tue, 21 May 2013 16:00:19 +0800, Gu Zheng wrote: > >>> Or, maybe make the existing module_platform_driver() macro do this? >> >> But not all the modules use module_platform_driver() macro to replace the >> module init/exit. > >

Re: [PATCH 00/19] driver:usb&net: add missing platform_driver owner

2013-05-21 Thread Libo Chen
On 2013/5/21 16:00, Gu Zheng wrote: > On 05/21/2013 02:41 PM, Thomas Petazzoni wrote: > >> Dear David Miller, >> >> On Mon, 20 May 2013 23:26:19 -0700 (PDT), David Miller wrote: >>> From: Libo Chen >>> Date: Tue, 21 May 2013 10:42:00 +0800 >

[PATCH 06/19] drivers/usb/phy: add missing platform_driver owner

2013-05-20 Thread Libo Chen
set the owner of platform_driver, to ensure that the caller of driver holds a module refernece Signed-off-by: Libo Chen --- drivers/usb/phy/phy-rcar-usb.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/usb/phy/phy-rcar-usb.c b/drivers/usb/phy/phy-rcar-usb.c

[PATCH 02/19] drivers/usb/host: add missing platform_driver owner

2013-05-20 Thread Libo Chen
set the owner of platform_driver, to ensure that the caller of driver holds a module refernece Signed-off-by: Libo Chen --- drivers/usb/host/ehci-atmel.c |1 + drivers/usb/host/ehci-msm.c |1 + drivers/usb/host/ehci-mv.c |1 + drivers/usb/host/ehci-mxc.c |1

[PATCH 04/19] drivers/usb/dwc3: add missing platform_driver owner

2013-05-20 Thread Libo Chen
set the owner of platform_driver, to ensure that the caller of driver holds a module refernece Signed-off-by: Libo Chen --- drivers/usb/dwc3/core.c|1 + drivers/usb/dwc3/dwc3-exynos.c |1 + drivers/usb/dwc3/dwc3-omap.c |1 + 3 files changed, 3 insertions(+), 0 deletions

[PATCH 07/19] drivers/usb/gadget: add missing platform_driver owner

2013-05-20 Thread Libo Chen
set the owner of platform_driver, to ensure that the caller of driver holds a module refernece Signed-off-by: Libo Chen --- drivers/usb/gadget/r8a66597-udc.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597

[PATCH 01/19] drivers/usb/musb: add missing platform_driver owner

2013-05-20 Thread Libo Chen
set the owner of platform_driver, to ensure that the caller of driver holds a module refernece Signed-off-by: Libo Chen --- drivers/usb/musb/am35x.c|1 + drivers/usb/musb/blackfin.c |1 + drivers/usb/musb/da8xx.c|1 + drivers/usb/musb/davinci.c |1 + drivers/usb/musb

[PATCH 00/19] driver:usb&net: add missing platform_driver owner

2013-05-20 Thread Libo Chen
I find a lot of mistakes using struct platform_driver without owner. So I pick up some of them including usb and net modules Libo Chen (19): drivers/usb/musb: add missing platform_driver owner drivers/usb/host: add missing platform_driver owner drivers/usb/chipidea: add missing

[PATCH 03/19] drivers/usb/chipidea: add missing platform_driver owner

2013-05-20 Thread Libo Chen
set the owner of platform_driver, to ensure that the caller of driver holds a module refernece Signed-off-by: Libo Chen --- drivers/usb/chipidea/ci13xxx_msm.c |2 +- drivers/usb/chipidea/core.c|1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/usb

[PATCH 05/19] drivers/ust/renesas_usbhs: add missing platform_driver owner

2013-05-20 Thread Libo Chen
set the owner of platform_driver, to ensure that the caller of driver holds a module refernece Signed-off-by: Libo Chen --- drivers/usb/renesas_usbhs/common.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs

Re: [PATCH 4/4] usb: tilegx: fix memleak when create hcd fail

2013-05-16 Thread Libo Chen
Hi Greg, On 2013/5/17 8:34, Greg KH wrote: > On Thu, May 09, 2013 at 12:58:11PM +0800, Libo Chen wrote: >> From: Libo Chen >> >> When usb_create_hcd fail, we should call gxio_usb_host_destroy >> >> Signed-off-by: Libo Chen >> --- >> drivers/usb/

Re: [PATCH] usb: gadget: s3c2410: fix clk resource leak and update

2013-05-11 Thread Libo Chen
于 2013-5-11 18:15, Tomasz Figa 写道: Hi Libo, On Saturday 11 of May 2013 14:28:15 Libo Chen wrote: >From: Libo Chen The patch subject is slightly misleading. It suggests that the patch only changes clock handling, but in fact the biggest part of the patch is conversion to devm_ helpers.

[PATCH] usb: gadget: s3c2410: fix clk resource leak and update

2013-05-10 Thread Libo Chen
From: Libo Chen currently, when clk_get(NULL,"usb-device") fail, it does not disable && put usb_bus_clock. It is incorrect. this patch use new interface devm_xxx instead of xxx then we no need to care about cleanup resource in err case that is boring and reduce code size. S

[RFC PATCH] usb: fsl: add missing platform_driver owner

2013-05-10 Thread Libo Chen
From: Libo Chen set the owner of platform_driver, to ensure that the caller of driver holds a module refernece Signed-off-by: Libo Chen --- drivers/usb/host/ehci-fsl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index 3be3df2

[PATCH v2] usb: ohci: fix goto wrong tag in err case

2013-05-09 Thread Libo Chen
fix goto wrong tag in usb_hcd_nxp_probe * Changelog from v1: * instead of all these statement labels suggested by Alan Stern Signed-off-by: Libo Chen --- drivers/usb/host/ohci-nxp.c | 46 +- 1 files changed, 23 insertions(+), 23 deletions(-) diff

Re: [PATCH RESEND 4/4] usb: tilegx: fix memleak when create hcd fail

2013-05-09 Thread Libo Chen
On 2013/5/10 9:09, Libo Chen wrote: > On 2013/5/10 2:02, Chris Metcalf wrote: >> On 5/9/2013 2:08 AM, Libo Chen wrote: >>> When usb_create_hcd fail, we should call gxio_usb_host_destroy >>> >>> Signed-off-by: Libo Chen >>> --- >>> driv

Re: [PATCH RESEND 4/4] usb: tilegx: fix memleak when create hcd fail

2013-05-09 Thread Libo Chen
On 2013/5/10 2:02, Chris Metcalf wrote: > On 5/9/2013 2:08 AM, Libo Chen wrote: >> When usb_create_hcd fail, we should call gxio_usb_host_destroy >> >> Signed-off-by: Libo Chen >> --- >> drivers/usb/host/ohci-tilegx.c |7 +-- >> 1 file

[PATCH RESEND 4/4] usb: tilegx: fix memleak when create hcd fail

2013-05-08 Thread Libo Chen
When usb_create_hcd fail, we should call gxio_usb_host_destroy Signed-off-by: Libo Chen --- drivers/usb/host/ohci-tilegx.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ohci-tilegx.c b/drivers/usb/host/ohci-tilegx.c index 1ae7b28..5888fc4 100644

[PATCH RESEND 0/4] usb: fix four memleak

2013-05-08 Thread Libo Chen
change address from "Libo Chen " to "Libo Chen " fix four goto wrong tag, avoid memleak Libo Chen (4): usb: ehci-s5p: fix memleak when devm_usb_get_phy fail usb: isp1760-if: fix memleak when platform_get_resource fail usb: ohci: fix goto wrong tag in err case usb:

[PATCH RESEND 2/4] usb: isp1760-if: fix memleak when platform_get_resource fail

2013-05-08 Thread Libo Chen
When platform_get_resource fail, we should release_mem_region Signed-off-by: Libo Chen --- drivers/usb/host/isp1760-if.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c index bbb791b..a13709e 100644 --- a

[PATCH RESEND 1/4] usb: ehci-s5p: fix memleak when devm_usb_get_phy fail

2013-05-08 Thread Libo Chen
When devm_usb_get_phy fail, we should free hcd Signed-off-by: Libo Chen --- drivers/usb/host/ehci-s5p.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c index 6357752..3fbab58 100644 --- a/drivers/usb/host/ehci

[PATCH RESEND 3/4] usb: ohci: fix goto wrong tag in err case

2013-05-08 Thread Libo Chen
fix goto wrong tag in usb_hcd_nxp_probe Signed-off-by: Libo Chen --- drivers/usb/host/ohci-nxp.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c index f4988fb..eb294a9 100644 --- a/drivers/usb/host

[PATCH 3/4] usb: ohci: fix goto wrong tag in err case

2013-05-08 Thread Libo Chen
From: Libo Chen fix goto wrong tag in usb_hcd_nxp_probe Signed-off-by: Libo Chen --- drivers/usb/host/ohci-nxp.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c index f4988fb..eb294a9 100644 --- a

[PATCH 1/4] usb: ehci-s5p: fix memleak when fallback to pdata

2013-05-08 Thread Libo Chen
From: Libo Chen When devm_usb_get_phy fail, we should free hcd Signed-off-by: Libo Chen --- drivers/usb/host/ehci-s5p.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c index 6357752..3fbab58 100644 --- a

[PATCH 4/4] usb: tilegx: fix memleak when create hcd fail

2013-05-08 Thread Libo Chen
From: Libo Chen When usb_create_hcd fail, we should call gxio_usb_host_destroy Signed-off-by: Libo Chen --- drivers/usb/host/ohci-tilegx.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ohci-tilegx.c b/drivers/usb/host/ohci-tilegx.c index

[PATCH 2/4] usb: isp1760-if: fix memleak when platform_get_resource fail

2013-05-08 Thread Libo Chen
From: Libo Chen When platform_get_resource fail, we should release_mem_region Signed-off-by: Libo Chen --- drivers/usb/host/isp1760-if.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c index bbb791b

[PATCH 0/4] usb: fix four memleak

2013-05-08 Thread Libo Chen
fix four goto wrong tag, avoid memleak Libo Chen (4): usb: ehci-s5p: fix memleak when fallback to pdata usb: isp1760-if: fix memleak when platform_get_resource fail usb: ohci: fix goto wrong tag in err case usb: tilegx: fix memleak when create hcd fail drivers/usb/host/ehci-s5p.c