Re: [PATCH v1 2/2] iio: adc: npcm: Add NPCM8XX support

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

 



Hi Andy,

Thanks for your comments, they will be addressed next version.

On Mon, 11 Jul 2022 at 17:16, Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote:
>
> On Mon, Jul 11, 2022 at 4:14 PM Andy Shevchenko
> <andy.shevchenko@xxxxxxxxx> wrote:
> > On Mon, Jul 11, 2022 at 3:59 PM Tomer Maimon <tmaimon77@xxxxxxxxx> wrote:
>
> ...
>
> > >         struct device *dev = &pdev->dev;
> > > +       const struct of_device_id *match;
>
> > > +       match = of_match_node(npcm_adc_match, pdev->dev.of_node);
> > > +       if (!match || !match->data) {
> > > +               dev_err(dev, "Failed getting npcm_adc_data\n");
> > > +               return -ENODEV;
> > > +       }
> > >
> > > +       info->data = (struct npcm_adc_info *)match->data;
> >
> > Instead of above
> >
> >   info->data = device_get_match_data(dev);
> >   if (!info->data)
>
>
> >     return -ENODEV;
>
> Or
>
>   return dev_err_probe(dev, -EINVAL, "...\n");
>
> if you want that message to be issued.
>
>
> --
> With Best Regards,
> Andy Shevchenko

Best regards,

Tomer



[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