From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov Subject: Re: [PATCH 2/4] ARM: S3C24XX: Add plaform device definition for USB High-Speed gadget controller. Date: Sun, 08 May 2011 15:17:52 +0400 Message-ID: <4DC67BE0.9080905@ru.mvista.com> References: <20110416145830.GA8811@kroah.com> <201105072223.44163.heiko@sntech.de> <201105072226.53556.heiko@sntech.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mail-ew0-f46.google.com ([209.85.215.46]:51307 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753767Ab1EHLTg (ORCPT ); Sun, 8 May 2011 07:19:36 -0400 In-Reply-To: <201105072226.53556.heiko@sntech.de> Sender: linux-samsung-soc-owner@vger.kernel.org List-Id: linux-samsung-soc@vger.kernel.org To: =?ISO-8859-1?Q?Heiko_St=FCbner?= Cc: Greg KH , Alan Stern , Kukjin Kim , Ben Dooks , Thomas Abraham , Sangbeom Kim , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-usb@vger.kernel.org, Alexander Neumann Hello. On 08-05-2011 0:26, Heiko St=FCbner wrote: > From: Thomas Abraham > S3C2416, S3C2443 and S3C2450 includes a USB High-Speed Gadget control= ler module. > This patch adds the following for supporting this controller. > 1. Definition for USB High-Speed controller base address. > 2. Platform device instantiation. > 3. Declaration for platform data structure. > 4. Functionality to setup platform data for the controller. > Signed-off-by: Thomas Abraham > Signed-off-by: Sangbeom Kim [...] > diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/dev= s.c > index 268f3ed..7366799 100644 > --- a/arch/arm/plat-s3c24xx/devs.c > +++ b/arch/arm/plat-s3c24xx/devs.c [...] > @@ -233,6 +234,46 @@ void __init s3c24xx_udc_set_platdata(struct s3c2= 410_udc_mach_info *pd) [...] > +void __init s3c24xx_hsudc_set_platdata(struct s3c24xx_hsudc_platdata= *pd) > +{ > + struct s3c24xx_hsudc_platdata *npd; > + > + npd =3D kmalloc(sizeof(*npd), GFP_KERNEL); > + if (npd) { > + memcpy(npd, pd, sizeof(*npd)); You could use kmemdup() (from mm/util.c) instead... WBR, Sergei From mboxrd@z Thu Jan 1 00:00:00 1970 From: sshtylyov@mvista.com (Sergei Shtylyov) Date: Sun, 08 May 2011 15:17:52 +0400 Subject: [PATCH 2/4] ARM: S3C24XX: Add plaform device definition for USB High-Speed gadget controller. In-Reply-To: <201105072226.53556.heiko@sntech.de> References: <20110416145830.GA8811@kroah.com> <201105072223.44163.heiko@sntech.de> <201105072226.53556.heiko@sntech.de> Message-ID: <4DC67BE0.9080905@ru.mvista.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hello. On 08-05-2011 0:26, Heiko St?bner wrote: > From: Thomas Abraham > S3C2416, S3C2443 and S3C2450 includes a USB High-Speed Gadget controller module. > This patch adds the following for supporting this controller. > 1. Definition for USB High-Speed controller base address. > 2. Platform device instantiation. > 3. Declaration for platform data structure. > 4. Functionality to setup platform data for the controller. > Signed-off-by: Thomas Abraham > Signed-off-by: Sangbeom Kim [...] > diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c > index 268f3ed..7366799 100644 > --- a/arch/arm/plat-s3c24xx/devs.c > +++ b/arch/arm/plat-s3c24xx/devs.c [...] > @@ -233,6 +234,46 @@ void __init s3c24xx_udc_set_platdata(struct s3c2410_udc_mach_info *pd) [...] > +void __init s3c24xx_hsudc_set_platdata(struct s3c24xx_hsudc_platdata *pd) > +{ > + struct s3c24xx_hsudc_platdata *npd; > + > + npd = kmalloc(sizeof(*npd), GFP_KERNEL); > + if (npd) { > + memcpy(npd, pd, sizeof(*npd)); You could use kmemdup() (from mm/util.c) instead... WBR, Sergei