diff options
author | Ivan T. Ivanov <iivanov@mm-sol.com> | 2014-04-28 09:34:10 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-04-30 12:28:43 -0400 |
commit | 3aca0fa95f61918d5b78b683c0fbcbf693579f81 (patch) | |
tree | 8160473b5de1ffe78501cc3057c596b77c1e4557 | |
parent | f7ddad47421669452186678d51c09a3778ab552f (diff) |
usb: phy: msm: Fix checkpatch.pl warnings
This fixes following:
WARNING: quoted string split across lines
WARNING: Prefer seq_puts to seq_printf
Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/phy/phy-msm-usb.c | 39 |
1 files changed, 14 insertions, 25 deletions
diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c index d7b83600a7da..874c51a85683 100644 --- a/drivers/usb/phy/phy-msm-usb.c +++ b/drivers/usb/phy/phy-msm-usb.c | |||
@@ -67,8 +67,7 @@ static int msm_hsusb_init_vddcx(struct msm_otg *motg, int init) | |||
67 | USB_PHY_VDD_DIG_VOL_MIN, | 67 | USB_PHY_VDD_DIG_VOL_MIN, |
68 | USB_PHY_VDD_DIG_VOL_MAX); | 68 | USB_PHY_VDD_DIG_VOL_MAX); |
69 | if (ret) { | 69 | if (ret) { |
70 | dev_err(motg->phy.dev, "unable to set the voltage " | 70 | dev_err(motg->phy.dev, "Cannot set vddcx voltage\n"); |
71 | "for hsusb vddcx\n"); | ||
72 | return ret; | 71 | return ret; |
73 | } | 72 | } |
74 | 73 | ||
@@ -79,8 +78,7 @@ static int msm_hsusb_init_vddcx(struct msm_otg *motg, int init) | |||
79 | ret = regulator_set_voltage(motg->vddcx, 0, | 78 | ret = regulator_set_voltage(motg->vddcx, 0, |
80 | USB_PHY_VDD_DIG_VOL_MAX); | 79 | USB_PHY_VDD_DIG_VOL_MAX); |
81 | if (ret) | 80 | if (ret) |
82 | dev_err(motg->phy.dev, "unable to set the voltage " | 81 | dev_err(motg->phy.dev, "Cannot set vddcx voltage\n"); |
83 | "for hsusb vddcx\n"); | ||
84 | ret = regulator_disable(motg->vddcx); | 82 | ret = regulator_disable(motg->vddcx); |
85 | if (ret) | 83 | if (ret) |
86 | dev_err(motg->phy.dev, "unable to disable hsusb vddcx\n"); | 84 | dev_err(motg->phy.dev, "unable to disable hsusb vddcx\n"); |
@@ -97,8 +95,7 @@ static int msm_hsusb_ldo_init(struct msm_otg *motg, int init) | |||
97 | rc = regulator_set_voltage(motg->v3p3, USB_PHY_3P3_VOL_MIN, | 95 | rc = regulator_set_voltage(motg->v3p3, USB_PHY_3P3_VOL_MIN, |
98 | USB_PHY_3P3_VOL_MAX); | 96 | USB_PHY_3P3_VOL_MAX); |
99 | if (rc) { | 97 | if (rc) { |
100 | dev_err(motg->phy.dev, "unable to set voltage level " | 98 | dev_err(motg->phy.dev, "Cannot set v3p3 voltage\n"); |
101 | "for hsusb 3p3\n"); | ||
102 | goto exit; | 99 | goto exit; |
103 | } | 100 | } |
104 | rc = regulator_enable(motg->v3p3); | 101 | rc = regulator_enable(motg->v3p3); |
@@ -109,8 +106,7 @@ static int msm_hsusb_ldo_init(struct msm_otg *motg, int init) | |||
109 | rc = regulator_set_voltage(motg->v1p8, USB_PHY_1P8_VOL_MIN, | 106 | rc = regulator_set_voltage(motg->v1p8, USB_PHY_1P8_VOL_MIN, |
110 | USB_PHY_1P8_VOL_MAX); | 107 | USB_PHY_1P8_VOL_MAX); |
111 | if (rc) { | 108 | if (rc) { |
112 | dev_err(motg->phy.dev, "unable to set voltage level " | 109 | dev_err(motg->phy.dev, "Cannot set v1p8 voltage\n"); |
113 | "for hsusb 1p8\n"); | ||
114 | goto disable_3p3; | 110 | goto disable_3p3; |
115 | } | 111 | } |
116 | rc = regulator_enable(motg->v1p8); | 112 | rc = regulator_enable(motg->v1p8); |
@@ -137,15 +133,13 @@ static int msm_hsusb_ldo_set_mode(struct msm_otg *motg, int on) | |||
137 | ret = regulator_set_optimum_mode(motg->v1p8, | 133 | ret = regulator_set_optimum_mode(motg->v1p8, |
138 | USB_PHY_1P8_HPM_LOAD); | 134 | USB_PHY_1P8_HPM_LOAD); |
139 | if (ret < 0) { | 135 | if (ret < 0) { |
140 | pr_err("%s: Unable to set HPM of the regulator " | 136 | pr_err("Could not set HPM for v1p8\n"); |
141 | "HSUSB_1p8\n", __func__); | ||
142 | return ret; | 137 | return ret; |
143 | } | 138 | } |
144 | ret = regulator_set_optimum_mode(motg->v3p3, | 139 | ret = regulator_set_optimum_mode(motg->v3p3, |
145 | USB_PHY_3P3_HPM_LOAD); | 140 | USB_PHY_3P3_HPM_LOAD); |
146 | if (ret < 0) { | 141 | if (ret < 0) { |
147 | pr_err("%s: Unable to set HPM of the regulator " | 142 | pr_err("Could not set HPM for v3p3\n"); |
148 | "HSUSB_3p3\n", __func__); | ||
149 | regulator_set_optimum_mode(motg->v1p8, | 143 | regulator_set_optimum_mode(motg->v1p8, |
150 | USB_PHY_1P8_LPM_LOAD); | 144 | USB_PHY_1P8_LPM_LOAD); |
151 | return ret; | 145 | return ret; |
@@ -154,13 +148,11 @@ static int msm_hsusb_ldo_set_mode(struct msm_otg *motg, int on) | |||
154 | ret = regulator_set_optimum_mode(motg->v1p8, | 148 | ret = regulator_set_optimum_mode(motg->v1p8, |
155 | USB_PHY_1P8_LPM_LOAD); | 149 | USB_PHY_1P8_LPM_LOAD); |
156 | if (ret < 0) | 150 | if (ret < 0) |
157 | pr_err("%s: Unable to set LPM of the regulator " | 151 | pr_err("Could not set LPM for v1p8\n"); |
158 | "HSUSB_1p8\n", __func__); | ||
159 | ret = regulator_set_optimum_mode(motg->v3p3, | 152 | ret = regulator_set_optimum_mode(motg->v3p3, |
160 | USB_PHY_3P3_LPM_LOAD); | 153 | USB_PHY_3P3_LPM_LOAD); |
161 | if (ret < 0) | 154 | if (ret < 0) |
162 | pr_err("%s: Unable to set LPM of the regulator " | 155 | pr_err("Could not set LPM for v3p3\n"); |
163 | "HSUSB_3p3\n", __func__); | ||
164 | } | 156 | } |
165 | 157 | ||
166 | pr_debug("reg (%s)\n", on ? "HPM" : "LPM"); | 158 | pr_debug("reg (%s)\n", on ? "HPM" : "LPM"); |
@@ -390,8 +382,7 @@ static int msm_hsusb_config_vddcx(struct msm_otg *motg, int high) | |||
390 | 382 | ||
391 | ret = regulator_set_voltage(motg->vddcx, min_vol, max_vol); | 383 | ret = regulator_set_voltage(motg->vddcx, min_vol, max_vol); |
392 | if (ret) { | 384 | if (ret) { |
393 | pr_err("%s: unable to set the voltage for regulator " | 385 | pr_err("Cannot set vddcx voltage\n"); |
394 | "HSUSB_VDDCX\n", __func__); | ||
395 | return ret; | 386 | return ret; |
396 | } | 387 | } |
397 | 388 | ||
@@ -546,8 +537,7 @@ static int msm_otg_resume(struct msm_otg *motg) | |||
546 | * PHY. USB state can not be restored. Re-insertion | 537 | * PHY. USB state can not be restored. Re-insertion |
547 | * of USB cable is the only way to get USB working. | 538 | * of USB cable is the only way to get USB working. |
548 | */ | 539 | */ |
549 | dev_err(phy->dev, "Unable to resume USB." | 540 | dev_err(phy->dev, "Unable to resume USB. Re-plugin the cable\n"); |
550 | "Re-plugin the cable\n"); | ||
551 | msm_otg_reset(phy); | 541 | msm_otg_reset(phy); |
552 | } | 542 | } |
553 | 543 | ||
@@ -1242,13 +1232,13 @@ static int msm_otg_mode_show(struct seq_file *s, void *unused) | |||
1242 | 1232 | ||
1243 | switch (otg->phy->state) { | 1233 | switch (otg->phy->state) { |
1244 | case OTG_STATE_A_HOST: | 1234 | case OTG_STATE_A_HOST: |
1245 | seq_printf(s, "host\n"); | 1235 | seq_puts(s, "host\n"); |
1246 | break; | 1236 | break; |
1247 | case OTG_STATE_B_PERIPHERAL: | 1237 | case OTG_STATE_B_PERIPHERAL: |
1248 | seq_printf(s, "peripheral\n"); | 1238 | seq_puts(s, "peripheral\n"); |
1249 | break; | 1239 | break; |
1250 | default: | 1240 | default: |
1251 | seq_printf(s, "none\n"); | 1241 | seq_puts(s, "none\n"); |
1252 | break; | 1242 | break; |
1253 | } | 1243 | } |
1254 | 1244 | ||
@@ -1525,8 +1515,7 @@ static int msm_otg_probe(struct platform_device *pdev) | |||
1525 | motg->pdata->otg_control == OTG_USER_CONTROL) { | 1515 | motg->pdata->otg_control == OTG_USER_CONTROL) { |
1526 | ret = msm_otg_debugfs_init(motg); | 1516 | ret = msm_otg_debugfs_init(motg); |
1527 | if (ret) | 1517 | if (ret) |
1528 | dev_dbg(&pdev->dev, "mode debugfs file is" | 1518 | dev_dbg(&pdev->dev, "Can not create mode change file\n"); |
1529 | "not available\n"); | ||
1530 | } | 1519 | } |
1531 | 1520 | ||
1532 | pm_runtime_set_active(&pdev->dev); | 1521 | pm_runtime_set_active(&pdev->dev); |