The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: simran singhal <singhalsimran0@gmail.com>
To: jic23@kernel.org
Cc: knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] iio: health: afe4403: Remove all unused functions
Date: Fri, 31 Mar 2017 22:16:44 +0530	[thread overview]
Message-ID: <1490978804-25549-4-git-send-email-singhalsimran0@gmail.com> (raw)
In-Reply-To: <1490978804-25549-1-git-send-email-singhalsimran0@gmail.com>

The functions afe440x_show_register and afe440x_store_register are never
used anywhere in the kernel. So, remove their definitions.
Grepped to find occurences.

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
---
 drivers/iio/health/afe4403.c | 51 --------------------------------------------
 1 file changed, 51 deletions(-)

diff --git a/drivers/iio/health/afe4403.c b/drivers/iio/health/afe4403.c
index 6bb23a4..3059014 100644
--- a/drivers/iio/health/afe4403.c
+++ b/drivers/iio/health/afe4403.c
@@ -136,57 +136,6 @@ static const struct afe440x_val_table afe4403_cap_table[] = {
 };
 AFE440X_TABLE_ATTR(in_intensity_capacitance_available, afe4403_cap_table);
 
-static ssize_t afe440x_show_register(struct device *dev,
-				     struct device_attribute *attr,
-				     char *buf)
-{
-	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
-	struct afe4403_data *afe = iio_priv(indio_dev);
-	struct afe440x_attr *afe440x_attr = to_afe440x_attr(attr);
-	unsigned int reg_val;
-	int vals[2];
-	int ret;
-
-	ret = regmap_field_read(afe->fields[afe440x_attr->field], &reg_val);
-	if (ret)
-		return ret;
-
-	if (reg_val >= afe440x_attr->table_size)
-		return -EINVAL;
-
-	vals[0] = afe440x_attr->val_table[reg_val].integer;
-	vals[1] = afe440x_attr->val_table[reg_val].fract;
-
-	return iio_format_value(buf, IIO_VAL_INT_PLUS_MICRO, 2, vals);
-}
-
-static ssize_t afe440x_store_register(struct device *dev,
-				      struct device_attribute *attr,
-				      const char *buf, size_t count)
-{
-	struct iio_dev *indio_dev = dev_to_iio_dev(dev);
-	struct afe4403_data *afe = iio_priv(indio_dev);
-	struct afe440x_attr *afe440x_attr = to_afe440x_attr(attr);
-	int val, integer, fract, ret;
-
-	ret = iio_str_to_fixpoint(buf, 100000, &integer, &fract);
-	if (ret)
-		return ret;
-
-	for (val = 0; val < afe440x_attr->table_size; val++)
-		if (afe440x_attr->val_table[val].integer == integer &&
-		    afe440x_attr->val_table[val].fract == fract)
-			break;
-	if (val == afe440x_attr->table_size)
-		return -EINVAL;
-
-	ret = regmap_field_write(afe->fields[afe440x_attr->field], val);
-	if (ret)
-		return ret;
-
-	return count;
-}
-
 static AFE440X_ATTR(in_intensity1_resistance, F_RF_LED, afe4403_res_table);
 static AFE440X_ATTR(in_intensity1_capacitance, F_CF_LED, afe4403_cap_table);
 
-- 
2.7.4

  parent reply	other threads:[~2017-03-31 16:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-31 16:46 [PATCH 0/3] iio: health: Clean up simran singhal
2017-03-31 16:46 ` [PATCH 1/3] iio: health: afe440x: Remove code in comments simran singhal
2017-03-31 18:33   ` Joe Perches
2017-03-31 18:43     ` SIMRAN SINGHAL
2017-03-31 18:50       ` Joe Perches
2017-03-31 19:08         ` SIMRAN SINGHAL
2017-04-02  2:39   ` kbuild test robot
2017-04-02  3:25   ` kbuild test robot
2017-04-02  5:23   ` kbuild test robot
2017-03-31 16:46 ` [PATCH 2/3] iio: health: afe4404: Remove all unused functions simran singhal
2017-03-31 16:46 ` simran singhal [this message]
2017-03-31 19:07 ` [PATCH 0/3] iio: health: Clean up SIMRAN SINGHAL

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=1490978804-25549-4-git-send-email-singhalsimran0@gmail.com \
    --to=singhalsimran0@gmail.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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