[PATCH 2/4] ARM: S3C24XX: Add plaform device definition for USB High-Speed gadget controller.

Sergei Shtylyov sshtylyov at mvista.com
Sun May 8 07:17:52 EDT 2011


Hello.

On 08-05-2011 0:26, Heiko Stübner wrote:

> From: Thomas Abraham<thomas.ab at samsung.com>

> 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<thomas.ab at samsung.com>
> Signed-off-by: Sangbeom Kim<sbkim73 at samsung.com>
[...]

> 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



More information about the linux-arm-kernel mailing list