[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <570BCCA5.7020004@intel.com>
Date: Mon, 11 Apr 2016 19:11:17 +0300
From: Crestez Dan Leonard <leonard.crestez@...el.com>
To: Peter Meerwald-Stadler <pmeerw@...erw.net>
Cc: Jonathan Cameron <jic23@...nel.org>, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org, Hartmut Knaack <knaack.h@....de>,
Lars-Peter Clausen <lars@...afoo.de>,
Daniel Baluta <daniel.baluta@...el.com>
Subject: Re: [PATCH 5/5] max44000: Initial triggered buffer support
On 04/07/2016 10:59 PM, Peter Meerwald-Stadler wrote:
>> static int max44000_probe(struct i2c_client *client,
>> const struct i2c_device_id *id)
>> {
>> @@ -513,6 +569,12 @@ static int max44000_probe(struct i2c_client *client,
>> return ret;
>> }
>>
>> + ret = iio_triggered_buffer_setup(indio_dev, NULL, max44000_trigger_handler, NULL);
>> + if (ret < 0) {
>> + dev_err(&client->dev, "iio triggered buffer setup failed\n");
>> + return ret;
>> + }
>> +
>> return iio_device_register(indio_dev);
>
> no devm_ possible anymore :-)
It's not clear to me why explicit calls to iio_triggered_buffer_cleanup
are done in every driver. Wouldn't it be possible for iio_dev_release to
call iio_triggered_buffer_cleanup? That would require
triggered_buffer_cleanup to explictly NULL the fields it deallocates so
that duplicate cleanups don't crash.
--
Regards,
Leonard
Powered by blists - more mailing lists