[lkml]   [2022]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2] iio: trigger: warn about non-registered iio trigger getting attempt
On Mon, Jun 6, 2022 at 1:23 PM Dmitry Rokosov <> wrote:
> As a part of patch series about wrong trigger register() and get()
> calls order in the some IIO drivers trigger initialization path:
> runtime WARN() is added to alarm IIO driver authors who make such
> a mistake.
> When IIO driver allocates a new IIO trigger, it should register it before

an IIO

> calling the get() operation. In other words, each IIO driver must abide by
> IIO trigger alloc()/register()/get() calls order.

I believe triggers usually acquired at ->probe() time, means that in
case if the following code (however, I believe it will be quite rare)
goes into deferred probe cycle the WARN will be repeated. Perhaps

With Best Regards,
Andy Shevchenko

 \ /
  Last update: 2022-06-06 14:47    [W:0.034 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site