linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] Remove use of isvisible for attr groups that are coppied.
@ 2012-01-29 11:05 Jonathan Cameron
  2012-01-29 11:07 ` [PATCH 1/5] staging:iio:adc:ad7192 unwind use of is_visible for attribute group Jonathan Cameron
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Cameron @ 2012-01-29 11:05 UTC (permalink / raw)
  To: greg; +Cc: linux-iio, Jonathan Cameron

Hi Greg,

These are all fixes.

These patches were originally part of a series that squished the attribute
groups entirely, but whilst everyone was happy with these, the final patch
was dropped.

Anyhow, the eventual attribute groups that get registered are mostly
built from the iio_chan_spec structures. These groups are just used
to pass in bits the core doesn't handle.  This made it it rather
difficult to ensure that the is_visible function was consistent
(as it would be applied to a much larger set than apparent if we
coppied it on as is) and in the vast majority of cases its use was
trivial anyway.

If a good reason for using is_visible comes up, then the right option will be
to first verifying if the element comes from these attribute
groups that are passed in before calling the is_visible function provided
in these groups.  Anyhow, not too bad, but not currently necessary.

Even if we do put this in, these cases are easier to read (and in somecases
shorter) when not using it.

Jonathan

Jonathan Cameron (5):
  staging:iio:adc:ad7192 unwind use of is_visible for attribute group.
  staging:iio:dds:ad9834 unwind use of is_visible for attrs.
  staging:iio:dac:ad5446 unwind use of is_visible for attrs.
  staging:iio:adc:ad7606 unwind use of is_visible for attrs.
  staging:iio:adc:adt7310/7410 sticking plaster fix for broken event
    attrs.

 drivers/staging/iio/adc/ad7192.c      |   43 ++++++++++-------
 drivers/staging/iio/adc/ad7606_core.c |   83 +++++++++++++++++++++------------
 drivers/staging/iio/adc/adt7310.c     |   21 ++-------
 drivers/staging/iio/adc/adt7410.c     |   21 ++-------
 drivers/staging/iio/dac/ad5446.c      |   33 ++++---------
 drivers/staging/iio/dds/ad9834.c      |   53 +++++++++++++--------
 6 files changed, 128 insertions(+), 126 deletions(-)

-- 
1.7.8.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-01-29 11:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-29 11:05 [PATCH 0/5] Remove use of isvisible for attr groups that are coppied Jonathan Cameron
2012-01-29 11:07 ` [PATCH 1/5] staging:iio:adc:ad7192 unwind use of is_visible for attribute group Jonathan Cameron
2012-01-29 11:07   ` [PATCH 2/5] staging:iio:dds:ad9834 unwind use of is_visible for attrs Jonathan Cameron
2012-01-29 11:07   ` [PATCH 3/5] staging:iio:dac:ad5446 " Jonathan Cameron
2012-01-29 11:07   ` [PATCH 4/5] staging:iio:adc:ad7606 " Jonathan Cameron
2012-01-29 11:07   ` [PATCH 5/5] staging:iio:adc:adt7310/7410 sticking plaster fix for broken event attrs Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).