On Tue, Mar 14, 2017 at 4:16 PM, Javier Martinez Canillas
<[email protected]> wrote:
> +static const struct of_device_id ds1682_of_match[] = {
> + { .compatible = "dallas,ds1682", },
> + {}
> +};
> +MODULE_DEVICE_TABLE(of, ds1682_of_match);
> +
> static struct i2c_driver ds1682_driver = {
> .driver = {
> .name = "ds1682",
> + .of_match_table = of_match_ptr(ds1682_of_match),
> },
> .probe = ds1682_probe,
> .remove = ds1682_remove,
This will cause a warning if CONFIG_OF is disabled, since ds1682_of_match
becomes unused in this case. Please remove the of_match_ptr() around
the reference to ds1682_of_match.
Arnd