From: Tomasz Figa <tomasz.figa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
Cc: Linux USB Mailing List
<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
dahlmann.thomas-KvP5wT2u2U0@public.gmane.org,
nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org,
leoli-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
eric.y.miao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org,
haojian.zhuang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org,
kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org,
kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org,
yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org,
Linux OMAP Mailing List
<linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-geode-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [RFC/PATCH 24/32] usb: gadget: s3c-hsotg: let udc-core manage gadget->dev
Date: Thu, 24 Jan 2013 20:00:05 +0100 [thread overview]
Message-ID: <5963888.Uco7z1jaqo@flatron> (raw)
In-Reply-To: <1359042370-4358-25-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
Hi Felipe,
On Thursday 24 of January 2013 17:46:02 Felipe Balbi wrote:
> By simply setting a flag, we can drop some
> boilerplate code.
>
> Signed-off-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
> ---
> drivers/usb/gadget/s3c-hsotg.c | 14 +-------------
> 1 file changed, 1 insertion(+), 13 deletions(-)
>
> diff --git a/drivers/usb/gadget/s3c-hsotg.c
> b/drivers/usb/gadget/s3c-hsotg.c index 833d85b..bd8292d 100644
> --- a/drivers/usb/gadget/s3c-hsotg.c
> +++ b/drivers/usb/gadget/s3c-hsotg.c
> @@ -3552,17 +3552,13 @@ static int s3c_hsotg_probe(struct
> platform_device *pdev)
>
> dev_info(dev, "regs %p, irq %d\n", hsotg->regs, hsotg->irq);
>
> - device_initialize(&hsotg->gadget.dev);
> -
> - dev_set_name(&hsotg->gadget.dev, "gadget");
> -
> hsotg->gadget.max_speed = USB_SPEED_HIGH;
> hsotg->gadget.ops = &s3c_hsotg_gadget_ops;
> hsotg->gadget.name = dev_name(dev);
> -
> hsotg->gadget.dev.parent = dev;
> hsotg->gadget.dev.dma_mask = dev->dma_mask;
> hsotg->gadget.dev.release = s3c_hsotg_release;
> + hsotg->gadget.register_my_device = true;
>
> /* reset the system */
>
> @@ -3643,12 +3639,6 @@ static int s3c_hsotg_probe(struct platform_device
> *pdev)
>
> s3c_hsotg_phy_disable(hsotg);
>
> - ret = device_add(&hsotg->gadget.dev);
> - if (ret) {
> - put_device(&hsotg->gadget.dev);
> - goto err_ep_mem;
> - }
> -
> ret = usb_add_gadget_udc(&pdev->dev, &hsotg->gadget);
> if (ret)
> goto err_ep_mem;
> @@ -3687,10 +3677,8 @@ static int s3c_hsotg_remove(struct
> platform_device *pdev) }
>
> s3c_hsotg_phy_disable(hsotg);
> -
> clk_disable_unprepare(hsotg->clk);
>
> - device_unregister(&hsotg->gadget.dev);
> return 0;
> }
Looks good.
Reviewed-by: Tomasz Figa <tomasz.figa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Best regards,
Tomasz Figa
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Tomasz Figa <tomasz.figa@gmail.com>
To: Felipe Balbi <balbi@ti.com>
Cc: kgene.kim@samsung.com, eric.y.miao@gmail.com,
kuninori.morimoto.gx@renesas.com,
alexander.shishkin@linux.intel.com, gregkh@linuxfoundation.org,
yoshihiro.shimoda.uh@renesas.com,
Linux USB Mailing List <linux-usb@vger.kernel.org>,
nicolas.ferre@atmel.com, linux-geode@lists.infradead.org,
haojian.zhuang@gmail.com,
Linux OMAP Mailing List <linux-omap@vger.kernel.org>,
linux-samsung-soc@vger.kernel.org, ben-linux@fluff.org,
dahlmann.thomas@arcor.de, linux@arm.linux.org.uk,
linuxppc-dev@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC/PATCH 24/32] usb: gadget: s3c-hsotg: let udc-core manage gadget->dev
Date: Thu, 24 Jan 2013 20:00:05 +0100 [thread overview]
Message-ID: <5963888.Uco7z1jaqo@flatron> (raw)
In-Reply-To: <1359042370-4358-25-git-send-email-balbi@ti.com>
Hi Felipe,
On Thursday 24 of January 2013 17:46:02 Felipe Balbi wrote:
> By simply setting a flag, we can drop some
> boilerplate code.
>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
> drivers/usb/gadget/s3c-hsotg.c | 14 +-------------
> 1 file changed, 1 insertion(+), 13 deletions(-)
>
> diff --git a/drivers/usb/gadget/s3c-hsotg.c
> b/drivers/usb/gadget/s3c-hsotg.c index 833d85b..bd8292d 100644
> --- a/drivers/usb/gadget/s3c-hsotg.c
> +++ b/drivers/usb/gadget/s3c-hsotg.c
> @@ -3552,17 +3552,13 @@ static int s3c_hsotg_probe(struct
> platform_device *pdev)
>
> dev_info(dev, "regs %p, irq %d\n", hsotg->regs, hsotg->irq);
>
> - device_initialize(&hsotg->gadget.dev);
> -
> - dev_set_name(&hsotg->gadget.dev, "gadget");
> -
> hsotg->gadget.max_speed = USB_SPEED_HIGH;
> hsotg->gadget.ops = &s3c_hsotg_gadget_ops;
> hsotg->gadget.name = dev_name(dev);
> -
> hsotg->gadget.dev.parent = dev;
> hsotg->gadget.dev.dma_mask = dev->dma_mask;
> hsotg->gadget.dev.release = s3c_hsotg_release;
> + hsotg->gadget.register_my_device = true;
>
> /* reset the system */
>
> @@ -3643,12 +3639,6 @@ static int s3c_hsotg_probe(struct platform_device
> *pdev)
>
> s3c_hsotg_phy_disable(hsotg);
>
> - ret = device_add(&hsotg->gadget.dev);
> - if (ret) {
> - put_device(&hsotg->gadget.dev);
> - goto err_ep_mem;
> - }
> -
> ret = usb_add_gadget_udc(&pdev->dev, &hsotg->gadget);
> if (ret)
> goto err_ep_mem;
> @@ -3687,10 +3677,8 @@ static int s3c_hsotg_remove(struct
> platform_device *pdev) }
>
> s3c_hsotg_phy_disable(hsotg);
> -
> clk_disable_unprepare(hsotg->clk);
>
> - device_unregister(&hsotg->gadget.dev);
> return 0;
> }
Looks good.
Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com>
Best regards,
Tomasz Figa
WARNING: multiple messages have this Message-ID (diff)
From: tomasz.figa@gmail.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC/PATCH 24/32] usb: gadget: s3c-hsotg: let udc-core manage gadget->dev
Date: Thu, 24 Jan 2013 20:00:05 +0100 [thread overview]
Message-ID: <5963888.Uco7z1jaqo@flatron> (raw)
In-Reply-To: <1359042370-4358-25-git-send-email-balbi@ti.com>
Hi Felipe,
On Thursday 24 of January 2013 17:46:02 Felipe Balbi wrote:
> By simply setting a flag, we can drop some
> boilerplate code.
>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
> drivers/usb/gadget/s3c-hsotg.c | 14 +-------------
> 1 file changed, 1 insertion(+), 13 deletions(-)
>
> diff --git a/drivers/usb/gadget/s3c-hsotg.c
> b/drivers/usb/gadget/s3c-hsotg.c index 833d85b..bd8292d 100644
> --- a/drivers/usb/gadget/s3c-hsotg.c
> +++ b/drivers/usb/gadget/s3c-hsotg.c
> @@ -3552,17 +3552,13 @@ static int s3c_hsotg_probe(struct
> platform_device *pdev)
>
> dev_info(dev, "regs %p, irq %d\n", hsotg->regs, hsotg->irq);
>
> - device_initialize(&hsotg->gadget.dev);
> -
> - dev_set_name(&hsotg->gadget.dev, "gadget");
> -
> hsotg->gadget.max_speed = USB_SPEED_HIGH;
> hsotg->gadget.ops = &s3c_hsotg_gadget_ops;
> hsotg->gadget.name = dev_name(dev);
> -
> hsotg->gadget.dev.parent = dev;
> hsotg->gadget.dev.dma_mask = dev->dma_mask;
> hsotg->gadget.dev.release = s3c_hsotg_release;
> + hsotg->gadget.register_my_device = true;
>
> /* reset the system */
>
> @@ -3643,12 +3639,6 @@ static int s3c_hsotg_probe(struct platform_device
> *pdev)
>
> s3c_hsotg_phy_disable(hsotg);
>
> - ret = device_add(&hsotg->gadget.dev);
> - if (ret) {
> - put_device(&hsotg->gadget.dev);
> - goto err_ep_mem;
> - }
> -
> ret = usb_add_gadget_udc(&pdev->dev, &hsotg->gadget);
> if (ret)
> goto err_ep_mem;
> @@ -3687,10 +3677,8 @@ static int s3c_hsotg_remove(struct
> platform_device *pdev) }
>
> s3c_hsotg_phy_disable(hsotg);
> -
> clk_disable_unprepare(hsotg->clk);
>
> - device_unregister(&hsotg->gadget.dev);
> return 0;
> }
Looks good.
Reviewed-by: Tomasz Figa <tomasz.figa@gmail.com>
Best regards,
Tomasz Figa
next prev parent reply other threads:[~2013-01-24 19:00 UTC|newest]
Thread overview: 117+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-24 15:45 [RFC/PATCH 00/32] usb: refactor gadget->dev registration Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` [RFC/PATCH 01/32] usb: gadget: udc-core: allow udc class register gadget device Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 18:57 ` Tomasz Figa
2013-01-24 18:57 ` Tomasz Figa
2013-01-24 18:57 ` Tomasz Figa
2013-01-24 15:45 ` [RFC/PATCH 02/32] usb: dwc3: gadget: let udc-core manage gadget->dev Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
[not found] ` <1359042370-4358-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2013-01-24 15:45 ` [RFC/PATCH 03/32] usb: musb: gadget: let udc-core manage gadget-dev Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` [RFC/PATCH 04/32] usb: gadget: omap_udc: let udc-core manage gadget->dev Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` [RFC/PATCH 10/32] usb: gadget: fsl_qe_udc: " Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` [RFC/PATCH 11/32] usb: gadget: fsl_udc_core: " Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` [RFC/PATCH 15/32] usb: gadget: lpc32xx_udc: " Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` [RFC/PATCH 17/32] usb: gadget: mv_u3d_core: " Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` [RFC/PATCH 19/32] usb: gadget: mv_udc_core: " Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` [RFC/PATCH 20/32] usb: gadget: net2272: " Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:46 ` [RFC/PATCH 27/32] usb: renesas_usbhs: gadget: " Felipe Balbi
2013-01-24 15:46 ` Felipe Balbi
2013-01-24 15:46 ` Felipe Balbi
2013-01-24 15:45 ` [RFC/PATCH 05/32] usb: gadget: amd5536udc: " Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` [RFC/PATCH 06/32] usb: gadget: at91_udc: " Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` [RFC/PATCH 07/32] usb: gadget: atmel_usba_udc: " Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` [RFC/PATCH 08/32] usb: gadget: bcm63xx_udc: " Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` [RFC/PATCH 09/32] usb: gadget: dummy_hcd: " Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` [RFC/PATCH 12/32] usb: gadget: fusb300_udc: " Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` [RFC/PATCH 13/32] usb: gadget: goku_udc: " Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` [RFC/PATCH 14/32] usb: gadget: imx_udc: " Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` [RFC/PATCH 16/32] usb: gadget: m66592-udc: " Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` [RFC/PATCH 18/32] usb: gadget: mv_u3d_core: fix a compile warning Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` [RFC/PATCH 21/32] usb: gadget: net2280: let udc-core manage gadget->dev Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:45 ` Felipe Balbi
2013-01-24 15:46 ` [RFC/PATCH 22/32] usb: gadget: pch_udc: " Felipe Balbi
2013-01-24 15:46 ` Felipe Balbi
2013-01-24 15:46 ` Felipe Balbi
2013-01-24 15:46 ` [RFC/PATCH 23/32] usb: gadget: r8a66597-udc: " Felipe Balbi
2013-01-24 15:46 ` Felipe Balbi
2013-01-24 15:46 ` Felipe Balbi
2013-01-24 15:46 ` [RFC/PATCH 24/32] usb: gadget: s3c-hsotg: " Felipe Balbi
2013-01-24 15:46 ` Felipe Balbi
2013-01-24 15:46 ` Felipe Balbi
[not found] ` <1359042370-4358-25-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2013-01-24 19:00 ` Tomasz Figa [this message]
2013-01-24 19:00 ` Tomasz Figa
2013-01-24 19:00 ` Tomasz Figa
2013-01-24 15:46 ` [RFC/PATCH 25/32] usb: gadget: s3c-hsudc: " Felipe Balbi
2013-01-24 15:46 ` Felipe Balbi
2013-01-24 15:46 ` Felipe Balbi
2013-01-24 15:46 ` [RFC/PATCH 26/32] usb: gadget: s3c2410_udc: " Felipe Balbi
2013-01-24 15:46 ` Felipe Balbi
2013-01-24 15:46 ` Felipe Balbi
2013-01-24 15:46 ` [RFC/PATCH 28/32] usb: gadget: pxa25x_udc: " Felipe Balbi
2013-01-24 15:46 ` Felipe Balbi
2013-01-24 15:46 ` Felipe Balbi
2013-01-24 15:46 ` [RFC/PATCH 29/32] usb: gadget: pxa27x_udc: " Felipe Balbi
2013-01-24 15:46 ` Felipe Balbi
2013-01-24 15:46 ` Felipe Balbi
2013-01-28 20:18 ` Robert Jarzmik
2013-01-28 20:18 ` Robert Jarzmik
2013-01-28 20:18 ` Robert Jarzmik
2013-02-04 19:53 ` Felipe Balbi
2013-02-04 19:53 ` Felipe Balbi
2013-02-04 19:53 ` Felipe Balbi
2013-01-24 15:46 ` [RFC/PATCH 30/32] usb: chipidea: register debugging syfs on our device Felipe Balbi
2013-01-24 15:46 ` Felipe Balbi
2013-01-24 15:46 ` Felipe Balbi
2013-01-24 15:46 ` [RFC/PATCH 31/32] usb: chipidea: let udc-core manage gadget->dev Felipe Balbi
2013-01-24 15:46 ` Felipe Balbi
2013-01-24 15:46 ` Felipe Balbi
2013-01-24 15:46 ` [RFC/PATCH 32/32] usb: gadget: drop now unnecessary flag Felipe Balbi
2013-01-24 15:46 ` Felipe Balbi
2013-01-24 15:46 ` Felipe Balbi
2013-01-24 18:52 ` Tomasz Figa
2013-01-24 18:52 ` Tomasz Figa
2013-01-24 18:52 ` Tomasz Figa
2013-01-24 19:09 ` Felipe Balbi
2013-01-24 19:09 ` Felipe Balbi
2013-01-24 19:09 ` Felipe Balbi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5963888.Uco7z1jaqo@flatron \
--to=tomasz.figa-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=dahlmann.thomas-KvP5wT2u2U0@public.gmane.org \
--cc=eric.y.miao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=haojian.zhuang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
--cc=kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org \
--cc=leoli-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-geode-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linuxppc-dev-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org \
--cc=yoshihiro.shimoda.uh-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.