regulator: axp20x: Use of_match name as default regulator name
[cascardo/linux.git] / drivers / regulator / axp20x-regulator.c
index 7d29893..214e815 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"),                  \