diff options
Diffstat (limited to 'drivers/base/power/opp/debugfs.c')
-rw-r--r-- | drivers/base/power/opp/debugfs.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/base/power/opp/debugfs.c b/drivers/base/power/opp/debugfs.c index 95f433db4ac7..81cf120fcf43 100644 --- a/drivers/base/power/opp/debugfs.c +++ b/drivers/base/power/opp/debugfs.c | |||
@@ -40,11 +40,10 @@ static bool opp_debug_create_supplies(struct dev_pm_opp *opp, | |||
40 | struct dentry *pdentry) | 40 | struct dentry *pdentry) |
41 | { | 41 | { |
42 | struct dentry *d; | 42 | struct dentry *d; |
43 | int i = 0; | 43 | int i; |
44 | char *name; | 44 | char *name; |
45 | 45 | ||
46 | /* Always create at least supply-0 directory */ | 46 | for (i = 0; i < opp_table->regulator_count; i++) { |
47 | do { | ||
48 | name = kasprintf(GFP_KERNEL, "supply-%d", i); | 47 | name = kasprintf(GFP_KERNEL, "supply-%d", i); |
49 | 48 | ||
50 | /* Create per-opp directory */ | 49 | /* Create per-opp directory */ |
@@ -70,7 +69,7 @@ static bool opp_debug_create_supplies(struct dev_pm_opp *opp, | |||
70 | if (!debugfs_create_ulong("u_amp", S_IRUGO, d, | 69 | if (!debugfs_create_ulong("u_amp", S_IRUGO, d, |
71 | &opp->supplies[i].u_amp)) | 70 | &opp->supplies[i].u_amp)) |
72 | return false; | 71 | return false; |
73 | } while (++i < opp_table->regulator_count); | 72 | } |
74 | 73 | ||
75 | return true; | 74 | return true; |
76 | } | 75 | } |