On 09/06/2012 02:37 PM, Marc Kleine-Budde wrote: > Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> > --- > drivers/usb/chipidea/usbmisc_imx6q.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/usb/chipidea/usbmisc_imx6q.c b/drivers/usb/chipidea/usbmisc_imx6q.c > index edc0edd7..5989a80 100644 > --- a/drivers/usb/chipidea/usbmisc_imx6q.c > +++ b/drivers/usb/chipidea/usbmisc_imx6q.c > @@ -26,6 +26,7 @@ struct imx6q_usbmisc { > spinlock_t lock; > struct clk *clk; > struct usbmisc_usb_device usbdev[USB_DEV_MAX]; > + const struct usbmisc_ops *ops; > }; > > static struct imx6q_usbmisc *usbmisc; > @@ -78,7 +79,7 @@ static const struct usbmisc_ops imx6q_usbmisc_ops = { > }; > > static const struct of_device_id usbmisc_imx6q_dt_ids[] = { > - { .compatible = "fsl,imx6q-usbmisc"}, > + { .compatible = "fsl,imx6q-usbmisc", .data = (void *)&imx6q_usbmisc_ops }, > { /* sentinel */ } > }; > > @@ -116,8 +117,10 @@ static int __devinit usbmisc_imx6q_probe(struct platform_device *pdev) > return ret; > } > > + data->ops = (const struct usbmisc_ops *) > + of_match_device(usbmisc_imx6q_dt_ids, &pdev->dev); > usbmisc = data; > - ret = usbmisc_set_ops(&imx6q_usbmisc_ops); > + ret = usbmisc_set_ops(data->ops); > if (ret) { > usbmisc = NULL; > clk_disable_unprepare(data->clk); > @@ -129,7 +132,7 @@ static int __devinit usbmisc_imx6q_probe(struct platform_device *pdev) > > static int __devexit usbmisc_imx6q_remove(struct platform_device *pdev) > { > - usbmisc_unset_ops(&imx6q_usbmisc_ops); > + usbmisc_unset_ops(usbmisc->ops); Or maybe remove the parameter alltogether. Marc > clk_disable_unprepare(usbmisc->clk); > usbmisc = NULL; > return 0; > -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
Attachment:
signature.asc
Description: OpenPGP digital signature