Re: [PATCH 2/3] iio staging: make use of IIO_ST macro where easily possible

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

 



Hello,

> > saves a couple of lines for each .scan_type specification

> Sorry to say I'm against this patch as I would rather
> like to get rid of the IIO_ST macro entirely (pushing any
> such macros down into the drivers where relevant).

> The reason is precisely what you have been dealing with in
> your IIO_ST_BE patch. However thoroughly we specify a macro
> like this the chances of needing to extend it to cover new
> elements of the structure is extremely high.  When that
> happens we either end up with lots of variants of the macro
> like your IIO_ST_BE version or we end up having to add the
> additional parameters to every instance of the macro whether
> or not it matters for a particular driver.

I see the problem; the shift element (mostly 0) is an example of
a parameter that does not matter for most drivers

on the other hand, IIO_ST is quite sucessful in saving code/typing -- it 
just is not supposed to handle all initialization cases; and IIO_ST cannot 
be used for dynamic construction of channels anyway

p.

-- 

Peter Meerwald
+43-664-2444418 (mobile)
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux