Hi,

On Wed, Sep 07, 2011 at 10:32:25PM +0530, Ajay Kumar Gupta wrote:
> +static int __devinit dsps_probe(struct platform_device *pdev)
> +{
> +     const struct platform_device_id *id = platform_get_device_id(pdev);
> +     const struct dsps_musb_wrapper *wrp =
> +                             (struct dsps_musb_wrapper *)id->driver_data;
> +     struct dsps_glue *glue;
> +     struct resource *iomem;
> +     int ret;
> +
> +     /* allocate glue */
> +     glue = kzalloc(sizeof(*glue), GFP_KERNEL);
> +     if (!glue) {
> +             dev_err(&pdev->dev, "unable to allocate glue memory\n");
> +             ret = -ENOMEM;
> +             goto err0;
> +     }
> +
> +     /* get memory resource */
> +     iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> +     if (!iomem) {
> +             dev_err(&pdev->dev, "failed to get usbss mem resourse\n");
> +             ret = -ENODEV;
> +             goto err1;
> +     }
> +
> +     glue->dev = &pdev->dev;
> +     glue->wrp = wrp;

wrp is marked __devinitconst, so I guess you need to copy it here,
instead of just pointing to it.

-- 
balbi

Attachment: signature.asc
Description: Digital signature

Reply via email to