* [PATCHv4 0/8] Checkpatch fixes to driver/staging/iio/addac
@ 2016-12-25 19:41 Scott Matheina
2016-12-25 19:41 ` [PATCHv4 1/8] fixed long description text exceeding 80 characters Scott Matheina
` (5 more replies)
0 siblings, 6 replies; 13+ messages in thread
From: Scott Matheina @ 2016-12-25 19:41 UTC (permalink / raw)
To: linux-kernel
Cc: Scott Matheina, Lars-Peter Clausen, Michael Hennerich,
Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
Greg Kroah-Hartman, linux-iio, devel
*** BLURB HERE ***
Scott Matheina (8):
fixed long description text exceeding 80 characters
Fixed variables not being consistently lower case
Fix camel case issues
Fix braces not present on all arms of if else statement
Remove line after closing braces
Fixed code wrap alignment with preceding (.
Changed code to align with coding style of using octat
Fixes style issues due to mis-aligned carry over lines
drivers/staging/iio/addac/adt7316.c | 850 +++++++++++++++++-------------------
1 file changed, 397 insertions(+), 453 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCHv4 1/8] fixed long description text exceeding 80 characters
2016-12-25 19:41 [PATCHv4 0/8] Checkpatch fixes to driver/staging/iio/addac Scott Matheina
@ 2016-12-25 19:41 ` Scott Matheina
2016-12-25 19:41 ` [PATCHv4 2/8] Fixed variables not being consistently lower case Scott Matheina
` (4 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: Scott Matheina @ 2016-12-25 19:41 UTC (permalink / raw)
To: linux-kernel
Cc: Scott Matheina, Lars-Peter Clausen, Michael Hennerich,
Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
Greg Kroah-Hartman, linux-iio, devel
The description was split into 2 lines due to the line greatly
exceeding the 80 character soft limit.
Signed-off-by: Scott Matheina <scott@matheina.com>
---
drivers/staging/iio/addac/adt7316.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
index a7d90c8..08413a8 100644
--- a/drivers/staging/iio/addac/adt7316.c
+++ b/drivers/staging/iio/addac/adt7316.c
@@ -2181,5 +2181,6 @@ int adt7316_probe(struct device *dev, struct adt7316_bus *bus,
EXPORT_SYMBOL(adt7316_probe);
MODULE_AUTHOR("Sonic Zhang <sonic.zhang@analog.com>");
-MODULE_DESCRIPTION("Analog Devices ADT7316/7/8 and ADT7516/7/9 digital temperature sensor, ADC and DAC driver");
+MODULE_DESCRIPTION("Analog Devices ADT7316/7/8 and ADT7516/7/9 digital\n"
+ "temperature sensor, ADC and DAC driver");
MODULE_LICENSE("GPL v2");
--
2.7.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCHv4 2/8] Fixed variables not being consistently lower case
2016-12-25 19:41 [PATCHv4 0/8] Checkpatch fixes to driver/staging/iio/addac Scott Matheina
2016-12-25 19:41 ` [PATCHv4 1/8] fixed long description text exceeding 80 characters Scott Matheina
@ 2016-12-25 19:41 ` Scott Matheina
2016-12-25 20:14 ` Al Viro
2016-12-25 19:41 ` [PATCHv4 3/8] Fix camel case issues Scott Matheina
` (3 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Scott Matheina @ 2016-12-25 19:41 UTC (permalink / raw)
To: linux-kernel
Cc: Scott Matheina, Lars-Peter Clausen, Michael Hennerich,
Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
Greg Kroah-Hartman, linux-iio, devel
Across the file, variables were sometimes upper case, some times
lower case, this fix addresses a few of the instances with this
inconsistency.
Signed-off-by: Scott Matheina <scott@matheina.com>
---
drivers/staging/iio/addac/adt7316.c | 48 ++++++++++++++++++-------------------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
index 08413a8..13d9ed2 100644
--- a/drivers/staging/iio/addac/adt7316.c
+++ b/drivers/staging/iio/addac/adt7316.c
@@ -1755,55 +1755,55 @@ static irqreturn_t adt7316_event_handler(int irq, void *private)
time = iio_get_time_ns(indio_dev);
if (stat1 & BIT(0))
iio_push_event(indio_dev,
- IIO_UNMOD_EVENT_CODE(IIO_TEMP, 0,
- IIO_EV_TYPE_THRESH,
- IIO_EV_DIR_RISING),
+ iio_unmod_event_code(iio_temp, 0,
+ iio_ev_type_thresh,
+ iio_ev_dir_rising),
time);
if (stat1 & BIT(1))
iio_push_event(indio_dev,
- IIO_UNMOD_EVENT_CODE(IIO_TEMP, 0,
- IIO_EV_TYPE_THRESH,
- IIO_EV_DIR_FALLING),
+ iio_unmod_event_code(iio_temp, 0,
+ iio_ev_type_thresh,
+ iio_ev_dir_falling),
time);
if (stat1 & BIT(2))
iio_push_event(indio_dev,
- IIO_UNMOD_EVENT_CODE(IIO_TEMP, 1,
- IIO_EV_TYPE_THRESH,
- IIO_EV_DIR_RISING),
+ iio_unmod_event_code(iio_temp, 1,
+ iio_ev_type_thresh,
+ iio_ev_dir_rising),
time);
if (stat1 & BIT(3))
iio_push_event(indio_dev,
- IIO_UNMOD_EVENT_CODE(IIO_TEMP, 1,
- IIO_EV_TYPE_THRESH,
- IIO_EV_DIR_FALLING),
+ iio_unmod_event_code(iio_temp, 1,
+ iio_ev_type_thresh,
+ iio_ev_dir_falling),
time);
if (stat1 & BIT(5))
iio_push_event(indio_dev,
- IIO_UNMOD_EVENT_CODE(IIO_VOLTAGE, 1,
- IIO_EV_TYPE_THRESH,
- IIO_EV_DIR_EITHER),
+ iio_unmod_event_code(iio_voltage, 1,
+ iio_ev_type_thresh,
+ iio_ev_dir_either),
time);
if (stat1 & BIT(6))
iio_push_event(indio_dev,
- IIO_UNMOD_EVENT_CODE(IIO_VOLTAGE, 2,
- IIO_EV_TYPE_THRESH,
- IIO_EV_DIR_EITHER),
+ iio_unmod_event_code(iio_voltage, 2,
+ iio_ev_type_thresh,
+ iio_ev_dir_either),
time);
if (stat1 & BIT(7))
iio_push_event(indio_dev,
- IIO_UNMOD_EVENT_CODE(IIO_VOLTAGE, 3,
- IIO_EV_TYPE_THRESH,
- IIO_EV_DIR_EITHER),
+ iio_unmod_event_code(iio_voltage, 3,
+ iio_ev_type_thresh,
+ iio_ev_dir_either),
time);
}
ret = chip->bus.read(chip->bus.client, ADT7316_INT_STAT2, &stat2);
if (!ret) {
if (stat2 & ADT7316_INT_MASK2_VDD)
iio_push_event(indio_dev,
- IIO_UNMOD_EVENT_CODE(IIO_VOLTAGE,
+ iio_unmod_event_code(iio_voltage,
0,
- IIO_EV_TYPE_THRESH,
- IIO_EV_DIR_RISING),
+ iio_ev_type_thresh,
+ iio_ev_dir_rising),
iio_get_time_ns(indio_dev));
}
--
2.7.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCHv4 3/8] Fix camel case issues
2016-12-25 19:41 [PATCHv4 0/8] Checkpatch fixes to driver/staging/iio/addac Scott Matheina
2016-12-25 19:41 ` [PATCHv4 1/8] fixed long description text exceeding 80 characters Scott Matheina
2016-12-25 19:41 ` [PATCHv4 2/8] Fixed variables not being consistently lower case Scott Matheina
@ 2016-12-25 19:41 ` Scott Matheina
2016-12-25 19:41 ` [PATCHv4 4/8] Fix braces not present on all arms of if else statement Scott Matheina
` (2 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: Scott Matheina @ 2016-12-25 19:41 UTC (permalink / raw)
To: linux-kernel
Cc: Scott Matheina, Lars-Peter Clausen, Michael Hennerich,
Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
Greg Kroah-Hartman, linux-iio, devel
Cases of camel case were fixed by making variables lower case throughout
the file.
Signed-off-by: Scott Matheina <scott@matheina.com>
---
drivers/staging/iio/addac/adt7316.c | 82 ++++++++++++++++++-------------------
1 file changed, 41 insertions(+), 41 deletions(-)
diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
index 13d9ed2..2b584a0 100644
--- a/drivers/staging/iio/addac/adt7316.c
+++ b/drivers/staging/iio/addac/adt7316.c
@@ -1485,7 +1485,7 @@ static ssize_t adt7316_show_DAC_A(struct device *dev,
struct iio_dev *dev_info = dev_to_iio_dev(dev);
struct adt7316_chip_info *chip = iio_priv(dev_info);
- return adt7316_show_DAC(chip, 0, buf);
+ return adt7316_show_dac(chip, 0, buf);
}
static ssize_t adt7316_store_DAC_A(struct device *dev,
@@ -1496,7 +1496,7 @@ static ssize_t adt7316_store_DAC_A(struct device *dev,
struct iio_dev *dev_info = dev_to_iio_dev(dev);
struct adt7316_chip_info *chip = iio_priv(dev_info);
- return adt7316_store_DAC(chip, 0, buf, len);
+ return adt7316_store_dac(chip, 0, buf, len);
}
static IIO_DEVICE_ATTR(DAC_A, S_IRUGO | S_IWUSR, adt7316_show_DAC_A,
@@ -1509,7 +1509,7 @@ static ssize_t adt7316_show_DAC_B(struct device *dev,
struct iio_dev *dev_info = dev_to_iio_dev(dev);
struct adt7316_chip_info *chip = iio_priv(dev_info);
- return adt7316_show_DAC(chip, 1, buf);
+ return adt7316_show_dac(chip, 1, buf);
}
static ssize_t adt7316_store_DAC_B(struct device *dev,
@@ -1520,7 +1520,7 @@ static ssize_t adt7316_store_DAC_B(struct device *dev,
struct iio_dev *dev_info = dev_to_iio_dev(dev);
struct adt7316_chip_info *chip = iio_priv(dev_info);
- return adt7316_store_DAC(chip, 1, buf, len);
+ return adt7316_store_dac(chip, 1, buf, len);
}
static IIO_DEVICE_ATTR(DAC_B, S_IRUGO | S_IWUSR, adt7316_show_DAC_B,
@@ -1533,7 +1533,7 @@ static ssize_t adt7316_show_DAC_C(struct device *dev,
struct iio_dev *dev_info = dev_to_iio_dev(dev);
struct adt7316_chip_info *chip = iio_priv(dev_info);
- return adt7316_show_DAC(chip, 2, buf);
+ return adt7316_show_dac(chip, 2, buf);
}
static ssize_t adt7316_store_DAC_C(struct device *dev,
@@ -1544,7 +1544,7 @@ static ssize_t adt7316_store_DAC_C(struct device *dev,
struct iio_dev *dev_info = dev_to_iio_dev(dev);
struct adt7316_chip_info *chip = iio_priv(dev_info);
- return adt7316_store_DAC(chip, 2, buf, len);
+ return adt7316_store_dac(chip, 2, buf, len);
}
static IIO_DEVICE_ATTR(DAC_C, S_IRUGO | S_IWUSR, adt7316_show_DAC_C,
@@ -1557,7 +1557,7 @@ static ssize_t adt7316_show_DAC_D(struct device *dev,
struct iio_dev *dev_info = dev_to_iio_dev(dev);
struct adt7316_chip_info *chip = iio_priv(dev_info);
- return adt7316_show_DAC(chip, 3, buf);
+ return adt7316_show_dac(chip, 3, buf);
}
static ssize_t adt7316_store_DAC_D(struct device *dev,
@@ -1568,7 +1568,7 @@ static ssize_t adt7316_store_DAC_D(struct device *dev,
struct iio_dev *dev_info = dev_to_iio_dev(dev);
struct adt7316_chip_info *chip = iio_priv(dev_info);
- return adt7316_store_DAC(chip, 3, buf, len);
+ return adt7316_store_dac(chip, 3, buf, len);
}
static IIO_DEVICE_ATTR(DAC_D, S_IRUGO | S_IWUSR, adt7316_show_DAC_D,
@@ -1661,26 +1661,26 @@ static struct attribute *adt7316_attributes[] = {
&iio_dev_attr_powerdown.dev_attr.attr,
&iio_dev_attr_fast_ad_clock.dev_attr.attr,
&iio_dev_attr_da_high_resolution.dev_attr.attr,
- &iio_dev_attr_enable_proportion_DACA.dev_attr.attr,
- &iio_dev_attr_enable_proportion_DACB.dev_attr.attr,
- &iio_dev_attr_DAC_2Vref_channels_mask.dev_attr.attr,
- &iio_dev_attr_DAC_update_mode.dev_attr.attr,
- &iio_dev_attr_all_DAC_update_modes.dev_attr.attr,
- &iio_dev_attr_update_DAC.dev_attr.attr,
- &iio_dev_attr_DA_AB_Vref_bypass.dev_attr.attr,
- &iio_dev_attr_DA_CD_Vref_bypass.dev_attr.attr,
- &iio_dev_attr_DAC_internal_Vref.dev_attr.attr,
- &iio_dev_attr_VDD.dev_attr.attr,
+ &iio_dev_attr_enable_proportion_daca.dev_attr.attr,
+ &iio_dev_attr_enable_proportion_dacb.dev_attr.attr,
+ &iio_dev_attr_dac_2vref_channels_mask.dev_attr.attr,
+ &iio_dev_attr_dac_internal_vref.dev_attr.attr,
+ &iio_dev_attr_all_dac_update_modes.dev_attr.attr,
+ &iio_dev_attr_update_dac.dev_attr.attr,
+ &iio_dev_attr_da_ab_vref_bypass.dev_attr.attr,
+ &iio_dev_attr_da_cd_vref_bypass.dev_attr.attr,
+ &iio_dev_attr_dac_internal_vref.dev_attr.attr,
+ &iio_dev_attr_vdd.dev_attr.attr,
&iio_dev_attr_in_temp.dev_attr.attr,
&iio_dev_attr_ex_temp.dev_attr.attr,
&iio_dev_attr_in_temp_offset.dev_attr.attr,
&iio_dev_attr_ex_temp_offset.dev_attr.attr,
&iio_dev_attr_in_analog_temp_offset.dev_attr.attr,
&iio_dev_attr_ex_analog_temp_offset.dev_attr.attr,
- &iio_dev_attr_DAC_A.dev_attr.attr,
- &iio_dev_attr_DAC_B.dev_attr.attr,
- &iio_dev_attr_DAC_C.dev_attr.attr,
- &iio_dev_attr_DAC_D.dev_attr.attr,
+ &iio_dev_attr_dac_a.dev_attr.attr,
+ &iio_dev_attr_dac_b.dev_attr.attr,
+ &iio_dev_attr_dac_c.dev_attr.attr,
+ &iio_dev_attr_dac_d.dev_attr.attr,
&iio_dev_attr_device_id.dev_attr.attr,
&iio_dev_attr_manufactorer_id.dev_attr.attr,
&iio_dev_attr_device_rev.dev_attr.attr,
@@ -1703,31 +1703,31 @@ static struct attribute *adt7516_attributes[] = {
&iio_dev_attr_enable_smbus_timeout.dev_attr.attr,
&iio_dev_attr_powerdown.dev_attr.attr,
&iio_dev_attr_fast_ad_clock.dev_attr.attr,
- &iio_dev_attr_AIN_internal_Vref.dev_attr.attr,
+ &iio_dev_attr_ain_internal_vref.dev_attr.attr,
&iio_dev_attr_da_high_resolution.dev_attr.attr,
- &iio_dev_attr_enable_proportion_DACA.dev_attr.attr,
- &iio_dev_attr_enable_proportion_DACB.dev_attr.attr,
- &iio_dev_attr_DAC_2Vref_channels_mask.dev_attr.attr,
- &iio_dev_attr_DAC_update_mode.dev_attr.attr,
- &iio_dev_attr_all_DAC_update_modes.dev_attr.attr,
- &iio_dev_attr_update_DAC.dev_attr.attr,
- &iio_dev_attr_DA_AB_Vref_bypass.dev_attr.attr,
- &iio_dev_attr_DA_CD_Vref_bypass.dev_attr.attr,
- &iio_dev_attr_DAC_internal_Vref.dev_attr.attr,
- &iio_dev_attr_VDD.dev_attr.attr,
+ &iio_dev_attr_enable_proportion_daca.dev_attr.attr,
+ &iio_dev_attr_enable_proportion_dacb.dev_attr.attr,
+ &iio_dev_attr_dac_2vref_channels_mask.dev_attr.attr,
+ &iio_dev_attr_dac_update_mode.dev_attr.attr,
+ &iio_dev_attr_all_dac_update_modes.dev_attr.attr,
+ &iio_dev_attr_update_dac.dev_attr.attr,
+ &iio_dev_attr_da_ab_vref_bypass.dev_attr.attr,
+ &iio_dev_attr_da_cd_vref_bypass.dev_attr.attr,
+ &iio_dev_attr_dac_internal_vref.dev_attr.attr,
+ &iio_dev_attr_vdd.dev_attr.attr,
&iio_dev_attr_in_temp.dev_attr.attr,
- &iio_dev_attr_ex_temp_AIN1.dev_attr.attr,
- &iio_dev_attr_AIN2.dev_attr.attr,
- &iio_dev_attr_AIN3.dev_attr.attr,
- &iio_dev_attr_AIN4.dev_attr.attr,
+ &iio_dev_attr_ex_temp_ain1.dev_attr.attr,
+ &iio_dev_attr_ain2.dev_attr.attr,
+ &iio_dev_attr_ain3.dev_attr.attr,
+ &iio_dev_attr_ain4.dev_attr.attr,
&iio_dev_attr_in_temp_offset.dev_attr.attr,
&iio_dev_attr_ex_temp_offset.dev_attr.attr,
&iio_dev_attr_in_analog_temp_offset.dev_attr.attr,
&iio_dev_attr_ex_analog_temp_offset.dev_attr.attr,
- &iio_dev_attr_DAC_A.dev_attr.attr,
- &iio_dev_attr_DAC_B.dev_attr.attr,
- &iio_dev_attr_DAC_C.dev_attr.attr,
- &iio_dev_attr_DAC_D.dev_attr.attr,
+ &iio_dev_attr_dac_a.dev_attr.attr,
+ &iio_dev_attr_dac_b.dev_attr.attr,
+ &iio_dev_attr_dac_c.dev_attr.attr,
+ &iio_dev_attr_dac_d.dev_attr.attr,
&iio_dev_attr_device_id.dev_attr.attr,
&iio_dev_attr_manufactorer_id.dev_attr.attr,
&iio_dev_attr_device_rev.dev_attr.attr,
--
2.7.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCHv4 4/8] Fix braces not present on all arms of if else statement
2016-12-25 19:41 [PATCHv4 0/8] Checkpatch fixes to driver/staging/iio/addac Scott Matheina
` (2 preceding siblings ...)
2016-12-25 19:41 ` [PATCHv4 3/8] Fix camel case issues Scott Matheina
@ 2016-12-25 19:41 ` Scott Matheina
2016-12-25 19:41 ` [PATCHv4 5/8] Remove line after closing braces Scott Matheina
2016-12-25 19:41 ` [PATCHv4 7/8] Changed code to align with coding style of using octat Scott Matheina
5 siblings, 0 replies; 13+ messages in thread
From: Scott Matheina @ 2016-12-25 19:41 UTC (permalink / raw)
To: linux-kernel
Cc: Scott Matheina, Lars-Peter Clausen, Michael Hennerich,
Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
Greg Kroah-Hartman, linux-iio, devel
Adds braces to second arm of if else statement.
Signed-off-by: Scott Matheina <scott@matheina.com>
---
drivers/staging/iio/addac/adt7316.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
index 2b584a0..e78d302 100644
--- a/drivers/staging/iio/addac/adt7316.c
+++ b/drivers/staging/iio/addac/adt7316.c
@@ -661,8 +661,9 @@ static ssize_t adt7316_store_da_high_resolution(struct device *dev,
chip->dac_bits = 12;
else if (chip->id == ID_ADT7317 || chip->id == ID_ADT7517)
chip->dac_bits = 10;
- } else
+ } else {
config3 = chip->config3 & (~ADT7316_DA_HIGH_RESOLUTION);
+ }
ret = chip->bus.write(chip->bus.client, ADT7316_CONFIG3, config3);
if (ret)
--
2.7.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCHv4 5/8] Remove line after closing braces
2016-12-25 19:41 [PATCHv4 0/8] Checkpatch fixes to driver/staging/iio/addac Scott Matheina
` (3 preceding siblings ...)
2016-12-25 19:41 ` [PATCHv4 4/8] Fix braces not present on all arms of if else statement Scott Matheina
@ 2016-12-25 19:41 ` Scott Matheina
2016-12-25 19:41 ` [PATCHv4 7/8] Changed code to align with coding style of using octat Scott Matheina
5 siblings, 0 replies; 13+ messages in thread
From: Scott Matheina @ 2016-12-25 19:41 UTC (permalink / raw)
To: linux-kernel
Cc: Scott Matheina, Lars-Peter Clausen, Michael Hennerich,
Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
Greg Kroah-Hartman, linux-iio, devel
There was an additional line which was un-needed, removed that line.
Signed-off-by: Scott Matheina <scott@matheina.com>
---
drivers/staging/iio/addac/adt7316.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
index e78d302..4678a64 100644
--- a/drivers/staging/iio/addac/adt7316.c
+++ b/drivers/staging/iio/addac/adt7316.c
@@ -434,7 +434,6 @@ static ssize_t adt7316_store_ad_channel(struct device *dev,
config2 = chip->config2 & (~ADT7316_AD_SINGLE_CH_MASK);
}
-
config2 |= data;
ret = chip->bus.write(chip->bus.client, ADT7316_CONFIG2, config2);
--
2.7.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCHv4 7/8] Changed code to align with coding style of using octat
2016-12-25 19:41 [PATCHv4 0/8] Checkpatch fixes to driver/staging/iio/addac Scott Matheina
` (4 preceding siblings ...)
2016-12-25 19:41 ` [PATCHv4 5/8] Remove line after closing braces Scott Matheina
@ 2016-12-25 19:41 ` Scott Matheina
5 siblings, 0 replies; 13+ messages in thread
From: Scott Matheina @ 2016-12-25 19:41 UTC (permalink / raw)
To: linux-kernel
Cc: Scott Matheina, Lars-Peter Clausen, Michael Hennerich,
Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
Greg Kroah-Hartman, linux-iio, devel
The permmission code was changed to reflect octat (0644/0444) for required permissions.
Signed-off-by: Scott Matheina <scott@matheina.com>
---
drivers/staging/iio/addac/adt7316.c | 264 ++++++++++++++----------------------
1 file changed, 101 insertions(+), 163 deletions(-)
diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
index 91ac222..e8e58d5 100644
--- a/drivers/staging/iio/addac/adt7316.c
+++ b/drivers/staging/iio/addac/adt7316.c
@@ -267,10 +267,8 @@ static ssize_t adt7316_store_enabled(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(enabled, S_IRUGO | S_IWUSR,
- adt7316_show_enabled,
- adt7316_store_enabled,
- 0);
+static iio_device_attr(enabled, 0644, adt7316_show_enabled,
+ adt7316_store_enabled, 0);
static ssize_t adt7316_show_select_ex_temp(struct device *dev,
struct device_attribute *attr,
@@ -311,10 +309,8 @@ static ssize_t adt7316_store_select_ex_temp(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(select_ex_temp, S_IRUGO | S_IWUSR,
- adt7316_show_select_ex_temp,
- adt7316_store_select_ex_temp,
- 0);
+static iio_device_attr(select_ex_temp, 0644, adt7316_show_select_ex_temp,
+ adt7316_store_select_ex_temp, 0);
static ssize_t adt7316_show_mode(struct device *dev,
struct device_attribute *attr,
@@ -352,10 +348,7 @@ static ssize_t adt7316_store_mode(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(mode, S_IRUGO | S_IWUSR,
- adt7316_show_mode,
- adt7316_store_mode,
- 0);
+static iio_device_attr(mode, 0644, adt7316_show_mode, adt7316_store_mode, 0);
static ssize_t adt7316_show_all_modes(struct device *dev,
struct device_attribute *attr,
@@ -364,7 +357,7 @@ static ssize_t adt7316_show_all_modes(struct device *dev,
return sprintf(buf, "single_channel\nround_robin\n");
}
-static IIO_DEVICE_ATTR(all_modes, S_IRUGO, adt7316_show_all_modes, NULL, 0);
+static iio_device_attr(all_modes, 0444, adt7316_show_all_modes, NULL, 0);
static ssize_t adt7316_show_ad_channel(struct device *dev,
struct device_attribute *attr,
@@ -445,10 +438,8 @@ static ssize_t adt7316_store_ad_channel(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(ad_channel, S_IRUGO | S_IWUSR,
- adt7316_show_ad_channel,
- adt7316_store_ad_channel,
- 0);
+static iio_device_attr(ad_channel, 0644, adt7316_show_ad_channel,
+ adt7316_store_ad_channel, 0);
static ssize_t adt7316_show_all_ad_channels(struct device *dev,
struct device_attribute *attr,
@@ -468,8 +459,8 @@ static ssize_t adt7316_show_all_ad_channels(struct device *dev,
"2 - External Temperature\n");
}
-static IIO_DEVICE_ATTR(all_ad_channels, S_IRUGO,
- adt7316_show_all_ad_channels, NULL, 0);
+static iio_device_attr(all_ad_channels, 0444, adt7316_show_all_ad_channels,
+ NULL, 0);
static ssize_t adt7316_show_disable_averaging(struct device *dev,
struct device_attribute *attr,
@@ -505,10 +496,8 @@ static ssize_t adt7316_store_disable_averaging(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(disable_averaging, S_IRUGO | S_IWUSR,
- adt7316_show_disable_averaging,
- adt7316_store_disable_averaging,
- 0);
+static iio_device_attr(disable_averaging, 0644, adt7316_show_disable_averaging,
+ adt7316_store_disable_averaging, 0);
static ssize_t adt7316_show_enable_smbus_timeout(struct device *dev,
struct device_attribute *attr,
@@ -544,10 +533,9 @@ static ssize_t adt7316_store_enable_smbus_timeout(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(enable_smbus_timeout, S_IRUGO | S_IWUSR,
- adt7316_show_enable_smbus_timeout,
- adt7316_store_enable_smbus_timeout,
- 0);
+static iio_device_attr(enable_smbus_timeout, 0644,
+ adt7316_show_enable_smbus_timeout,
+ adt7316_store_enable_smbus_timeout, 0);
static ssize_t adt7316_show_powerdown(struct device *dev,
struct device_attribute *attr,
@@ -582,10 +570,8 @@ static ssize_t adt7316_store_powerdown(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(powerdown, S_IRUGO | S_IWUSR,
- adt7316_show_powerdown,
- adt7316_store_powerdown,
- 0);
+static iio_device_attr(powerdown, 0644, adt7316_show_powerdown,
+ adt7316_store_powerdown, 0);
static ssize_t adt7316_show_fast_ad_clock(struct device *dev,
struct device_attribute *attr,
@@ -620,10 +606,8 @@ static ssize_t adt7316_store_fast_ad_clock(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(fast_ad_clock, S_IRUGO | S_IWUSR,
- adt7316_show_fast_ad_clock,
- adt7316_store_fast_ad_clock,
- 0);
+static iio_device_attr(fast_ad_clock, 0644, adt7316_show_fast_ad_clock,
+ adt7316_store_fast_ad_clock, 0);
static ssize_t adt7316_show_da_high_resolution(struct device *dev,
struct device_attribute *attr,
@@ -673,10 +657,9 @@ static ssize_t adt7316_store_da_high_resolution(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(da_high_resolution, S_IRUGO | S_IWUSR,
- adt7316_show_da_high_resolution,
- adt7316_store_da_high_resolution,
- 0);
+static iio_device_attr(da_high_resolution, 0644,
+ adt7316_show_da_high_resolution,
+ adt7316_store_da_high_resolution, 0);
static ssize_t adt7316_show_AIN_internal_Vref(struct device *dev,
struct device_attribute *attr,
@@ -719,10 +702,9 @@ static ssize_t adt7316_store_AIN_internal_Vref(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(AIN_internal_Vref, S_IRUGO | S_IWUSR,
- adt7316_show_AIN_internal_Vref,
- adt7316_store_AIN_internal_Vref,
- 0);
+static iio_device_attr(ain_internal_vref, 0644,
+ adt7316_show_ain_internal_vref,
+ adt7316_store_ain_internal_vref, 0);
static ssize_t adt7316_show_enable_prop_DACA(struct device *dev,
@@ -759,10 +741,9 @@ static ssize_t adt7316_store_enable_prop_DACA(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(enable_proportion_DACA, S_IRUGO | S_IWUSR,
- adt7316_show_enable_prop_DACA,
- adt7316_store_enable_prop_DACA,
- 0);
+static iio_device_attr(enable_proportion_daca, 0644,
+ adt7316_show_enable_prop_daca,
+ adt7316_store_enable_prop_daca, 0);
static ssize_t adt7316_show_enable_prop_DACB(struct device *dev,
struct device_attribute *attr,
@@ -798,10 +779,9 @@ static ssize_t adt7316_store_enable_prop_DACB(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(enable_proportion_DACB, S_IRUGO | S_IWUSR,
- adt7316_show_enable_prop_DACB,
- adt7316_store_enable_prop_DACB,
- 0);
+static iio_device_attr(enable_proportion_dacb, 0644,
+ adt7316_show_enable_prop_dacb,
+ adt7316_store_enable_prop_dacb, 0);
static ssize_t adt7316_show_DAC_2Vref_ch_mask(struct device *dev,
struct device_attribute *attr,
@@ -841,10 +821,9 @@ static ssize_t adt7316_store_DAC_2Vref_ch_mask(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(DAC_2Vref_channels_mask, S_IRUGO | S_IWUSR,
- adt7316_show_DAC_2Vref_ch_mask,
- adt7316_store_DAC_2Vref_ch_mask,
- 0);
+static iio_device_attr(dac_2vref_channels_mask, 0644,
+ adt7316_show_dac_2vref_ch_mask,
+ adt7316_store_dac_2vref_ch_mask, 0);
static ssize_t adt7316_show_DAC_update_mode(struct device *dev,
struct device_attribute *attr,
@@ -901,10 +880,8 @@ static ssize_t adt7316_store_DAC_update_mode(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(DAC_update_mode, S_IRUGO | S_IWUSR,
- adt7316_show_DAC_update_mode,
- adt7316_store_DAC_update_mode,
- 0);
+static iio_device_attr(DAC_update_mode, 0644, adt7316_show_dac_update_mode,
+ adt7316_store_dac_update_mode, 0);
static ssize_t adt7316_show_all_DAC_update_modes(struct device *dev,
struct device_attribute *attr,
@@ -921,9 +898,8 @@ static ssize_t adt7316_show_all_DAC_update_modes(struct device *dev,
return sprintf(buf, "manual\n");
}
-static IIO_DEVICE_ATTR(all_DAC_update_modes, S_IRUGO,
- adt7316_show_all_DAC_update_modes, NULL, 0);
-
+static iio_device_attr(all_dac_update_modes, 0444,
+ adt7316_show_all_dac_update_modes, NULL, 0);
static ssize_t adt7316_store_update_DAC(struct device *dev,
struct device_attribute *attr,
@@ -960,10 +936,7 @@ static ssize_t adt7316_store_update_DAC(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(update_DAC, S_IRUGO | S_IWUSR,
- NULL,
- adt7316_store_update_DAC,
- 0);
+static iio_device_attr(update_dac, 0644, NULL, adt7316_store_update_dac, 0);
static ssize_t adt7316_show_DA_AB_Vref_bypass(struct device *dev,
struct device_attribute *attr,
@@ -1005,10 +978,8 @@ static ssize_t adt7316_store_DA_AB_Vref_bypass(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(DA_AB_Vref_bypass, S_IRUGO | S_IWUSR,
- adt7316_show_DA_AB_Vref_bypass,
- adt7316_store_DA_AB_Vref_bypass,
- 0);
+static iio_device_attr(da_ab_vref_bypass, 0644, adt7316_show_da_ab_vref_bypass,
+ adt7316_store_da_ab_vref_bypass, 0);
static ssize_t adt7316_show_DA_CD_Vref_bypass(struct device *dev,
struct device_attribute *attr,
@@ -1050,10 +1021,8 @@ static ssize_t adt7316_store_DA_CD_Vref_bypass(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(DA_CD_Vref_bypass, S_IRUGO | S_IWUSR,
- adt7316_show_DA_CD_Vref_bypass,
- adt7316_store_DA_CD_Vref_bypass,
- 0);
+static iio_device_attr(da_cd_vref_bypass, 0644, adt7316_show_da_cd_vref_bypass,
+ adt7316_store_da_cd_vref_bypass, 0);
static ssize_t adt7316_show_DAC_internal_Vref(struct device *dev,
struct device_attribute *attr,
@@ -1111,10 +1080,8 @@ static ssize_t adt7316_store_DAC_internal_Vref(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(DAC_internal_Vref, S_IRUGO | S_IWUSR,
- adt7316_show_DAC_internal_Vref,
- adt7316_store_DAC_internal_Vref,
- 0);
+static iio_device_attr(dac_internal_vref, 0644, adt7316_show_dac_internal_vref,
+ adt7316_store_dac_internal_vref, 0);
static ssize_t adt7316_show_ad(struct adt7316_chip_info *chip,
int channel, char *buf)
@@ -1200,7 +1167,8 @@ static ssize_t adt7316_show_VDD(struct device *dev,
return adt7316_show_ad(chip, ADT7316_AD_SINGLE_CH_VDD, buf);
}
-static IIO_DEVICE_ATTR(VDD, S_IRUGO, adt7316_show_VDD, NULL, 0);
+
+static iio_device_attr(VDD, 0444, adt7316_show_VDD, NULL, 0);
static ssize_t adt7316_show_in_temp(struct device *dev,
struct device_attribute *attr,
@@ -1212,7 +1180,7 @@ static ssize_t adt7316_show_in_temp(struct device *dev,
return adt7316_show_ad(chip, ADT7316_AD_SINGLE_CH_IN, buf);
}
-static IIO_DEVICE_ATTR(in_temp, S_IRUGO, adt7316_show_in_temp, NULL, 0);
+static iio_device_attr(in_temp, 0444, adt7316_show_in_temp, NULL, 0);
static ssize_t adt7316_show_ex_temp_AIN1(struct device *dev,
struct device_attribute *attr,
@@ -1224,9 +1192,9 @@ static ssize_t adt7316_show_ex_temp_AIN1(struct device *dev,
return adt7316_show_ad(chip, ADT7316_AD_SINGLE_CH_EX, buf);
}
-static IIO_DEVICE_ATTR(ex_temp_AIN1, S_IRUGO, adt7316_show_ex_temp_AIN1,
- NULL, 0);
-static IIO_DEVICE_ATTR(ex_temp, S_IRUGO, adt7316_show_ex_temp_AIN1, NULL, 0);
+static iio_device_attr(ex_temp_ain1, 0444, adt7316_show_ex_temp_ain1, NULL, 0);
+
+static iio_device_attr(ex_temp, 0444, adt7316_show_ex_temp_ain1, NULL, 0);
static ssize_t adt7316_show_AIN2(struct device *dev,
struct device_attribute *attr,
@@ -1237,29 +1205,32 @@ static ssize_t adt7316_show_AIN2(struct device *dev,
return adt7316_show_ad(chip, ADT7516_AD_SINGLE_CH_AIN2, buf);
}
-static IIO_DEVICE_ATTR(AIN2, S_IRUGO, adt7316_show_AIN2, NULL, 0);
-static ssize_t adt7316_show_AIN3(struct device *dev,
- struct device_attribute *attr,
- char *buf)
+static iio_device_attr(ain2, 0444, adt7316_show_AIN2, NULL, 0);
+
+static ssize_t adt7316_show_ain3(struct device *dev,
+ struct device_attribute *attr,
+ char *buf)
{
struct iio_dev *dev_info = dev_to_iio_dev(dev);
struct adt7316_chip_info *chip = iio_priv(dev_info);
return adt7316_show_ad(chip, ADT7516_AD_SINGLE_CH_AIN3, buf);
}
-static IIO_DEVICE_ATTR(AIN3, S_IRUGO, adt7316_show_AIN3, NULL, 0);
-static ssize_t adt7316_show_AIN4(struct device *dev,
- struct device_attribute *attr,
- char *buf)
+static iio_device_attr(ain3, 0444, adt7316_show_ain3, NULL, 0);
+
+static ssize_t adt7316_show_ain4(struct device *dev,
+ struct device_attribute *attr,
+ char *buf)
{
struct iio_dev *dev_info = dev_to_iio_dev(dev);
struct adt7316_chip_info *chip = iio_priv(dev_info);
return adt7316_show_ad(chip, ADT7516_AD_SINGLE_CH_AIN4, buf);
}
-static IIO_DEVICE_ATTR(AIN4, S_IRUGO, adt7316_show_AIN4, NULL, 0);
+
+static iio_device_attr(ain4, 0444, adt7316_show_ain4, NULL, 0);
static ssize_t adt7316_show_temp_offset(struct adt7316_chip_info *chip,
int offset_addr, char *buf)
@@ -1324,9 +1295,8 @@ static ssize_t adt7316_store_in_temp_offset(struct device *dev,
len);
}
-static IIO_DEVICE_ATTR(in_temp_offset, S_IRUGO | S_IWUSR,
- adt7316_show_in_temp_offset,
- adt7316_store_in_temp_offset, 0);
+static iio_device_attr(in_temp_offset, 0644, adt7316_show_in_temp_offset,
+ adt7316_store_in_temp_offset, 0);
static ssize_t adt7316_show_ex_temp_offset(struct device *dev,
struct device_attribute *attr,
@@ -1404,7 +1374,7 @@ static ssize_t adt7316_store_ex_analog_temp_offset(struct device *dev,
ADT7316_EX_ANALOG_TEMP_OFFSET, buf, len);
}
-static IIO_DEVICE_ATTR(ex_analog_temp_offset, S_IRUGO | S_IWUSR,
+static iio_device_attr(ex_analog_temp_offset, 0644,
adt7316_show_ex_analog_temp_offset,
adt7316_store_ex_analog_temp_offset, 0);
@@ -1499,8 +1469,7 @@ static ssize_t adt7316_store_DAC_A(struct device *dev,
return adt7316_store_dac(chip, 0, buf, len);
}
-static IIO_DEVICE_ATTR(DAC_A, S_IRUGO | S_IWUSR, adt7316_show_DAC_A,
- adt7316_store_DAC_A, 0);
+static iio_device_attr(dac_a, 0644, adt7316_show_dac_a, adt7316_store_dac_a, 0);
static ssize_t adt7316_show_DAC_B(struct device *dev,
struct device_attribute *attr,
@@ -1523,8 +1492,7 @@ static ssize_t adt7316_store_DAC_B(struct device *dev,
return adt7316_store_dac(chip, 1, buf, len);
}
-static IIO_DEVICE_ATTR(DAC_B, S_IRUGO | S_IWUSR, adt7316_show_DAC_B,
- adt7316_store_DAC_B, 0);
+static iio_device_attr(dac_b, 0644, adt7316_show_dac_b, adt7316_store_dac_b, 0);
static ssize_t adt7316_show_DAC_C(struct device *dev,
struct device_attribute *attr,
@@ -1547,8 +1515,7 @@ static ssize_t adt7316_store_DAC_C(struct device *dev,
return adt7316_store_dac(chip, 2, buf, len);
}
-static IIO_DEVICE_ATTR(DAC_C, S_IRUGO | S_IWUSR, adt7316_show_DAC_C,
- adt7316_store_DAC_C, 0);
+static iio_device_attr(DAC_C, 0644, adt7316_show_dac_c, adt7316_store_dac_c, 0);
static ssize_t adt7316_show_DAC_D(struct device *dev,
struct device_attribute *attr,
@@ -1571,8 +1538,7 @@ static ssize_t adt7316_store_DAC_D(struct device *dev,
return adt7316_store_dac(chip, 3, buf, len);
}
-static IIO_DEVICE_ATTR(DAC_D, S_IRUGO | S_IWUSR, adt7316_show_DAC_D,
- adt7316_store_DAC_D, 0);
+static iio_device_attr(DAC_D, 0644, adt7316_show_dac_d, adt7316_store_dac_d, 0);
static ssize_t adt7316_show_device_id(struct device *dev,
struct device_attribute *attr,
@@ -1608,8 +1574,8 @@ static ssize_t adt7316_show_manufactorer_id(struct device *dev,
return sprintf(buf, "%d\n", id);
}
-static IIO_DEVICE_ATTR(manufactorer_id, S_IRUGO,
- adt7316_show_manufactorer_id, NULL, 0);
+static iio_device_attr(manufactorer_id, 0444, adt7316_show_manufactorer_id,
+ NULL, 0);
static ssize_t adt7316_show_device_rev(struct device *dev,
struct device_attribute *attr,
@@ -1627,7 +1593,7 @@ static ssize_t adt7316_show_device_rev(struct device *dev,
return sprintf(buf, "%d\n", rev);
}
-static IIO_DEVICE_ATTR(device_rev, S_IRUGO, adt7316_show_device_rev, NULL, 0);
+static iio_device_attr(device_rev, 0444, adt7316_show_device_rev, NULL, 0);
static ssize_t adt7316_show_bus_type(struct device *dev,
struct device_attribute *attr,
@@ -1648,7 +1614,7 @@ static ssize_t adt7316_show_bus_type(struct device *dev,
return sprintf(buf, "i2c\n");
}
-static IIO_DEVICE_ATTR(bus_type, S_IRUGO, adt7316_show_bus_type, NULL, 0);
+static iio_device_attr(bus_type, 0444, adt7316_show_bus_type, NULL, 0);
static struct attribute *adt7316_attributes[] = {
&iio_dev_attr_all_modes.dev_attr.attr,
@@ -1970,63 +1936,35 @@ static ssize_t adt7316_set_int_enabled(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(int_mask,
- S_IRUGO | S_IWUSR,
- adt7316_show_int_mask, adt7316_set_int_mask,
- 0);
-static IIO_DEVICE_ATTR(in_temp_high_value,
- S_IRUGO | S_IWUSR,
- adt7316_show_ad_bound, adt7316_set_ad_bound,
- ADT7316_IN_TEMP_HIGH);
-static IIO_DEVICE_ATTR(in_temp_low_value,
- S_IRUGO | S_IWUSR,
- adt7316_show_ad_bound, adt7316_set_ad_bound,
- ADT7316_IN_TEMP_LOW);
-static IIO_DEVICE_ATTR(ex_temp_high_value,
- S_IRUGO | S_IWUSR,
- adt7316_show_ad_bound, adt7316_set_ad_bound,
- ADT7316_EX_TEMP_HIGH);
-static IIO_DEVICE_ATTR(ex_temp_low_value,
- S_IRUGO | S_IWUSR,
- adt7316_show_ad_bound, adt7316_set_ad_bound,
- ADT7316_EX_TEMP_LOW);
+static iio_device_attr(int_mask, 0644, adt7316_show_int_mask,
+ adt7316_set_int_mask, 0);
+static iio_device_attr(in_temp_high_value, 0644, adt7316_show_ad_bound,
+ adt7316_set_ad_bound, ADT7316_IN_TEMP_HIGH);
+static iio_device_attr(in_temp_low_value, 0644, adt7316_show_ad_bound,
+ adt7316_set_ad_bound, ADT7316_IN_TEMP_LOW);
+static iio_device_attr(ex_temp_high_value, 0644, adt7316_show_ad_bound,
+ adt7316_set_ad_bound, ADT7316_EX_TEMP_HIGH);
+static iio_device_attr(ex_temp_low_value, 0644, adt7316_show_ad_bound,
+ adt7316_set_ad_bound, ADT7316_EX_TEMP_LOW);
/* NASTY duplication to be fixed */
-static IIO_DEVICE_ATTR(ex_temp_ain1_high_value,
- S_IRUGO | S_IWUSR,
- adt7316_show_ad_bound, adt7316_set_ad_bound,
- ADT7316_EX_TEMP_HIGH);
-static IIO_DEVICE_ATTR(ex_temp_ain1_low_value,
- S_IRUGO | S_IWUSR,
- adt7316_show_ad_bound, adt7316_set_ad_bound,
- ADT7316_EX_TEMP_LOW);
-static IIO_DEVICE_ATTR(ain2_high_value,
- S_IRUGO | S_IWUSR,
- adt7316_show_ad_bound, adt7316_set_ad_bound,
- ADT7516_AIN2_HIGH);
-static IIO_DEVICE_ATTR(ain2_low_value,
- S_IRUGO | S_IWUSR,
- adt7316_show_ad_bound, adt7316_set_ad_bound,
- ADT7516_AIN2_LOW);
-static IIO_DEVICE_ATTR(ain3_high_value,
- S_IRUGO | S_IWUSR,
- adt7316_show_ad_bound, adt7316_set_ad_bound,
- ADT7516_AIN3_HIGH);
-static IIO_DEVICE_ATTR(ain3_low_value,
- S_IRUGO | S_IWUSR,
- adt7316_show_ad_bound, adt7316_set_ad_bound,
- ADT7516_AIN3_LOW);
-static IIO_DEVICE_ATTR(ain4_high_value,
- S_IRUGO | S_IWUSR,
- adt7316_show_ad_bound, adt7316_set_ad_bound,
- ADT7516_AIN4_HIGH);
-static IIO_DEVICE_ATTR(ain4_low_value,
- S_IRUGO | S_IWUSR,
- adt7316_show_ad_bound, adt7316_set_ad_bound,
- ADT7516_AIN4_LOW);
-static IIO_DEVICE_ATTR(int_enabled,
- S_IRUGO | S_IWUSR,
- adt7316_show_int_enabled,
+static iio_device_attr(ex_temp_ain1_high_value, 0644, adt7316_show_ad_bound,
+ adt7316_set_ad_bound, ADT7316_EX_TEMP_HIGH);
+static iio_device_attr(ex_temp_ain1_low_value, 0644, adt7316_show_ad_bound,
+ adt7316_set_ad_bound, ADT7316_EX_TEMP_LOW);
+static iio_device_attr(ain2_high_value, 0644, adt7316_show_ad_bound,
+ adt7316_set_ad_bound, ADT7516_AIN2_HIGH);
+static iio_device_attr(ain2_low_value, 0644, adt7316_show_ad_bound,
+ adt7316_set_ad_bound, ADT7516_AIN2_LOW);
+static iio_device_attr(ain3_high_value, 0644, adt7316_show_ad_bound,
+ adt7316_set_ad_bound, ADT7516_AIN3_HIGH);
+static iio_device_attr(ain3_low_value, 0644, adt7316_show_ad_bound,
+ adt7316_set_ad_bound, ADT7516_AIN3_LOW);
+static iio_device_attr(ain4_high_value, 0644, adt7316_show_ad_bound,
+ adt7316_set_ad_bound, ADT7516_AIN4_HIGH);
+static iio_device_attr(ain4_low_value, 0644, adt7316_show_ad_bound,
+ adt7316_set_ad_bound, ADT7516_AIN4_LOW);
+static iio_device_attr(int_enabled, 0644, adt7316_show_int_enabled,
adt7316_set_int_enabled, 0);
static struct attribute *adt7316_event_attributes[] = {
--
2.7.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCHv4 3/8] Fix camel case issues
2016-12-25 19:56 [PATCHv4 0/8] Checkpatch fixes to driver/staging/iio/addac Scott Matheina
@ 2016-12-25 19:56 ` Scott Matheina
2016-12-25 20:54 ` kbuild test robot
2016-12-30 18:45 ` Jonathan Cameron
0 siblings, 2 replies; 13+ messages in thread
From: Scott Matheina @ 2016-12-25 19:56 UTC (permalink / raw)
To: linux-kernel
Cc: Scott Matheina, Jonathan Cameron, Hartmut Knaack,
Peter Meerwald-Stadler, linux-iio, devel
Cases of camel case were fixed by making variables lower case throughout
the file.
Signed-off-by: Scott Matheina <scott@matheina.com>
---
drivers/staging/iio/addac/adt7316.c | 82 ++++++++++++++++++-------------------
1 file changed, 41 insertions(+), 41 deletions(-)
diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
index 13d9ed2..2b584a0 100644
--- a/drivers/staging/iio/addac/adt7316.c
+++ b/drivers/staging/iio/addac/adt7316.c
@@ -1485,7 +1485,7 @@ static ssize_t adt7316_show_DAC_A(struct device *dev,
struct iio_dev *dev_info = dev_to_iio_dev(dev);
struct adt7316_chip_info *chip = iio_priv(dev_info);
- return adt7316_show_DAC(chip, 0, buf);
+ return adt7316_show_dac(chip, 0, buf);
}
static ssize_t adt7316_store_DAC_A(struct device *dev,
@@ -1496,7 +1496,7 @@ static ssize_t adt7316_store_DAC_A(struct device *dev,
struct iio_dev *dev_info = dev_to_iio_dev(dev);
struct adt7316_chip_info *chip = iio_priv(dev_info);
- return adt7316_store_DAC(chip, 0, buf, len);
+ return adt7316_store_dac(chip, 0, buf, len);
}
static IIO_DEVICE_ATTR(DAC_A, S_IRUGO | S_IWUSR, adt7316_show_DAC_A,
@@ -1509,7 +1509,7 @@ static ssize_t adt7316_show_DAC_B(struct device *dev,
struct iio_dev *dev_info = dev_to_iio_dev(dev);
struct adt7316_chip_info *chip = iio_priv(dev_info);
- return adt7316_show_DAC(chip, 1, buf);
+ return adt7316_show_dac(chip, 1, buf);
}
static ssize_t adt7316_store_DAC_B(struct device *dev,
@@ -1520,7 +1520,7 @@ static ssize_t adt7316_store_DAC_B(struct device *dev,
struct iio_dev *dev_info = dev_to_iio_dev(dev);
struct adt7316_chip_info *chip = iio_priv(dev_info);
- return adt7316_store_DAC(chip, 1, buf, len);
+ return adt7316_store_dac(chip, 1, buf, len);
}
static IIO_DEVICE_ATTR(DAC_B, S_IRUGO | S_IWUSR, adt7316_show_DAC_B,
@@ -1533,7 +1533,7 @@ static ssize_t adt7316_show_DAC_C(struct device *dev,
struct iio_dev *dev_info = dev_to_iio_dev(dev);
struct adt7316_chip_info *chip = iio_priv(dev_info);
- return adt7316_show_DAC(chip, 2, buf);
+ return adt7316_show_dac(chip, 2, buf);
}
static ssize_t adt7316_store_DAC_C(struct device *dev,
@@ -1544,7 +1544,7 @@ static ssize_t adt7316_store_DAC_C(struct device *dev,
struct iio_dev *dev_info = dev_to_iio_dev(dev);
struct adt7316_chip_info *chip = iio_priv(dev_info);
- return adt7316_store_DAC(chip, 2, buf, len);
+ return adt7316_store_dac(chip, 2, buf, len);
}
static IIO_DEVICE_ATTR(DAC_C, S_IRUGO | S_IWUSR, adt7316_show_DAC_C,
@@ -1557,7 +1557,7 @@ static ssize_t adt7316_show_DAC_D(struct device *dev,
struct iio_dev *dev_info = dev_to_iio_dev(dev);
struct adt7316_chip_info *chip = iio_priv(dev_info);
- return adt7316_show_DAC(chip, 3, buf);
+ return adt7316_show_dac(chip, 3, buf);
}
static ssize_t adt7316_store_DAC_D(struct device *dev,
@@ -1568,7 +1568,7 @@ static ssize_t adt7316_store_DAC_D(struct device *dev,
struct iio_dev *dev_info = dev_to_iio_dev(dev);
struct adt7316_chip_info *chip = iio_priv(dev_info);
- return adt7316_store_DAC(chip, 3, buf, len);
+ return adt7316_store_dac(chip, 3, buf, len);
}
static IIO_DEVICE_ATTR(DAC_D, S_IRUGO | S_IWUSR, adt7316_show_DAC_D,
@@ -1661,26 +1661,26 @@ static struct attribute *adt7316_attributes[] = {
&iio_dev_attr_powerdown.dev_attr.attr,
&iio_dev_attr_fast_ad_clock.dev_attr.attr,
&iio_dev_attr_da_high_resolution.dev_attr.attr,
- &iio_dev_attr_enable_proportion_DACA.dev_attr.attr,
- &iio_dev_attr_enable_proportion_DACB.dev_attr.attr,
- &iio_dev_attr_DAC_2Vref_channels_mask.dev_attr.attr,
- &iio_dev_attr_DAC_update_mode.dev_attr.attr,
- &iio_dev_attr_all_DAC_update_modes.dev_attr.attr,
- &iio_dev_attr_update_DAC.dev_attr.attr,
- &iio_dev_attr_DA_AB_Vref_bypass.dev_attr.attr,
- &iio_dev_attr_DA_CD_Vref_bypass.dev_attr.attr,
- &iio_dev_attr_DAC_internal_Vref.dev_attr.attr,
- &iio_dev_attr_VDD.dev_attr.attr,
+ &iio_dev_attr_enable_proportion_daca.dev_attr.attr,
+ &iio_dev_attr_enable_proportion_dacb.dev_attr.attr,
+ &iio_dev_attr_dac_2vref_channels_mask.dev_attr.attr,
+ &iio_dev_attr_dac_internal_vref.dev_attr.attr,
+ &iio_dev_attr_all_dac_update_modes.dev_attr.attr,
+ &iio_dev_attr_update_dac.dev_attr.attr,
+ &iio_dev_attr_da_ab_vref_bypass.dev_attr.attr,
+ &iio_dev_attr_da_cd_vref_bypass.dev_attr.attr,
+ &iio_dev_attr_dac_internal_vref.dev_attr.attr,
+ &iio_dev_attr_vdd.dev_attr.attr,
&iio_dev_attr_in_temp.dev_attr.attr,
&iio_dev_attr_ex_temp.dev_attr.attr,
&iio_dev_attr_in_temp_offset.dev_attr.attr,
&iio_dev_attr_ex_temp_offset.dev_attr.attr,
&iio_dev_attr_in_analog_temp_offset.dev_attr.attr,
&iio_dev_attr_ex_analog_temp_offset.dev_attr.attr,
- &iio_dev_attr_DAC_A.dev_attr.attr,
- &iio_dev_attr_DAC_B.dev_attr.attr,
- &iio_dev_attr_DAC_C.dev_attr.attr,
- &iio_dev_attr_DAC_D.dev_attr.attr,
+ &iio_dev_attr_dac_a.dev_attr.attr,
+ &iio_dev_attr_dac_b.dev_attr.attr,
+ &iio_dev_attr_dac_c.dev_attr.attr,
+ &iio_dev_attr_dac_d.dev_attr.attr,
&iio_dev_attr_device_id.dev_attr.attr,
&iio_dev_attr_manufactorer_id.dev_attr.attr,
&iio_dev_attr_device_rev.dev_attr.attr,
@@ -1703,31 +1703,31 @@ static struct attribute *adt7516_attributes[] = {
&iio_dev_attr_enable_smbus_timeout.dev_attr.attr,
&iio_dev_attr_powerdown.dev_attr.attr,
&iio_dev_attr_fast_ad_clock.dev_attr.attr,
- &iio_dev_attr_AIN_internal_Vref.dev_attr.attr,
+ &iio_dev_attr_ain_internal_vref.dev_attr.attr,
&iio_dev_attr_da_high_resolution.dev_attr.attr,
- &iio_dev_attr_enable_proportion_DACA.dev_attr.attr,
- &iio_dev_attr_enable_proportion_DACB.dev_attr.attr,
- &iio_dev_attr_DAC_2Vref_channels_mask.dev_attr.attr,
- &iio_dev_attr_DAC_update_mode.dev_attr.attr,
- &iio_dev_attr_all_DAC_update_modes.dev_attr.attr,
- &iio_dev_attr_update_DAC.dev_attr.attr,
- &iio_dev_attr_DA_AB_Vref_bypass.dev_attr.attr,
- &iio_dev_attr_DA_CD_Vref_bypass.dev_attr.attr,
- &iio_dev_attr_DAC_internal_Vref.dev_attr.attr,
- &iio_dev_attr_VDD.dev_attr.attr,
+ &iio_dev_attr_enable_proportion_daca.dev_attr.attr,
+ &iio_dev_attr_enable_proportion_dacb.dev_attr.attr,
+ &iio_dev_attr_dac_2vref_channels_mask.dev_attr.attr,
+ &iio_dev_attr_dac_update_mode.dev_attr.attr,
+ &iio_dev_attr_all_dac_update_modes.dev_attr.attr,
+ &iio_dev_attr_update_dac.dev_attr.attr,
+ &iio_dev_attr_da_ab_vref_bypass.dev_attr.attr,
+ &iio_dev_attr_da_cd_vref_bypass.dev_attr.attr,
+ &iio_dev_attr_dac_internal_vref.dev_attr.attr,
+ &iio_dev_attr_vdd.dev_attr.attr,
&iio_dev_attr_in_temp.dev_attr.attr,
- &iio_dev_attr_ex_temp_AIN1.dev_attr.attr,
- &iio_dev_attr_AIN2.dev_attr.attr,
- &iio_dev_attr_AIN3.dev_attr.attr,
- &iio_dev_attr_AIN4.dev_attr.attr,
+ &iio_dev_attr_ex_temp_ain1.dev_attr.attr,
+ &iio_dev_attr_ain2.dev_attr.attr,
+ &iio_dev_attr_ain3.dev_attr.attr,
+ &iio_dev_attr_ain4.dev_attr.attr,
&iio_dev_attr_in_temp_offset.dev_attr.attr,
&iio_dev_attr_ex_temp_offset.dev_attr.attr,
&iio_dev_attr_in_analog_temp_offset.dev_attr.attr,
&iio_dev_attr_ex_analog_temp_offset.dev_attr.attr,
- &iio_dev_attr_DAC_A.dev_attr.attr,
- &iio_dev_attr_DAC_B.dev_attr.attr,
- &iio_dev_attr_DAC_C.dev_attr.attr,
- &iio_dev_attr_DAC_D.dev_attr.attr,
+ &iio_dev_attr_dac_a.dev_attr.attr,
+ &iio_dev_attr_dac_b.dev_attr.attr,
+ &iio_dev_attr_dac_c.dev_attr.attr,
+ &iio_dev_attr_dac_d.dev_attr.attr,
&iio_dev_attr_device_id.dev_attr.attr,
&iio_dev_attr_manufactorer_id.dev_attr.attr,
&iio_dev_attr_device_rev.dev_attr.attr,
--
2.7.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCHv4 2/8] Fixed variables not being consistently lower case
2016-12-25 19:41 ` [PATCHv4 2/8] Fixed variables not being consistently lower case Scott Matheina
@ 2016-12-25 20:14 ` Al Viro
2016-12-25 22:34 ` Jonathan Cameron
0 siblings, 1 reply; 13+ messages in thread
From: Al Viro @ 2016-12-25 20:14 UTC (permalink / raw)
To: Scott Matheina
Cc: linux-kernel, Lars-Peter Clausen, Michael Hennerich,
Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
Greg Kroah-Hartman, linux-iio, devel
On Sun, Dec 25, 2016 at 01:41:06PM -0600, Scott Matheina wrote:
> Across the file, variables were sometimes upper case, some times
> lower case, this fix addresses a few of the instances with this
> inconsistency.
NAK. Go learn C and don't come back until you've done that. If somebody
has told you that you can contribute without knowing the language, they'd
lied - you really can't. And I would *STRONGLY* recommend to stay away
from drivers/staging while you are learning C - it's like trying to use
a public restroom wall as a sex-ed textbook.
While we are at it, it might be a good idea to check if the kernel
builds after your changes and see what errors are produced.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCHv4 3/8] Fix camel case issues
2016-12-25 19:56 ` [PATCHv4 3/8] Fix camel case issues Scott Matheina
@ 2016-12-25 20:54 ` kbuild test robot
2016-12-30 18:45 ` Jonathan Cameron
1 sibling, 0 replies; 13+ messages in thread
From: kbuild test robot @ 2016-12-25 20:54 UTC (permalink / raw)
To: Scott Matheina
Cc: kbuild-all, linux-kernel, devel, Scott Matheina, linux-iio,
Peter Meerwald-Stadler, Hartmut Knaack, Jonathan Cameron
[-- Attachment #1: Type: text/plain, Size: 19231 bytes --]
Hi Scott,
[auto build test ERROR on iio/togreg]
[also build test ERROR on v4.9 next-20161224]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Scott-Matheina/Checkpatch-fixes-to-driver-staging-iio-addac/20161226-041021
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: i386-randconfig-x001-201652 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All error/warnings (new ones prefixed by >>):
drivers/staging/iio/addac/adt7316.c: In function 'adt7316_show_DAC_A':
>> drivers/staging/iio/addac/adt7316.c:1488:9: error: implicit declaration of function 'adt7316_show_dac' [-Werror=implicit-function-declaration]
return adt7316_show_dac(chip, 0, buf);
^~~~~~~~~~~~~~~~
drivers/staging/iio/addac/adt7316.c: In function 'adt7316_store_DAC_A':
>> drivers/staging/iio/addac/adt7316.c:1499:9: error: implicit declaration of function 'adt7316_store_dac' [-Werror=implicit-function-declaration]
return adt7316_store_dac(chip, 0, buf, len);
^~~~~~~~~~~~~~~~~
drivers/staging/iio/addac/adt7316.c: At top level:
>> drivers/staging/iio/addac/adt7316.c:1664:3: error: 'iio_dev_attr_enable_proportion_daca' undeclared here (not in a function)
&iio_dev_attr_enable_proportion_daca.dev_attr.attr,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/iio/addac/adt7316.c:1665:3: error: 'iio_dev_attr_enable_proportion_dacb' undeclared here (not in a function)
&iio_dev_attr_enable_proportion_dacb.dev_attr.attr,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/iio/addac/adt7316.c:1666:3: error: 'iio_dev_attr_dac_2vref_channels_mask' undeclared here (not in a function)
&iio_dev_attr_dac_2vref_channels_mask.dev_attr.attr,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/iio/addac/adt7316.c:1667:3: error: 'iio_dev_attr_dac_internal_vref' undeclared here (not in a function)
&iio_dev_attr_dac_internal_vref.dev_attr.attr,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/iio/addac/adt7316.c:1668:3: error: 'iio_dev_attr_all_dac_update_modes' undeclared here (not in a function)
&iio_dev_attr_all_dac_update_modes.dev_attr.attr,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/iio/addac/adt7316.c:1669:3: error: 'iio_dev_attr_update_dac' undeclared here (not in a function)
&iio_dev_attr_update_dac.dev_attr.attr,
^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/iio/addac/adt7316.c:1670:3: error: 'iio_dev_attr_da_ab_vref_bypass' undeclared here (not in a function)
&iio_dev_attr_da_ab_vref_bypass.dev_attr.attr,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/iio/addac/adt7316.c:1671:3: error: 'iio_dev_attr_da_cd_vref_bypass' undeclared here (not in a function)
&iio_dev_attr_da_cd_vref_bypass.dev_attr.attr,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/iio/addac/adt7316.c:1673:3: error: 'iio_dev_attr_vdd' undeclared here (not in a function)
&iio_dev_attr_vdd.dev_attr.attr,
^~~~~~~~~~~~~~~~
>> drivers/staging/iio/addac/adt7316.c:1680:3: error: 'iio_dev_attr_dac_a' undeclared here (not in a function)
&iio_dev_attr_dac_a.dev_attr.attr,
^~~~~~~~~~~~~~~~~~
>> drivers/staging/iio/addac/adt7316.c:1681:3: error: 'iio_dev_attr_dac_b' undeclared here (not in a function)
&iio_dev_attr_dac_b.dev_attr.attr,
^~~~~~~~~~~~~~~~~~
>> drivers/staging/iio/addac/adt7316.c:1682:3: error: 'iio_dev_attr_dac_c' undeclared here (not in a function)
&iio_dev_attr_dac_c.dev_attr.attr,
^~~~~~~~~~~~~~~~~~
>> drivers/staging/iio/addac/adt7316.c:1683:3: error: 'iio_dev_attr_dac_d' undeclared here (not in a function)
&iio_dev_attr_dac_d.dev_attr.attr,
^~~~~~~~~~~~~~~~~~
>> drivers/staging/iio/addac/adt7316.c:1706:3: error: 'iio_dev_attr_ain_internal_vref' undeclared here (not in a function)
&iio_dev_attr_ain_internal_vref.dev_attr.attr,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/iio/addac/adt7316.c:1706:33: error: request for member 'dev_attr' in something not a structure or union
&iio_dev_attr_ain_internal_vref.dev_attr.attr,
^
>> drivers/staging/iio/addac/adt7316.c:1706:42: error: request for member 'attr' in something not a structure or union
&iio_dev_attr_ain_internal_vref.dev_attr.attr,
^
>> drivers/staging/iio/addac/adt7316.c:1706:2: error: initializer element is not constant
&iio_dev_attr_ain_internal_vref.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1706:2: note: (near initialization for 'adt7516_attributes[10]')
drivers/staging/iio/addac/adt7316.c:1708:38: error: request for member 'dev_attr' in something not a structure or union
&iio_dev_attr_enable_proportion_daca.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1708:47: error: request for member 'attr' in something not a structure or union
&iio_dev_attr_enable_proportion_daca.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1708:2: error: initializer element is not constant
&iio_dev_attr_enable_proportion_daca.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1708:2: note: (near initialization for 'adt7516_attributes[12]')
drivers/staging/iio/addac/adt7316.c:1709:38: error: request for member 'dev_attr' in something not a structure or union
&iio_dev_attr_enable_proportion_dacb.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1709:47: error: request for member 'attr' in something not a structure or union
&iio_dev_attr_enable_proportion_dacb.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1709:2: error: initializer element is not constant
&iio_dev_attr_enable_proportion_dacb.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1709:2: note: (near initialization for 'adt7516_attributes[13]')
drivers/staging/iio/addac/adt7316.c:1710:39: error: request for member 'dev_attr' in something not a structure or union
&iio_dev_attr_dac_2vref_channels_mask.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1710:48: error: request for member 'attr' in something not a structure or union
&iio_dev_attr_dac_2vref_channels_mask.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1710:2: error: initializer element is not constant
&iio_dev_attr_dac_2vref_channels_mask.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1710:2: note: (near initialization for 'adt7516_attributes[14]')
>> drivers/staging/iio/addac/adt7316.c:1711:3: error: 'iio_dev_attr_dac_update_mode' undeclared here (not in a function)
&iio_dev_attr_dac_update_mode.dev_attr.attr,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/staging/iio/addac/adt7316.c:1711:31: error: request for member 'dev_attr' in something not a structure or union
&iio_dev_attr_dac_update_mode.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1711:40: error: request for member 'attr' in something not a structure or union
&iio_dev_attr_dac_update_mode.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1711:2: error: initializer element is not constant
&iio_dev_attr_dac_update_mode.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1711:2: note: (near initialization for 'adt7516_attributes[15]')
drivers/staging/iio/addac/adt7316.c:1712:36: error: request for member 'dev_attr' in something not a structure or union
&iio_dev_attr_all_dac_update_modes.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1712:45: error: request for member 'attr' in something not a structure or union
&iio_dev_attr_all_dac_update_modes.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1712:2: error: initializer element is not constant
&iio_dev_attr_all_dac_update_modes.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1712:2: note: (near initialization for 'adt7516_attributes[16]')
drivers/staging/iio/addac/adt7316.c:1713:26: error: request for member 'dev_attr' in something not a structure or union
&iio_dev_attr_update_dac.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1713:35: error: request for member 'attr' in something not a structure or union
&iio_dev_attr_update_dac.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1713:2: error: initializer element is not constant
&iio_dev_attr_update_dac.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1713:2: note: (near initialization for 'adt7516_attributes[17]')
drivers/staging/iio/addac/adt7316.c:1714:33: error: request for member 'dev_attr' in something not a structure or union
&iio_dev_attr_da_ab_vref_bypass.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1714:42: error: request for member 'attr' in something not a structure or union
&iio_dev_attr_da_ab_vref_bypass.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1714:2: error: initializer element is not constant
&iio_dev_attr_da_ab_vref_bypass.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1714:2: note: (near initialization for 'adt7516_attributes[18]')
drivers/staging/iio/addac/adt7316.c:1715:33: error: request for member 'dev_attr' in something not a structure or union
&iio_dev_attr_da_cd_vref_bypass.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1715:42: error: request for member 'attr' in something not a structure or union
&iio_dev_attr_da_cd_vref_bypass.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1715:2: error: initializer element is not constant
&iio_dev_attr_da_cd_vref_bypass.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1715:2: note: (near initialization for 'adt7516_attributes[19]')
drivers/staging/iio/addac/adt7316.c:1716:33: error: request for member 'dev_attr' in something not a structure or union
&iio_dev_attr_dac_internal_vref.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1716:42: error: request for member 'attr' in something not a structure or union
&iio_dev_attr_dac_internal_vref.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1716:2: error: initializer element is not constant
&iio_dev_attr_dac_internal_vref.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1716:2: note: (near initialization for 'adt7516_attributes[20]')
drivers/staging/iio/addac/adt7316.c:1717:19: error: request for member 'dev_attr' in something not a structure or union
&iio_dev_attr_vdd.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1717:28: error: request for member 'attr' in something not a structure or union
&iio_dev_attr_vdd.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1717:2: error: initializer element is not constant
&iio_dev_attr_vdd.dev_attr.attr,
^
drivers/staging/iio/addac/adt7316.c:1717:2: note: (near initialization for 'adt7516_attributes[21]')
vim +/adt7316_show_dac +1488 drivers/staging/iio/addac/adt7316.c
1482 struct device_attribute *attr,
1483 char *buf)
1484 {
1485 struct iio_dev *dev_info = dev_to_iio_dev(dev);
1486 struct adt7316_chip_info *chip = iio_priv(dev_info);
1487
> 1488 return adt7316_show_dac(chip, 0, buf);
1489 }
1490
1491 static ssize_t adt7316_store_DAC_A(struct device *dev,
1492 struct device_attribute *attr,
1493 const char *buf,
1494 size_t len)
1495 {
1496 struct iio_dev *dev_info = dev_to_iio_dev(dev);
1497 struct adt7316_chip_info *chip = iio_priv(dev_info);
1498
> 1499 return adt7316_store_dac(chip, 0, buf, len);
1500 }
1501
1502 static IIO_DEVICE_ATTR(DAC_A, S_IRUGO | S_IWUSR, adt7316_show_DAC_A,
1503 adt7316_store_DAC_A, 0);
1504
1505 static ssize_t adt7316_show_DAC_B(struct device *dev,
1506 struct device_attribute *attr,
1507 char *buf)
1508 {
1509 struct iio_dev *dev_info = dev_to_iio_dev(dev);
1510 struct adt7316_chip_info *chip = iio_priv(dev_info);
1511
1512 return adt7316_show_dac(chip, 1, buf);
1513 }
1514
1515 static ssize_t adt7316_store_DAC_B(struct device *dev,
1516 struct device_attribute *attr,
1517 const char *buf,
1518 size_t len)
1519 {
1520 struct iio_dev *dev_info = dev_to_iio_dev(dev);
1521 struct adt7316_chip_info *chip = iio_priv(dev_info);
1522
1523 return adt7316_store_dac(chip, 1, buf, len);
1524 }
1525
1526 static IIO_DEVICE_ATTR(DAC_B, S_IRUGO | S_IWUSR, adt7316_show_DAC_B,
1527 adt7316_store_DAC_B, 0);
1528
1529 static ssize_t adt7316_show_DAC_C(struct device *dev,
1530 struct device_attribute *attr,
1531 char *buf)
1532 {
1533 struct iio_dev *dev_info = dev_to_iio_dev(dev);
1534 struct adt7316_chip_info *chip = iio_priv(dev_info);
1535
1536 return adt7316_show_dac(chip, 2, buf);
1537 }
1538
1539 static ssize_t adt7316_store_DAC_C(struct device *dev,
1540 struct device_attribute *attr,
1541 const char *buf,
1542 size_t len)
1543 {
1544 struct iio_dev *dev_info = dev_to_iio_dev(dev);
1545 struct adt7316_chip_info *chip = iio_priv(dev_info);
1546
1547 return adt7316_store_dac(chip, 2, buf, len);
1548 }
1549
1550 static IIO_DEVICE_ATTR(DAC_C, S_IRUGO | S_IWUSR, adt7316_show_DAC_C,
1551 adt7316_store_DAC_C, 0);
1552
1553 static ssize_t adt7316_show_DAC_D(struct device *dev,
1554 struct device_attribute *attr,
1555 char *buf)
1556 {
1557 struct iio_dev *dev_info = dev_to_iio_dev(dev);
1558 struct adt7316_chip_info *chip = iio_priv(dev_info);
1559
1560 return adt7316_show_dac(chip, 3, buf);
1561 }
1562
1563 static ssize_t adt7316_store_DAC_D(struct device *dev,
1564 struct device_attribute *attr,
1565 const char *buf,
1566 size_t len)
1567 {
1568 struct iio_dev *dev_info = dev_to_iio_dev(dev);
1569 struct adt7316_chip_info *chip = iio_priv(dev_info);
1570
1571 return adt7316_store_dac(chip, 3, buf, len);
1572 }
1573
> 1574 static IIO_DEVICE_ATTR(DAC_D, S_IRUGO | S_IWUSR, adt7316_show_DAC_D,
1575 adt7316_store_DAC_D, 0);
1576
1577 static ssize_t adt7316_show_device_id(struct device *dev,
1578 struct device_attribute *attr,
1579 char *buf)
1580 {
1581 struct iio_dev *dev_info = dev_to_iio_dev(dev);
1582 struct adt7316_chip_info *chip = iio_priv(dev_info);
1583 u8 id;
1584 int ret;
1585
1586 ret = chip->bus.read(chip->bus.client, ADT7316_DEVICE_ID, &id);
1587 if (ret)
1588 return -EIO;
1589
1590 return sprintf(buf, "%d\n", id);
1591 }
1592
1593 static IIO_DEVICE_ATTR(device_id, S_IRUGO, adt7316_show_device_id, NULL, 0);
1594
1595 static ssize_t adt7316_show_manufactorer_id(struct device *dev,
1596 struct device_attribute *attr,
1597 char *buf)
1598 {
1599 struct iio_dev *dev_info = dev_to_iio_dev(dev);
1600 struct adt7316_chip_info *chip = iio_priv(dev_info);
1601 u8 id;
1602 int ret;
1603
1604 ret = chip->bus.read(chip->bus.client, ADT7316_MANUFACTURE_ID, &id);
1605 if (ret)
1606 return -EIO;
1607
1608 return sprintf(buf, "%d\n", id);
1609 }
1610
1611 static IIO_DEVICE_ATTR(manufactorer_id, S_IRUGO,
1612 adt7316_show_manufactorer_id, NULL, 0);
1613
1614 static ssize_t adt7316_show_device_rev(struct device *dev,
1615 struct device_attribute *attr,
1616 char *buf)
1617 {
1618 struct iio_dev *dev_info = dev_to_iio_dev(dev);
1619 struct adt7316_chip_info *chip = iio_priv(dev_info);
1620 u8 rev;
1621 int ret;
1622
1623 ret = chip->bus.read(chip->bus.client, ADT7316_DEVICE_REV, &rev);
1624 if (ret)
1625 return -EIO;
1626
1627 return sprintf(buf, "%d\n", rev);
1628 }
1629
1630 static IIO_DEVICE_ATTR(device_rev, S_IRUGO, adt7316_show_device_rev, NULL, 0);
1631
1632 static ssize_t adt7316_show_bus_type(struct device *dev,
1633 struct device_attribute *attr,
1634 char *buf)
1635 {
1636 struct iio_dev *dev_info = dev_to_iio_dev(dev);
1637 struct adt7316_chip_info *chip = iio_priv(dev_info);
1638 u8 stat;
1639 int ret;
1640
1641 ret = chip->bus.read(chip->bus.client, ADT7316_SPI_LOCK_STAT, &stat);
1642 if (ret)
1643 return -EIO;
1644
1645 if (stat)
1646 return sprintf(buf, "spi\n");
1647
1648 return sprintf(buf, "i2c\n");
1649 }
1650
1651 static IIO_DEVICE_ATTR(bus_type, S_IRUGO, adt7316_show_bus_type, NULL, 0);
1652
1653 static struct attribute *adt7316_attributes[] = {
1654 &iio_dev_attr_all_modes.dev_attr.attr,
1655 &iio_dev_attr_mode.dev_attr.attr,
1656 &iio_dev_attr_enabled.dev_attr.attr,
1657 &iio_dev_attr_ad_channel.dev_attr.attr,
1658 &iio_dev_attr_all_ad_channels.dev_attr.attr,
1659 &iio_dev_attr_disable_averaging.dev_attr.attr,
1660 &iio_dev_attr_enable_smbus_timeout.dev_attr.attr,
1661 &iio_dev_attr_powerdown.dev_attr.attr,
1662 &iio_dev_attr_fast_ad_clock.dev_attr.attr,
1663 &iio_dev_attr_da_high_resolution.dev_attr.attr,
> 1664 &iio_dev_attr_enable_proportion_daca.dev_attr.attr,
> 1665 &iio_dev_attr_enable_proportion_dacb.dev_attr.attr,
> 1666 &iio_dev_attr_dac_2vref_channels_mask.dev_attr.attr,
> 1667 &iio_dev_attr_dac_internal_vref.dev_attr.attr,
> 1668 &iio_dev_attr_all_dac_update_modes.dev_attr.attr,
> 1669 &iio_dev_attr_update_dac.dev_attr.attr,
> 1670 &iio_dev_attr_da_ab_vref_bypass.dev_attr.attr,
> 1671 &iio_dev_attr_da_cd_vref_bypass.dev_attr.attr,
1672 &iio_dev_attr_dac_internal_vref.dev_attr.attr,
> 1673 &iio_dev_attr_vdd.dev_attr.attr,
1674 &iio_dev_attr_in_temp.dev_attr.attr,
1675 &iio_dev_attr_ex_temp.dev_attr.attr,
1676 &iio_dev_attr_in_temp_offset.dev_attr.attr,
1677 &iio_dev_attr_ex_temp_offset.dev_attr.attr,
1678 &iio_dev_attr_in_analog_temp_offset.dev_attr.attr,
1679 &iio_dev_attr_ex_analog_temp_offset.dev_attr.attr,
> 1680 &iio_dev_attr_dac_a.dev_attr.attr,
> 1681 &iio_dev_attr_dac_b.dev_attr.attr,
> 1682 &iio_dev_attr_dac_c.dev_attr.attr,
> 1683 &iio_dev_attr_dac_d.dev_attr.attr,
1684 &iio_dev_attr_device_id.dev_attr.attr,
1685 &iio_dev_attr_manufactorer_id.dev_attr.attr,
1686 &iio_dev_attr_device_rev.dev_attr.attr,
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 25756 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCHv4 2/8] Fixed variables not being consistently lower case
2016-12-25 20:14 ` Al Viro
@ 2016-12-25 22:34 ` Jonathan Cameron
2016-12-26 0:13 ` Al Viro
0 siblings, 1 reply; 13+ messages in thread
From: Jonathan Cameron @ 2016-12-25 22:34 UTC (permalink / raw)
To: Al Viro, Scott Matheina
Cc: linux-kernel, Lars-Peter Clausen, Michael Hennerich,
Jonathan Cameron, Hartmut Knaack, Peter Meerwald-Stadler,
Greg Kroah-Hartman, linux-iio, devel
On 25 December 2016 20:14:09 GMT+00:00, Al Viro <viro@ZenIV.linux.org.uk> wrote:
>On Sun, Dec 25, 2016 at 01:41:06PM -0600, Scott Matheina wrote:
>> Across the file, variables were sometimes upper case, some times
>> lower case, this fix addresses a few of the instances with this
>> inconsistency.
>
>NAK. Go learn C and don't come back until you've done that. If
>somebody
>has told you that you can contribute without knowing the language,
>they'd
>lied - you really can't. And I would *STRONGLY* recommend to stay away
>from drivers/staging while you are learning C - it's like trying to use
>a public restroom wall as a sex-ed textbook.
Please can we keep things polite.
Jonathan
>
>While we are at it, it might be a good idea to check if the kernel
>builds after your changes and see what errors are produced.
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCHv4 2/8] Fixed variables not being consistently lower case
2016-12-25 22:34 ` Jonathan Cameron
@ 2016-12-26 0:13 ` Al Viro
0 siblings, 0 replies; 13+ messages in thread
From: Al Viro @ 2016-12-26 0:13 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Scott Matheina, linux-kernel, Lars-Peter Clausen,
Michael Hennerich, Jonathan Cameron, Hartmut Knaack,
Peter Meerwald-Stadler, Greg Kroah-Hartman, linux-iio, devel
On Sun, Dec 25, 2016 at 10:34:54PM +0000, Jonathan Cameron wrote:
>
>
> On 25 December 2016 20:14:09 GMT+00:00, Al Viro <viro@ZenIV.linux.org.uk> wrote:
> >On Sun, Dec 25, 2016 at 01:41:06PM -0600, Scott Matheina wrote:
> >> Across the file, variables were sometimes upper case, some times
> >> lower case, this fix addresses a few of the instances with this
> >> inconsistency.
> >
> >NAK. Go learn C and don't come back until you've done that. If
> >somebody
> >has told you that you can contribute without knowing the language,
> >they'd
> >lied - you really can't. And I would *STRONGLY* recommend to stay away
> >from drivers/staging while you are learning C - it's like trying to use
> >a public restroom wall as a sex-ed textbook.
>
> Please can we keep things polite.
In case you have not realized it,
* Scott is -><- that close to joining the select group of kooks who
get filtered out within days of getting a new account. At this point he
probably still can spend a while learning what needs to be learnt and
reappear with less inane patches after a while, with everything getting
forgotten. A week more of the same kind of postings will almost certainly
cement the reputation of clue-resistant noise source beyond any chance of
repair.
* I am 100% sure that he has not learnt C - hadn't even started doing
so. This, BTW, is not a value judgement of any kind; it's just a highly
likely conclusion based on what he'd been posting. This particular patch,
for example, changes identifiers in a bunch of places, none of which happens
to be a declaration. The reasons why that cannot be correct become obvious
to anyone who had opened _any_ textbook after a few pages. Or tried to
write and run any program in C. Again, it's not "should" - it's really one
of the first things that gets learnt ("you need to declare all variables
explicitly and the names are case-sensitive").
* One really cannot produce any useful patches without understanding
the language. As this (and previous) patch series sent by Scott has
demonstrated, BTW. Learning C is a hard prerequisite for doing any development
in a project written in C, including the kernel. Fortunately, it is not
hard to do.
* Trying to do that purely by osmosis is not the best way, but it's
doable. HOWEVER, trying to do that by osmosis when swimming in drivers/staging
is really on par with using a WC wall as sex ed tutorial. Results will be
awkward, painful and won't satisfy anybody. Very odd ideas of how the things
work are also practically guaranteed.
drivers/staging can serve as a playground for learning how to
produce patches, but only if you already know the language. Otherwise
it really, really must be avoided - it's full of unidiomatic and very
badly written C. It serves as quarantine barracks for much more serious
reasons than anything checkpatch.pl is capable of picking. Directing the
folks new to kernel development towards that pile of code is not particularly
kind, but potentially useful. Doing that to those who are still learning C
goes far beyond "not kind". I can't stress it enough - don't go there if
you are still learning the language.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCHv4 3/8] Fix camel case issues
2016-12-25 19:56 ` [PATCHv4 3/8] Fix camel case issues Scott Matheina
2016-12-25 20:54 ` kbuild test robot
@ 2016-12-30 18:45 ` Jonathan Cameron
1 sibling, 0 replies; 13+ messages in thread
From: Jonathan Cameron @ 2016-12-30 18:45 UTC (permalink / raw)
To: Scott Matheina, linux-kernel
Cc: Hartmut Knaack, Peter Meerwald-Stadler, linux-iio, devel
On 25/12/16 19:56, Scott Matheina wrote:
> Cases of camel case were fixed by making variables lower case throughout
> the file.
>
> Signed-off-by: Scott Matheina <scott@matheina.com>
So of these cases might arguably be worth doing, but extreme care is needed to ensure
that the code is not broken.
Also, you are modifiying userspace ABI here so another level of care is needed.
To approach this sort of change I would suggest an RFC for the proposed ABI
changes.
In this particular case the driver is so far from standard ABI that you would
likely get the response that it needs to conform to standard ABI rather than
fixing it's own random choices of what sysfs files should be called.
Jonathan
> ---
> drivers/staging/iio/addac/adt7316.c | 82 ++++++++++++++++++-------------------
> 1 file changed, 41 insertions(+), 41 deletions(-)
>
> diff --git a/drivers/staging/iio/addac/adt7316.c b/drivers/staging/iio/addac/adt7316.c
> index 13d9ed2..2b584a0 100644
> --- a/drivers/staging/iio/addac/adt7316.c
> +++ b/drivers/staging/iio/addac/adt7316.c
> @@ -1485,7 +1485,7 @@ static ssize_t adt7316_show_DAC_A(struct device *dev,
> struct iio_dev *dev_info = dev_to_iio_dev(dev);
> struct adt7316_chip_info *chip = iio_priv(dev_info);
>
> - return adt7316_show_DAC(chip, 0, buf);
> + return adt7316_show_dac(chip, 0, buf);
> }
>
> static ssize_t adt7316_store_DAC_A(struct device *dev,
> @@ -1496,7 +1496,7 @@ static ssize_t adt7316_store_DAC_A(struct device *dev,
> struct iio_dev *dev_info = dev_to_iio_dev(dev);
> struct adt7316_chip_info *chip = iio_priv(dev_info);
>
> - return adt7316_store_DAC(chip, 0, buf, len);
> + return adt7316_store_dac(chip, 0, buf, len);
> }
>
> static IIO_DEVICE_ATTR(DAC_A, S_IRUGO | S_IWUSR, adt7316_show_DAC_A,
> @@ -1509,7 +1509,7 @@ static ssize_t adt7316_show_DAC_B(struct device *dev,
> struct iio_dev *dev_info = dev_to_iio_dev(dev);
> struct adt7316_chip_info *chip = iio_priv(dev_info);
>
> - return adt7316_show_DAC(chip, 1, buf);
> + return adt7316_show_dac(chip, 1, buf);
> }
>
> static ssize_t adt7316_store_DAC_B(struct device *dev,
> @@ -1520,7 +1520,7 @@ static ssize_t adt7316_store_DAC_B(struct device *dev,
> struct iio_dev *dev_info = dev_to_iio_dev(dev);
> struct adt7316_chip_info *chip = iio_priv(dev_info);
>
> - return adt7316_store_DAC(chip, 1, buf, len);
> + return adt7316_store_dac(chip, 1, buf, len);
> }
>
> static IIO_DEVICE_ATTR(DAC_B, S_IRUGO | S_IWUSR, adt7316_show_DAC_B,
> @@ -1533,7 +1533,7 @@ static ssize_t adt7316_show_DAC_C(struct device *dev,
> struct iio_dev *dev_info = dev_to_iio_dev(dev);
> struct adt7316_chip_info *chip = iio_priv(dev_info);
>
> - return adt7316_show_DAC(chip, 2, buf);
> + return adt7316_show_dac(chip, 2, buf);
> }
>
> static ssize_t adt7316_store_DAC_C(struct device *dev,
> @@ -1544,7 +1544,7 @@ static ssize_t adt7316_store_DAC_C(struct device *dev,
> struct iio_dev *dev_info = dev_to_iio_dev(dev);
> struct adt7316_chip_info *chip = iio_priv(dev_info);
>
> - return adt7316_store_DAC(chip, 2, buf, len);
> + return adt7316_store_dac(chip, 2, buf, len);
> }
>
> static IIO_DEVICE_ATTR(DAC_C, S_IRUGO | S_IWUSR, adt7316_show_DAC_C,
> @@ -1557,7 +1557,7 @@ static ssize_t adt7316_show_DAC_D(struct device *dev,
> struct iio_dev *dev_info = dev_to_iio_dev(dev);
> struct adt7316_chip_info *chip = iio_priv(dev_info);
>
> - return adt7316_show_DAC(chip, 3, buf);
> + return adt7316_show_dac(chip, 3, buf);
> }
>
> static ssize_t adt7316_store_DAC_D(struct device *dev,
> @@ -1568,7 +1568,7 @@ static ssize_t adt7316_store_DAC_D(struct device *dev,
> struct iio_dev *dev_info = dev_to_iio_dev(dev);
> struct adt7316_chip_info *chip = iio_priv(dev_info);
>
> - return adt7316_store_DAC(chip, 3, buf, len);
> + return adt7316_store_dac(chip, 3, buf, len);
> }
>
> static IIO_DEVICE_ATTR(DAC_D, S_IRUGO | S_IWUSR, adt7316_show_DAC_D,
> @@ -1661,26 +1661,26 @@ static struct attribute *adt7316_attributes[] = {
> &iio_dev_attr_powerdown.dev_attr.attr,
> &iio_dev_attr_fast_ad_clock.dev_attr.attr,
> &iio_dev_attr_da_high_resolution.dev_attr.attr,
> - &iio_dev_attr_enable_proportion_DACA.dev_attr.attr,
> - &iio_dev_attr_enable_proportion_DACB.dev_attr.attr,
> - &iio_dev_attr_DAC_2Vref_channels_mask.dev_attr.attr,
> - &iio_dev_attr_DAC_update_mode.dev_attr.attr,
> - &iio_dev_attr_all_DAC_update_modes.dev_attr.attr,
> - &iio_dev_attr_update_DAC.dev_attr.attr,
> - &iio_dev_attr_DA_AB_Vref_bypass.dev_attr.attr,
> - &iio_dev_attr_DA_CD_Vref_bypass.dev_attr.attr,
> - &iio_dev_attr_DAC_internal_Vref.dev_attr.attr,
> - &iio_dev_attr_VDD.dev_attr.attr,
> + &iio_dev_attr_enable_proportion_daca.dev_attr.attr,
> + &iio_dev_attr_enable_proportion_dacb.dev_attr.attr,
> + &iio_dev_attr_dac_2vref_channels_mask.dev_attr.attr,
> + &iio_dev_attr_dac_internal_vref.dev_attr.attr,
> + &iio_dev_attr_all_dac_update_modes.dev_attr.attr,
> + &iio_dev_attr_update_dac.dev_attr.attr,
> + &iio_dev_attr_da_ab_vref_bypass.dev_attr.attr,
> + &iio_dev_attr_da_cd_vref_bypass.dev_attr.attr,
> + &iio_dev_attr_dac_internal_vref.dev_attr.attr,
> + &iio_dev_attr_vdd.dev_attr.attr,
> &iio_dev_attr_in_temp.dev_attr.attr,
> &iio_dev_attr_ex_temp.dev_attr.attr,
> &iio_dev_attr_in_temp_offset.dev_attr.attr,
> &iio_dev_attr_ex_temp_offset.dev_attr.attr,
> &iio_dev_attr_in_analog_temp_offset.dev_attr.attr,
> &iio_dev_attr_ex_analog_temp_offset.dev_attr.attr,
> - &iio_dev_attr_DAC_A.dev_attr.attr,
> - &iio_dev_attr_DAC_B.dev_attr.attr,
> - &iio_dev_attr_DAC_C.dev_attr.attr,
> - &iio_dev_attr_DAC_D.dev_attr.attr,
> + &iio_dev_attr_dac_a.dev_attr.attr,
> + &iio_dev_attr_dac_b.dev_attr.attr,
> + &iio_dev_attr_dac_c.dev_attr.attr,
> + &iio_dev_attr_dac_d.dev_attr.attr,
> &iio_dev_attr_device_id.dev_attr.attr,
> &iio_dev_attr_manufactorer_id.dev_attr.attr,
> &iio_dev_attr_device_rev.dev_attr.attr,
> @@ -1703,31 +1703,31 @@ static struct attribute *adt7516_attributes[] = {
> &iio_dev_attr_enable_smbus_timeout.dev_attr.attr,
> &iio_dev_attr_powerdown.dev_attr.attr,
> &iio_dev_attr_fast_ad_clock.dev_attr.attr,
> - &iio_dev_attr_AIN_internal_Vref.dev_attr.attr,
> + &iio_dev_attr_ain_internal_vref.dev_attr.attr,
> &iio_dev_attr_da_high_resolution.dev_attr.attr,
> - &iio_dev_attr_enable_proportion_DACA.dev_attr.attr,
> - &iio_dev_attr_enable_proportion_DACB.dev_attr.attr,
> - &iio_dev_attr_DAC_2Vref_channels_mask.dev_attr.attr,
> - &iio_dev_attr_DAC_update_mode.dev_attr.attr,
> - &iio_dev_attr_all_DAC_update_modes.dev_attr.attr,
> - &iio_dev_attr_update_DAC.dev_attr.attr,
> - &iio_dev_attr_DA_AB_Vref_bypass.dev_attr.attr,
> - &iio_dev_attr_DA_CD_Vref_bypass.dev_attr.attr,
> - &iio_dev_attr_DAC_internal_Vref.dev_attr.attr,
> - &iio_dev_attr_VDD.dev_attr.attr,
> + &iio_dev_attr_enable_proportion_daca.dev_attr.attr,
> + &iio_dev_attr_enable_proportion_dacb.dev_attr.attr,
> + &iio_dev_attr_dac_2vref_channels_mask.dev_attr.attr,
> + &iio_dev_attr_dac_update_mode.dev_attr.attr,
> + &iio_dev_attr_all_dac_update_modes.dev_attr.attr,
> + &iio_dev_attr_update_dac.dev_attr.attr,
> + &iio_dev_attr_da_ab_vref_bypass.dev_attr.attr,
> + &iio_dev_attr_da_cd_vref_bypass.dev_attr.attr,
> + &iio_dev_attr_dac_internal_vref.dev_attr.attr,
> + &iio_dev_attr_vdd.dev_attr.attr,
> &iio_dev_attr_in_temp.dev_attr.attr,
> - &iio_dev_attr_ex_temp_AIN1.dev_attr.attr,
> - &iio_dev_attr_AIN2.dev_attr.attr,
> - &iio_dev_attr_AIN3.dev_attr.attr,
> - &iio_dev_attr_AIN4.dev_attr.attr,
> + &iio_dev_attr_ex_temp_ain1.dev_attr.attr,
> + &iio_dev_attr_ain2.dev_attr.attr,
> + &iio_dev_attr_ain3.dev_attr.attr,
> + &iio_dev_attr_ain4.dev_attr.attr,
> &iio_dev_attr_in_temp_offset.dev_attr.attr,
> &iio_dev_attr_ex_temp_offset.dev_attr.attr,
> &iio_dev_attr_in_analog_temp_offset.dev_attr.attr,
> &iio_dev_attr_ex_analog_temp_offset.dev_attr.attr,
> - &iio_dev_attr_DAC_A.dev_attr.attr,
> - &iio_dev_attr_DAC_B.dev_attr.attr,
> - &iio_dev_attr_DAC_C.dev_attr.attr,
> - &iio_dev_attr_DAC_D.dev_attr.attr,
> + &iio_dev_attr_dac_a.dev_attr.attr,
> + &iio_dev_attr_dac_b.dev_attr.attr,
> + &iio_dev_attr_dac_c.dev_attr.attr,
> + &iio_dev_attr_dac_d.dev_attr.attr,
> &iio_dev_attr_device_id.dev_attr.attr,
> &iio_dev_attr_manufactorer_id.dev_attr.attr,
> &iio_dev_attr_device_rev.dev_attr.attr,
>
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2016-12-30 18:45 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-25 19:41 [PATCHv4 0/8] Checkpatch fixes to driver/staging/iio/addac Scott Matheina
2016-12-25 19:41 ` [PATCHv4 1/8] fixed long description text exceeding 80 characters Scott Matheina
2016-12-25 19:41 ` [PATCHv4 2/8] Fixed variables not being consistently lower case Scott Matheina
2016-12-25 20:14 ` Al Viro
2016-12-25 22:34 ` Jonathan Cameron
2016-12-26 0:13 ` Al Viro
2016-12-25 19:41 ` [PATCHv4 3/8] Fix camel case issues Scott Matheina
2016-12-25 19:41 ` [PATCHv4 4/8] Fix braces not present on all arms of if else statement Scott Matheina
2016-12-25 19:41 ` [PATCHv4 5/8] Remove line after closing braces Scott Matheina
2016-12-25 19:41 ` [PATCHv4 7/8] Changed code to align with coding style of using octat Scott Matheina
-- strict thread matches above, loose matches on Subject: below --
2016-12-25 19:56 [PATCHv4 0/8] Checkpatch fixes to driver/staging/iio/addac Scott Matheina
2016-12-25 19:56 ` [PATCHv4 3/8] Fix camel case issues Scott Matheina
2016-12-25 20:54 ` kbuild test robot
2016-12-30 18:45 ` 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).