Should we make mark_param_change buffer implementation internal?
Hi,
Right now we have a mark_param_change callback in the buffer access functions struct, which should be called whenever the parameters (length, bytes per datum) of the buffer change. Each buffer implementation calls their own mark_param_change callback in their set_length and set_bytes_per_datum callbacks. Additionally mark_param_change gets called when the user changes the buffer length. So in this case it will get called twice.
So I'm wondering if we should make it completely buffer implementation internal and not export it in the buffer access functions struct, since the buffer implementation will probably know best anyway if one of it's parameters has changed.
- Lars
Quoted 3 lines · Lars-Peter Clausen
Hi,
Right now we have a =
mark_param_change callback in the buffer access
Quoted 1 line
functions struct, which sh=
ould be called whenever the parameters
Quoted 2 lines
(length,
bytes per datum) of the b=
uffer change. Each buffer implementation calls
Quoted 1 line
their own mark_param_change=
callback in their set_length and
Quoted 1 line
set_bytes_per_datumcallbacks. Additiona=
lly mark_param_change gets
Quoted 2 lines
called
when the user changes the buffer length=
. So in this case it will get
Quoted 4 lines
called
twice.So I'm wondering if we sho=
uld make it completely buffer implementation
Quoted 1 line
internal and not export it in=
the buffer access functions struct, since
Quoted 2 lines
the
buffer implementation will=
probably know best anyway if one of it's
Quoted 1 line
parameters has changed.
Makes s=
ense.
Quoted 4 lines
- Lars
--
To unsubscribe from this list: send the line "unsubsc=
ribe linux-iio" in
Quoted 2 lines
the body of a message to [email protected] Mor=
e majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 3 lines
Sent f= rom my Android phone with K-9 Mail. Please excuse my brevity.