regulator: axp20x: Use of_match name as default regulator name
authorChen-Yu Tsai <wens@csie.org>
Mon, 15 Feb 2016 10:31:22 +0000 (18:31 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 15 Feb 2016 20:02:43 +0000 (20:02 +0000)
Originally the helper macros used uppercase regulator names, which
are primarily used to expand to the regulator ID enum, as the default
names. This is aestheticly unpleasent.

Since the of_match bits are the same, just lowercase, use that as the
default names instead.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/axp20x-regulator.c

index 7d29893f833c32f2350d6771e65e3c3ded6ae2a6..214e815e98eb0d3197dc9f6441d4498863746344 100644 (file)
@@ -39,7 +39,7 @@
 #define AXP_DESC_IO(_family, _id, _match, _supply, _min, _max, _step, _vreg,   \
                    _vmask, _ereg, _emask, _enable_val, _disable_val)           \
        [_family##_##_id] = {                                                   \
-               .name           = #_id,                                         \
+               .name           = (_match),                                     \
                .supply_name    = (_supply),                                    \
                .of_match       = of_match_ptr(_match),                         \
                .regulators_node = of_match_ptr("regulators"),                  \
@@ -61,7 +61,7 @@
 #define AXP_DESC(_family, _id, _match, _supply, _min, _max, _step, _vreg,      \
                 _vmask, _ereg, _emask)                                         \
        [_family##_##_id] = {                                                   \
-               .name           = #_id,                                         \
+               .name           = (_match),                                     \
                .supply_name    = (_supply),                                    \
                .of_match       = of_match_ptr(_match),                         \
                .regulators_node = of_match_ptr("regulators"),                  \
@@ -80,7 +80,7 @@
 
 #define AXP_DESC_SW(_family, _id, _match, _supply, _ereg, _emask)              \
        [_family##_##_id] = {                                                   \
-               .name           = #_id,                                         \
+               .name           = (_match),                                     \
                .supply_name    = (_supply),                                    \
                .of_match       = of_match_ptr(_match),                         \
                .regulators_node = of_match_ptr("regulators"),                  \
@@ -94,7 +94,7 @@
 
 #define AXP_DESC_FIXED(_family, _id, _match, _supply, _volt)                   \
        [_family##_##_id] = {                                                   \
-               .name           = #_id,                                         \
+               .name           = (_match),                                     \
                .supply_name    = (_supply),                                    \
                .of_match       = of_match_ptr(_match),                         \
                .regulators_node = of_match_ptr("regulators"),                  \
 #define AXP_DESC_RANGES(_family, _id, _match, _supply, _ranges, _n_voltages,   \
                        _vreg, _vmask, _ereg, _emask)                           \
        [_family##_##_id] = {                                                   \
-               .name           = #_id,                                         \
+               .name           = (_match),                                     \
                .supply_name    = (_supply),                                    \
                .of_match       = of_match_ptr(_match),                         \
                .regulators_node = of_match_ptr("regulators"),                  \
This page took 0.027629 seconds and 5 git commands to generate.