Re: [PATCH v2 2/3] iio:adc:imx: add Freescale Vybrid vf610 adc driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 26, 2013 at 07:33:11AM +0000, Fugang Duan wrote:
> >> +static const struct of_device_id vf610_adc_match[] = {
> >> +	{ .compatible = "fsl,vf610-adc", .data = (void *)VF610_ADC, },
> >
> >We should .data for now, since it's currently unused.
> 
> Ok, I will change it as below.
> { .compatible = "fsl,vf610-adc", .data = (void *)0, },

The following is enough.

 { .compatible = "fsl,vf610-adc", }

<snip>

> >> +static int vf610_adc_probe(struct platform_device *pdev) {
> >> +	struct vf610_adc *info = NULL;
> >> +	struct device_node *np = pdev->dev.of_node;
> >> +	struct iio_dev *indio_dev;
> >> +	struct resource *mem;
> >> +	int ret = -ENODEV;
> >> +
> >> +	if (!np)
> >> +		return ret;
> >
> >Unnecessary check.  We will not be here at all if np is NULL.
> 
> Great. There still have many drivers do it like this.

It's unnecessary for platforms that only support DT probe, like VF610
and IMX6.

Shawn

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux