[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180212144157.GC12142@himanshu-Vostro-3559>
Date: Mon, 12 Feb 2018 20:11:57 +0530
From: Himanshu Jha <himanshujha199640@...il.com>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: 21cnbao@...il.com, jic23@...nel.org, devel@...verdev.osuosl.org,
lars@...afoo.de, Michael.Hennerich@...log.com,
linux-iio@...r.kernel.org, gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org, pmeerw@...erw.net, knaack.h@....de
Subject: Re: [PATCH 4/4] staging: iio: accel: Move adis16201 driver out of
staging
On Mon, Feb 12, 2018 at 04:18:26PM +0300, Dan Carpenter wrote:
> I think -M is prefered for these types of diffs? Not sure.
I wrote about that in the cover letter if you missed. :)
> On Mon, Feb 12, 2018 at 05:24:59PM +0530, Himanshu Jha wrote:
> > +static int adis16201_probe(struct spi_device *spi)
> > +{
> > + struct iio_dev *indio_dev;
> > + struct adis *st;
> > + int ret;
> > +
> > + indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
> > + if (!indio_dev)
> > + return -ENOMEM;
> > +
> > + st = iio_priv(indio_dev);
> > + spi_set_drvdata(spi, indio_dev);
> > +
> > + indio_dev->name = spi->dev.driver->name;
> > + indio_dev->dev.parent = &spi->dev;
> > + indio_dev->info = &adis16201_info;
> > +
> > + indio_dev->channels = adis16201_channels;
> > + indio_dev->num_channels = ARRAY_SIZE(adis16201_channels);
> > + indio_dev->modes = INDIO_DIRECT_MODE;
> > +
> > + ret = adis_init(st, indio_dev, spi, &adis16201_data);
> > + if (ret)
> > + return ret;
> > +
> > + ret = adis_setup_buffer_and_trigger(st, indio_dev, NULL);
> > + if (ret)
> > + return ret;
>
> We should clean up the IRQ which we enabled in adis_init() instead of
> returning directly.
I'm not sure about how to do that.
--
Thanks
Himanshu Jha
Powered by blists - more mailing lists