On Wed, Oct 31, 2012 at 8:00 PM, Felipe Balbi <balbi@xxxxxx> wrote: > Hi, > > On Wed, Oct 31, 2012 at 07:45:53PM +0530, Rajaram R wrote: >> On Tue, Oct 23, 2012 at 11:42 AM, Wei Yongjun <weiyj.lk@xxxxxxxxx> wrote: >> > commit 65b3d52d02a558fbfe08e43688e15390c5ab3067 >> > (usb: musb: add musb_ida for multi instance support) >> > used musbid in ux500_remove() but nerver declared it. >> >> The above message doesnot match with your fix. You say ux500_remove is >> using musbhid but build error is in probe. >> >> I also dont see anywhere in the code we use this variable musbid. > > -ECONFUSED: :-) No.. This patch could have been avoided if a build test was done when the original patch pushed this change... !! Anyway I can send a patch correcting the text if required... > > static int __devinit ux500_probe(struct platform_device *pdev) > { > struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; > struct platform_device *musb; > struct ux500_glue *glue; > struct clk *clk; > int musbid; > int ret = -ENOMEM; > > glue = kzalloc(sizeof(*glue), GFP_KERNEL); > if (!glue) { > dev_err(&pdev->dev, "failed to allocate glue context\n"); > goto err0; > } > > /* get the musb id */ > musbid = musb_get_id(&pdev->dev, GFP_KERNEL); > if (musbid < 0) { > dev_err(&pdev->dev, "failed to allocate musb id\n"); > ret = -ENOMEM; > goto err1; > } > > musb = platform_device_alloc("musb-hdrc", musbid); > if (!musb) { > dev_err(&pdev->dev, "failed to allocate musb device\n"); > goto err2; > } > > clk = clk_get(&pdev->dev, "usb"); > if (IS_ERR(clk)) { > dev_err(&pdev->dev, "failed to get clock\n"); > ret = PTR_ERR(clk); > goto err3; > } > > ret = clk_enable(clk); > if (ret) { > dev_err(&pdev->dev, "failed to enable clock\n"); > goto err4; > } > > musb->id = musbid; > musb->dev.parent = &pdev->dev; > musb->dev.dma_mask = pdev->dev.dma_mask; > musb->dev.coherent_dma_mask = pdev->dev.coherent_dma_mask; > > glue->dev = &pdev->dev; > glue->musb = musb; > glue->clk = clk; > > pdata->platform_ops = &ux500_ops; > > platform_set_drvdata(pdev, glue); > > ret = platform_device_add_resources(musb, pdev->resource, > pdev->num_resources); > if (ret) { > dev_err(&pdev->dev, "failed to add resources\n"); > goto err5; > } > > ret = platform_device_add_data(musb, pdata, sizeof(*pdata)); > if (ret) { > dev_err(&pdev->dev, "failed to add platform_data\n"); > goto err5; > } > > ret = platform_device_add(musb); > if (ret) { > dev_err(&pdev->dev, "failed to register musb device\n"); > goto err5; > } > > return 0; > > err5: > clk_disable(clk); > > err4: > clk_put(clk); > > err3: > platform_device_put(musb); > > err2: > musb_put_id(&pdev->dev, musbid); > > err1: > kfree(glue); > > err0: > return ret; > } > > -- > balbi -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html