From: Jonathan Cameron <jic23@cam.ac.uk>
To: linux-iio@vger.kernel.org
Cc: Device-drivers-devel@blackfin.uclinux.org,
manuel.stahl@iis.fraunhofer.de,
Jonathan Cameron <jic23@cam.ac.uk>
Subject: [PATCH 10/11] staging:iio:resolver:ad2s1210 drop raw config register access
Date: Fri, 30 Sep 2011 11:14:53 +0100 [thread overview]
Message-ID: <1317377694-9001-11-git-send-email-jic23@cam.ac.uk> (raw)
In-Reply-To: <1317377694-9001-1-git-send-email-jic23@cam.ac.uk>
This should never have been exposed to userspace
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
---
drivers/staging/iio/resolver/ad2s1210.c | 44 -------------------------------
1 files changed, 0 insertions(+), 44 deletions(-)
diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c
index 697db80..4f248de 100644
--- a/drivers/staging/iio/resolver/ad2s1210.c
+++ b/drivers/staging/iio/resolver/ad2s1210.c
@@ -195,47 +195,6 @@ static inline int ad2s1210_soft_reset(struct ad2s1210_state *st)
return ad2s1210_config_write(st, 0x0);
}
-
-/* return the OLD DATA since last spi bus write */
-static ssize_t ad2s1210_show_raw(struct device *dev,
- struct device_attribute *attr,
- char *buf)
-{
- struct ad2s1210_state *st = iio_priv(dev_get_drvdata(dev));
- int ret = 0;
-
- mutex_lock(&st->lock);
- if (st->old_data) {
- ret = sprintf(buf, "0x%x\n", st->rx[0]);
- st->old_data = false;
- }
- mutex_unlock(&st->lock);
-
- return ret;
-}
-
-static ssize_t ad2s1210_store_raw(struct device *dev,
- struct device_attribute *attr,
- const char *buf,
- size_t len)
-{
- struct ad2s1210_state *st = iio_priv(dev_get_drvdata(dev));
- unsigned long udata;
- unsigned char data;
- int ret;
-
- ret = strict_strtoul(buf, 16, &udata);
- if (ret)
- return -EINVAL;
-
- data = udata & 0xff;
- mutex_lock(&st->lock);
- ret = ad2s1210_config_write(st, data);
- mutex_unlock(&st->lock);
-
- return ret < 0 ? ret : len;
-}
-
static ssize_t ad2s1210_store_softreset(struct device *dev,
struct device_attribute *attr,
const char *buf,
@@ -580,8 +539,6 @@ error_ret:
return ret;
}
-static IIO_DEVICE_ATTR(raw_io, S_IRUGO | S_IWUSR,
- ad2s1210_show_raw, ad2s1210_store_raw, 0);
static IIO_DEVICE_ATTR(reset, S_IWUSR,
NULL, ad2s1210_store_softreset, 0);
static IIO_DEVICE_ATTR(fclkin, S_IRUGO | S_IWUSR,
@@ -631,7 +588,6 @@ static struct iio_chan_spec ad2s1210_channels[] = {
};
static struct attribute *ad2s1210_attributes[] = {
- &iio_dev_attr_raw_io.dev_attr.attr,
&iio_dev_attr_reset.dev_attr.attr,
&iio_dev_attr_fclkin.dev_attr.attr,
&iio_dev_attr_fexcit.dev_attr.attr,
--
1.7.3.4
next prev parent reply other threads:[~2011-09-30 10:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-30 10:14 [PATCH 00/11] IIO: resolvers - first round of cleanups Jonathan Cameron
2011-09-30 10:14 ` [PATCH 01/11] staging:iio:resolver:ad2s90 fix registration of null pointer Jonathan Cameron
2011-09-30 10:14 ` [PATCH 02/11] staging:iio:resolver:ad2s90 ensure name is passed to iio_core Jonathan Cameron
2011-09-30 10:14 ` [PATCH 03/11] stagiong:iio:resolver:ad2s90 chan spec conversion Jonathan Cameron
2011-09-30 10:14 ` [PATCH 04/11] staging:iio: rename gyro channels to anglvel Jonathan Cameron
2011-09-30 10:14 ` [PATCH 05/11] staging:iio:Documentation gyro -> anglvel updates in attribute names Jonathan Cameron
2011-09-30 10:14 ` [PATCH 06/11] staging:iio:resolver:ad2s120x chan spec conversion Jonathan Cameron
2011-09-30 10:14 ` [PATCH 07/11] staging:iio:resolver rename ad2s120x ->ad2s1200 Jonathan Cameron
2011-09-30 10:14 ` [PATCH 08/11] staging:iio:resolver:ad2s1210 ensure iio_dev->name is set Jonathan Cameron
2011-09-30 10:14 ` [PATCH 09/11] staging:iio:resolver:ad2s1210 minimal chan spec conversion Jonathan Cameron
2011-09-30 10:14 ` Jonathan Cameron [this message]
2011-09-30 10:14 ` [PATCH 11/11] staging:iio:resolver:ad2s1210 cleanup gpio handling Jonathan Cameron
2011-10-05 6:58 ` [PATCH 00/11] IIO: resolvers - first round of cleanups Hennerich, Michael
2011-10-05 14:34 ` 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=1317377694-9001-11-git-send-email-jic23@cam.ac.uk \
--to=jic23@cam.ac.uk \
--cc=Device-drivers-devel@blackfin.uclinux.org \
--cc=linux-iio@vger.kernel.org \
--cc=manuel.stahl@iis.fraunhofer.de \
/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).