Re: [PATCH 3/3] iio: chemical: Add OF match table for CCS811 VOC sensor

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

 



On Mon, Apr 13, 2020 at 10:23 AM <mani@xxxxxxxxxx> wrote:
>
> From: Manivannan Sadhasivam <mani@xxxxxxxxxx>
>
> Add devicetree OF match table support for CCS811 VOC sensor.

...

> +#include <linux/of.h>

Why?

...

> +static const struct of_device_id ccs811_dt_ids[] = {
> +       { .compatible = "ams,ccs811" },
> +       { }
> +};
> +MODULE_DEVICE_TABLE(of, ccs811_dt_ids);

Since it has no ugly ifdeffery...

>  static struct i2c_driver ccs811_driver = {
>         .driver = {
>                 .name = "ccs811",
> +               .of_match_table = of_match_ptr(ccs811_dt_ids),

...use of of_match_ptr() brings a compiler warning.

Drop of_match_ptr() for good. And thus drop redundant of.h.

>         },

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux