On Fri, Aug 09, 2013 at 06:25:29PM +0800, Peter Chen wrote: > > -void usbmisc_unset_ops(const struct usbmisc_ops *ops) > > -{ > > - usbmisc_ops = NULL; > > -} > > -EXPORT_SYMBOL_GPL(usbmisc_unset_ops); > > - > > -int usbmisc_get_init_data(struct device *dev, struct usbmisc_usb_device *usbdev) > > +static struct imx_usbmisc_data *usbmisc_get_init_data(struct device *dev) > > { > > struct device_node *np = dev->of_node; > > struct of_phandle_args args; > > + struct imx_usbmisc_data *data; > > int ret; > > > > - usbdev->dev = dev; > > + if (!of_get_property(np, "fsl,usbmisc", NULL)) > > + return NULL; > > > > ret = of_parse_phandle_with_args(np, "fsl,usbmisc", "#index-cells", > > 0, &args); > > if (ret) { > > dev_err(dev, "Failed to parse property fsl,usbmisc, errno %d\n", > > ret); > > - memset(usbdev, 0, sizeof(*usbdev)); > > - return ret; > > + return ERR_PTR(ret); > > } > > - usbdev->index = args.args[0]; > > - of_node_put(args.np); > > Is it a bug fix? Nope, it introduces one. The of_node_put should stay there. Will fix. > > + data->usbmisc_data = usbmisc_get_init_data(&pdev->dev); > > + if (IS_ERR(data->usbmisc_data)) > > + return PTR_ERR(data->usbmisc_data); > > + > > You need to consider mx23/mx28 case which doesn't have usbmisc. The idea was that if fsl,usbmisc is not present the device doesn't need usbmisc handling, but I haven't implemented this correctly. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- 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