On Tue, Apr 23, 2013 at 10:23:54PM -0400, Chao Xie wrote: [...] > @@ -124,9 +128,52 @@ static struct pwm_ops pxa_pwm_ops = { > .owner = THIS_MODULE, > }; > > -static int pwm_probe(struct platform_device *pdev) > +static struct of_device_id pxa_pwm_of_match[] = { static const, please. > +#ifdef CONFIG_OF > +static int pxa_pwm_parse_data(struct platform_device *pdev, > + struct pxa_pwm_chip *pwm) > +{ > + const struct of_device_id *of_id = > + of_match_device(pxa_pwm_of_match, &pdev->dev); > + unsigned int npwm; > + > + if (!of_id) > + return -ENODEV; > + > + npwm = (unsigned int)(of_id->data); The parentheses around of_id->data are unnecessary. Thierry