Re: [PATCH 6/6 v2] usb: musb: Add support for ti81xx platform

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux