summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Masney <masneyb@onstation.org>2016-10-28 06:00:15 -0400
committerJonathan Cameron <jic23@kernel.org>2016-11-01 18:50:05 +0000
commit27f4fabd4f9455852ebff253b21423406f24878b (patch)
tree3bd8e7613340b68f0540d43862f00c355c28ae19
parent20d823afff200fa131eb0dfaf6d33d8863ba8acf (diff)
staging: iio: tsl2583: remove redundant power_state sysfs attribute
IIO devices have a /sys/bus/iio/devices/iio:deviceX/power/ directory that allows viewing and controling various power parameters. The tsl2583 driver also has an additional custom sysfs attribute named power_state that is not needed. This patch removes the redundant power_state sysfs attribute. Signed-off-by: Brian Masney <masneyb@onstation.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r--drivers/staging/iio/light/tsl2583.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c
index 47fd373e1734..f8ccb4def0a9 100644
--- a/drivers/staging/iio/light/tsl2583.c
+++ b/drivers/staging/iio/light/tsl2583.c
@@ -511,33 +511,6 @@ static int taos_chip_off(struct iio_dev *indio_dev)
/* Sysfs Interface Functions */
-static ssize_t taos_power_state_show(struct device *dev,
- struct device_attribute *attr, char *buf)
-{
- struct iio_dev *indio_dev = dev_to_iio_dev(dev);
- struct tsl2583_chip *chip = iio_priv(indio_dev);
-
- return sprintf(buf, "%d\n", chip->taos_chip_status);
-}
-
-static ssize_t taos_power_state_store(struct device *dev,
- struct device_attribute *attr,
- const char *buf, size_t len)
-{
- struct iio_dev *indio_dev = dev_to_iio_dev(dev);
- int value;
-
- if (kstrtoint(buf, 0, &value))
- return -EINVAL;
-
- if (!value)
- taos_chip_off(indio_dev);
- else
- taos_chip_on(indio_dev);
-
- return len;
-}
-
static ssize_t taos_gain_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
@@ -785,9 +758,6 @@ static ssize_t taos_luxtable_store(struct device *dev,
return len;
}
-static DEVICE_ATTR(power_state, S_IRUGO | S_IWUSR,
- taos_power_state_show, taos_power_state_store);
-
static DEVICE_ATTR(illuminance0_calibscale, S_IRUGO | S_IWUSR,
taos_gain_show, taos_gain_store);
static DEVICE_ATTR(illuminance0_calibscale_available, S_IRUGO,
@@ -810,7 +780,6 @@ static DEVICE_ATTR(illuminance0_lux_table, S_IRUGO | S_IWUSR,
taos_luxtable_show, taos_luxtable_store);
static struct attribute *sysfs_attrs_ctrl[] = {
- &dev_attr_power_state.attr,
&dev_attr_illuminance0_calibscale.attr, /* Gain */
&dev_attr_illuminance0_calibscale_available.attr,
&dev_attr_illuminance0_integration_time.attr, /* I time*/