From: Jonathan Cameron Date: Tue, 21 Sep 2010 13:41:05 +0000 (+0100) Subject: staging: iio: max1363 add _index attribute registration X-Git-Tag: firefly_0821_release~7613^2~3583^2~3^2~513 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=77b3d3facfb32913a85f40156e7d4a70b18d0bd6;p=firefly-linux-kernel-4.4.55.git staging: iio: max1363 add _index attribute registration Also fixes a missing NULL to terminate one of the attribute arrays. Signed-off-by: Jonathan Cameron Signed-off-by: Manuel Stahl Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/adc/max1363_core.c b/drivers/staging/iio/adc/max1363_core.c index d59a8d2f4202..06c602467c6e 100644 --- a/drivers/staging/iio/adc/max1363_core.c +++ b/drivers/staging/iio/adc/max1363_core.c @@ -385,13 +385,21 @@ static struct attribute_group max1363_dev_attr_group = { static struct attribute *max1363_scan_el_attrs[] = { &iio_scan_el_in0.dev_attr.attr, &dev_attr_in0_type.attr, + &iio_const_attr_in0_index.dev_attr.attr, &iio_scan_el_in1.dev_attr.attr, &dev_attr_in1_type.attr, + &iio_const_attr_in1_index.dev_attr.attr, &iio_scan_el_in2.dev_attr.attr, &dev_attr_in2_type.attr, + &iio_const_attr_in2_index.dev_attr.attr, &iio_scan_el_in3.dev_attr.attr, &dev_attr_in3_type.attr, + &iio_const_attr_in3_index.dev_attr.attr, &iio_scan_el_in0min1.dev_attr.attr, &dev_attr_in0min1_type.attr, + &iio_const_attr_in0min1_index.dev_attr.attr, &iio_scan_el_in2min3.dev_attr.attr, &dev_attr_in2min3_type.attr, + &iio_const_attr_in2min3_index.dev_attr.attr, &iio_scan_el_in1min0.dev_attr.attr, &dev_attr_in1min0_type.attr, + &iio_const_attr_in1min0_index.dev_attr.attr, &iio_scan_el_in3min2.dev_attr.attr, &dev_attr_in3min2_type.attr, + &iio_const_attr_in3min2_index.dev_attr.attr, NULL, }; @@ -458,29 +466,53 @@ static struct attribute_group max1238_dev_attr_group = { static struct attribute *max1238_scan_el_attrs[] = { &iio_scan_el_in0.dev_attr.attr, &dev_attr_in0_type.attr, + &iio_const_attr_in0_index.dev_attr.attr, &iio_scan_el_in1.dev_attr.attr, &dev_attr_in1_type.attr, + &iio_const_attr_in1_index.dev_attr.attr, &iio_scan_el_in2.dev_attr.attr, &dev_attr_in2_type.attr, + &iio_const_attr_in2_index.dev_attr.attr, &iio_scan_el_in3.dev_attr.attr, &dev_attr_in3_type.attr, + &iio_const_attr_in3_index.dev_attr.attr, &iio_scan_el_in4.dev_attr.attr, &dev_attr_in4_type.attr, + &iio_const_attr_in4_index.dev_attr.attr, &iio_scan_el_in5.dev_attr.attr, &dev_attr_in5_type.attr, + &iio_const_attr_in5_index.dev_attr.attr, &iio_scan_el_in6.dev_attr.attr, &dev_attr_in6_type.attr, + &iio_const_attr_in6_index.dev_attr.attr, &iio_scan_el_in7.dev_attr.attr, &dev_attr_in7_type.attr, + &iio_const_attr_in7_index.dev_attr.attr, &iio_scan_el_in8.dev_attr.attr, &dev_attr_in8_type.attr, + &iio_const_attr_in8_index.dev_attr.attr, &iio_scan_el_in9.dev_attr.attr, &dev_attr_in9_type.attr, + &iio_const_attr_in9_index.dev_attr.attr, &iio_scan_el_in10.dev_attr.attr, &dev_attr_in10_type.attr, + &iio_const_attr_in10_index.dev_attr.attr, &iio_scan_el_in11.dev_attr.attr, &dev_attr_in11_type.attr, + &iio_const_attr_in11_index.dev_attr.attr, &iio_scan_el_in0min1.dev_attr.attr, &dev_attr_in0min1_type.attr, + &iio_const_attr_in0min1_index.dev_attr.attr, &iio_scan_el_in2min3.dev_attr.attr, &dev_attr_in2min3_type.attr, + &iio_const_attr_in2min3_index.dev_attr.attr, &iio_scan_el_in4min5.dev_attr.attr, &dev_attr_in4min5_type.attr, + &iio_const_attr_in4min5_index.dev_attr.attr, &iio_scan_el_in6min7.dev_attr.attr, &dev_attr_in6min7_type.attr, + &iio_const_attr_in6min7_index.dev_attr.attr, &iio_scan_el_in8min9.dev_attr.attr, &dev_attr_in8min9_type.attr, + &iio_const_attr_in8min9_index.dev_attr.attr, &iio_scan_el_in10min11.dev_attr.attr, &dev_attr_in10min11_type.attr, + &iio_const_attr_in10min11_index.dev_attr.attr, &iio_scan_el_in1min0.dev_attr.attr, &dev_attr_in1min0_type.attr, + &iio_const_attr_in1min0_index.dev_attr.attr, &iio_scan_el_in3min2.dev_attr.attr, &dev_attr_in3min2_type.attr, + &iio_const_attr_in3min2_index.dev_attr.attr, &iio_scan_el_in5min4.dev_attr.attr, &dev_attr_in5min4_type.attr, + &iio_const_attr_in5min4_index.dev_attr.attr, &iio_scan_el_in7min6.dev_attr.attr, &dev_attr_in7min6_type.attr, + &iio_const_attr_in7min6_index.dev_attr.attr, &iio_scan_el_in9min8.dev_attr.attr, &dev_attr_in9min8_type.attr, + &iio_const_attr_in9min8_index.dev_attr.attr, &iio_scan_el_in11min10.dev_attr.attr, &dev_attr_in11min10_type.attr, + &iio_const_attr_in11min10_index.dev_attr.attr, NULL, }; @@ -536,21 +568,38 @@ static struct attribute_group max11608_dev_attr_group = { static struct attribute *max11608_scan_el_attrs[] = { &iio_scan_el_in0.dev_attr.attr, &dev_attr_in0_type.attr, + &iio_const_attr_in0_index.dev_attr.attr, &iio_scan_el_in1.dev_attr.attr, &dev_attr_in1_type.attr, + &iio_const_attr_in1_index.dev_attr.attr, &iio_scan_el_in2.dev_attr.attr, &dev_attr_in2_type.attr, + &iio_const_attr_in2_index.dev_attr.attr, &iio_scan_el_in3.dev_attr.attr, &dev_attr_in3_type.attr, + &iio_const_attr_in3_index.dev_attr.attr, &iio_scan_el_in4.dev_attr.attr, &dev_attr_in4_type.attr, + &iio_const_attr_in4_index.dev_attr.attr, &iio_scan_el_in5.dev_attr.attr, &dev_attr_in5_type.attr, + &iio_const_attr_in5_index.dev_attr.attr, &iio_scan_el_in6.dev_attr.attr, &dev_attr_in6_type.attr, + &iio_const_attr_in6_index.dev_attr.attr, &iio_scan_el_in7.dev_attr.attr, &dev_attr_in7_type.attr, + &iio_const_attr_in7_index.dev_attr.attr, &iio_scan_el_in0min1.dev_attr.attr, &dev_attr_in0min1_type.attr, + &iio_const_attr_in0min1_index.dev_attr.attr, &iio_scan_el_in2min3.dev_attr.attr, &dev_attr_in2min3_type.attr, + &iio_const_attr_in2min3_index.dev_attr.attr, &iio_scan_el_in4min5.dev_attr.attr, &dev_attr_in4min5_type.attr, + &iio_const_attr_in4min5_index.dev_attr.attr, &iio_scan_el_in6min7.dev_attr.attr, &dev_attr_in6min7_type.attr, + &iio_const_attr_in6min7_index.dev_attr.attr, &iio_scan_el_in1min0.dev_attr.attr, &dev_attr_in1min0_type.attr, + &iio_const_attr_in1min0_index.dev_attr.attr, &iio_scan_el_in3min2.dev_attr.attr, &dev_attr_in3min2_type.attr, + &iio_const_attr_in3min2_index.dev_attr.attr, &iio_scan_el_in5min4.dev_attr.attr, &dev_attr_in5min4_type.attr, + &iio_const_attr_in5min4_index.dev_attr.attr, &iio_scan_el_in7min6.dev_attr.attr, &dev_attr_in7min6_type.attr, + &iio_const_attr_in7min6_index.dev_attr.attr, + NULL }; static struct attribute_group max11608_scan_el_group = {