linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: linux-iio@vger.kernel.org
Cc: pirmin.duss@flytec.ch, lars@metafoo.de,
	Jonathan Cameron <jic23@kernel.org>
Subject: [PATCH 5/6] staging:iio:adc:adt7310/7410 sticking plaster fix for broken event attrs.
Date: Mon,  2 Jan 2012 17:25:22 +0000	[thread overview]
Message-ID: <1325525123-31158-6-git-send-email-jic23@kernel.org> (raw)
In-Reply-To: <1325525123-31158-1-git-send-email-jic23@kernel.org>

Neither of these drivers has ever been anywhere near the iio abi.
Probably as a result of this the fact they had two event groups
each was not picked up when we restricted IIO to having only
1 event line per device (as part of the chrdev merge set).

As such these definitely didn't work before.  This patch squishes
the only element from the 'comparator' event line that isn't in the
'interrupt' one into it and kills off the 'comparator' one.

Ultimately both of these drivers belong in hwmon not IIO and are just
waiting here because I don't want to kill off a driver that may
prove useful to someone.  (Ultimately I will ask Greg to scrap
these two if no one steps up to deal with them.)

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
---
 drivers/staging/iio/adc/adt7310.c |   21 ++++-----------------
 drivers/staging/iio/adc/adt7410.c |   21 ++++-----------------
 2 files changed, 8 insertions(+), 34 deletions(-)

diff --git a/drivers/staging/iio/adc/adt7310.c b/drivers/staging/iio/adc/adt7310.c
index ea9fd43..fc6ef6d 100644
--- a/drivers/staging/iio/adc/adt7310.c
+++ b/drivers/staging/iio/adc/adt7310.c
@@ -725,32 +725,19 @@ static struct attribute *adt7310_event_int_attributes[] = {
 	&iio_dev_attr_fault_queue.dev_attr.attr,
 	&iio_dev_attr_t_alarm_high.dev_attr.attr,
 	&iio_dev_attr_t_alarm_low.dev_attr.attr,
-	&iio_dev_attr_t_hyst.dev_attr.attr,
-	NULL,
-};
-
-static struct attribute *adt7310_event_ct_attributes[] = {
-	&iio_dev_attr_event_mode.dev_attr.attr,
-	&iio_dev_attr_available_event_modes.dev_attr.attr,
-	&iio_dev_attr_fault_queue.dev_attr.attr,
 	&iio_dev_attr_t_crit.dev_attr.attr,
 	&iio_dev_attr_t_hyst.dev_attr.attr,
 	NULL,
 };
 
-static struct attribute_group adt7310_event_attribute_group[ADT7310_IRQS] = {
-	{
-		.attrs = adt7310_event_int_attributes,
-		.name = "events",
-	}, {
-		.attrs = adt7310_event_ct_attributes,
-		.name = "events",
-	}
+static struct attribute_group adt7310_event_attribute_group = {
+	.attrs = adt7310_event_int_attributes,
+	.name = "events",
 };
 
 static const struct iio_info adt7310_info = {
 	.attrs = &adt7310_attribute_group,
-	.event_attrs = adt7310_event_attribute_group,
+	.event_attrs = &adt7310_event_attribute_group,
 	.driver_module = THIS_MODULE,
 };
 
diff --git a/drivers/staging/iio/adc/adt7410.c b/drivers/staging/iio/adc/adt7410.c
index 16467a7..74d28f4 100644
--- a/drivers/staging/iio/adc/adt7410.c
+++ b/drivers/staging/iio/adc/adt7410.c
@@ -693,32 +693,19 @@ static struct attribute *adt7410_event_int_attributes[] = {
 	&iio_dev_attr_fault_queue.dev_attr.attr,
 	&iio_dev_attr_t_alarm_high.dev_attr.attr,
 	&iio_dev_attr_t_alarm_low.dev_attr.attr,
-	&iio_dev_attr_t_hyst.dev_attr.attr,
-	NULL,
-};
-
-static struct attribute *adt7410_event_ct_attributes[] = {
-	&iio_dev_attr_event_mode.dev_attr.attr,
-	&iio_dev_attr_available_event_modes.dev_attr.attr,
-	&iio_dev_attr_fault_queue.dev_attr.attr,
 	&iio_dev_attr_t_crit.dev_attr.attr,
 	&iio_dev_attr_t_hyst.dev_attr.attr,
 	NULL,
 };
 
-static struct attribute_group adt7410_event_attribute_group[ADT7410_IRQS] = {
-	{
-		.attrs = adt7410_event_int_attributes,
-		.name = "events",
-	}, {
-		.attrs = adt7410_event_ct_attributes,
-		.name = "events",
-	}
+static struct attribute_group adt7410_event_attribute_group = {
+	.attrs = adt7410_event_int_attributes,
+	.name = "events",
 };
 
 static const struct iio_info adt7410_info = {
 	.attrs = &adt7410_attribute_group,
-	.event_attrs = adt7410_event_attribute_group,
+	.event_attrs = &adt7410_event_attribute_group,
 	.driver_module = THIS_MODULE,
 };
 
-- 
1.7.7.4

  parent reply	other threads:[~2012-01-02 17:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-02 17:25 [RFC PATCH 0/6] Make iio_info elements attrs and event_attrs struct attribute * Jonathan Cameron
2012-01-02 17:25 ` [PATCH 1/6] staging:iio:adc:ad7192 unwind use of is_visible for attribute group Jonathan Cameron
2012-01-02 17:25 ` [PATCH 4/6] staging:iio:adc:ad7606 unwind use of is_visible for attrs Jonathan Cameron
2012-01-02 17:25 ` Jonathan Cameron [this message]
2012-01-02 17:25 ` [PATCH 6/6] staging:iio:treewide make attrs and event_attrs entries struct attribute * Jonathan Cameron
2012-01-03  9:44 ` [RFC PATCH 0/6] Make iio_info elements attrs and event_attrs " Lars-Peter Clausen
2012-01-03 17:24   ` Jonathan Cameron
     [not found] ` <1325525123-31158-3-git-send-email-jic23@kernel.org>
2012-01-03  9:45   ` [PATCH 2/6] staging:iio:dds:ad9834 unwind use of is_visible for attrs Lars-Peter Clausen
2012-01-03 17:12     ` Jonathan Cameron
  -- strict thread matches above, loose matches on Subject: below --
2012-01-07 10:25 [PATCH V2 0/6] attrs and event_attrs out of iio_info and without wrapping group Jonathan Cameron
2012-01-07 10:25 ` [PATCH 5/6] staging:iio:adc:adt7310/7410 sticking plaster fix for broken event attrs Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1325525123-31158-6-git-send-email-jic23@kernel.org \
    --to=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=pirmin.duss@flytec.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).