Re: [PATCH V3 3/3] pwm: pxa: add device tree support

From: Thierry Reding
Date: Wed Apr 24 2013 - 03:12:18 EST


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

Attachment: pgp00000.pgp
Description: PGP signature