aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/extcon
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-08 19:50:23 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-08 19:50:23 -0400
commit606f34ad124faeeb77830d7fdfc513084566d2ba (patch)
tree34bed5fdcd7ae909540a345070e14bcb2b981160 /drivers/extcon
parent30e53bb8ffb1f3270ad89196d9799057008d9537 (diff)
parent3ad9e86d54ed2770aa693a90a0872cbe7ffc6831 (diff)
Merge tag 'extcon-for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next
Chanwoo writes: This is small fixes for extcon driver. MAX77693 extcon driver - Add 'static' keryword to internal data structure - Fix return value using 'ret' instead of hardcoding MAX8997 extcon driver - Use dev_err() instead of pr_err() - Fix return value using 'ret' instead of hardcoding
Diffstat (limited to 'drivers/extcon')
-rw-r--r--drivers/extcon/extcon-max77693.c10
-rw-r--r--drivers/extcon/extcon-max8997.c12
2 files changed, 11 insertions, 11 deletions
diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
index 8f3c947b0029..b56bdaa27d4b 100644
--- a/drivers/extcon/extcon-max77693.c
+++ b/drivers/extcon/extcon-max77693.c
@@ -38,7 +38,7 @@
38 * extcon-max77693 driver use 'default_init_data' to bring up base operation 38 * extcon-max77693 driver use 'default_init_data' to bring up base operation
39 * of MAX77693 MUIC device. 39 * of MAX77693 MUIC device.
40 */ 40 */
41struct max77693_reg_data default_init_data[] = { 41static struct max77693_reg_data default_init_data[] = {
42 { 42 {
43 /* STATUS2 - [3]ChgDetRun */ 43 /* STATUS2 - [3]ChgDetRun */
44 .addr = MAX77693_MUIC_REG_STATUS2, 44 .addr = MAX77693_MUIC_REG_STATUS2,
@@ -258,7 +258,7 @@ static int max77693_muic_set_debounce_time(struct max77693_muic_info *info,
258 CONTROL3_ADCDBSET_MASK); 258 CONTROL3_ADCDBSET_MASK);
259 if (ret) { 259 if (ret) {
260 dev_err(info->dev, "failed to set ADC debounce time\n"); 260 dev_err(info->dev, "failed to set ADC debounce time\n");
261 return -EAGAIN; 261 return ret;
262 } 262 }
263 break; 263 break;
264 default: 264 default:
@@ -294,7 +294,7 @@ static int max77693_muic_set_path(struct max77693_muic_info *info,
294 MAX77693_MUIC_REG_CTRL1, ctrl1, COMP_SW_MASK); 294 MAX77693_MUIC_REG_CTRL1, ctrl1, COMP_SW_MASK);
295 if (ret < 0) { 295 if (ret < 0) {
296 dev_err(info->dev, "failed to update MUIC register\n"); 296 dev_err(info->dev, "failed to update MUIC register\n");
297 return -EAGAIN; 297 return ret;
298 } 298 }
299 299
300 if (attached) 300 if (attached)
@@ -307,7 +307,7 @@ static int max77693_muic_set_path(struct max77693_muic_info *info,
307 CONTROL2_LOWPWR_MASK | CONTROL2_CPEN_MASK); 307 CONTROL2_LOWPWR_MASK | CONTROL2_CPEN_MASK);
308 if (ret < 0) { 308 if (ret < 0) {
309 dev_err(info->dev, "failed to update MUIC register\n"); 309 dev_err(info->dev, "failed to update MUIC register\n");
310 return -EAGAIN; 310 return ret;
311 } 311 }
312 312
313 dev_info(info->dev, 313 dev_info(info->dev,
@@ -1035,7 +1035,7 @@ static int max77693_muic_detect_accessory(struct max77693_muic_info *info)
1035 if (ret) { 1035 if (ret) {
1036 dev_err(info->dev, "failed to read MUIC register\n"); 1036 dev_err(info->dev, "failed to read MUIC register\n");
1037 mutex_unlock(&info->mutex); 1037 mutex_unlock(&info->mutex);
1038 return -EINVAL; 1038 return ret;
1039 } 1039 }
1040 1040
1041 adc = max77693_muic_get_cable_type(info, MAX77693_CABLE_GROUP_ADC, 1041 adc = max77693_muic_get_cable_type(info, MAX77693_CABLE_GROUP_ADC,
diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c
index 69641bcae325..67d6738d85a0 100644
--- a/drivers/extcon/extcon-max8997.c
+++ b/drivers/extcon/extcon-max8997.c
@@ -196,7 +196,7 @@ static int max8997_muic_set_debounce_time(struct max8997_muic_info *info,
196 CONTROL3_ADCDBSET_MASK); 196 CONTROL3_ADCDBSET_MASK);
197 if (ret) { 197 if (ret) {
198 dev_err(info->dev, "failed to set ADC debounce time\n"); 198 dev_err(info->dev, "failed to set ADC debounce time\n");
199 return -EAGAIN; 199 return ret;
200 } 200 }
201 break; 201 break;
202 default: 202 default:
@@ -232,7 +232,7 @@ static int max8997_muic_set_path(struct max8997_muic_info *info,
232 MAX8997_MUIC_REG_CONTROL1, ctrl1, COMP_SW_MASK); 232 MAX8997_MUIC_REG_CONTROL1, ctrl1, COMP_SW_MASK);
233 if (ret < 0) { 233 if (ret < 0) {
234 dev_err(info->dev, "failed to update MUIC register\n"); 234 dev_err(info->dev, "failed to update MUIC register\n");
235 return -EAGAIN; 235 return ret;
236 } 236 }
237 237
238 if (attached) 238 if (attached)
@@ -245,7 +245,7 @@ static int max8997_muic_set_path(struct max8997_muic_info *info,
245 CONTROL2_LOWPWR_MASK | CONTROL2_CPEN_MASK); 245 CONTROL2_LOWPWR_MASK | CONTROL2_CPEN_MASK);
246 if (ret < 0) { 246 if (ret < 0) {
247 dev_err(info->dev, "failed to update MUIC register\n"); 247 dev_err(info->dev, "failed to update MUIC register\n");
248 return -EAGAIN; 248 return ret;
249 } 249 }
250 250
251 dev_info(info->dev, 251 dev_info(info->dev,
@@ -397,7 +397,7 @@ static int max8997_muic_handle_jig_uart(struct max8997_muic_info *info,
397 ret = max8997_muic_set_path(info, info->path_uart, attached); 397 ret = max8997_muic_set_path(info, info->path_uart, attached);
398 if (ret) { 398 if (ret) {
399 dev_err(info->dev, "failed to update muic register\n"); 399 dev_err(info->dev, "failed to update muic register\n");
400 return -EINVAL; 400 return ret;
401 } 401 }
402 402
403 extcon_set_cable_state(info->edev, "JIG", attached); 403 extcon_set_cable_state(info->edev, "JIG", attached);
@@ -608,7 +608,7 @@ static int max8997_muic_detect_dev(struct max8997_muic_info *info)
608 if (ret) { 608 if (ret) {
609 dev_err(info->dev, "failed to read MUIC register\n"); 609 dev_err(info->dev, "failed to read MUIC register\n");
610 mutex_unlock(&info->mutex); 610 mutex_unlock(&info->mutex);
611 return -EINVAL; 611 return ret;
612 } 612 }
613 613
614 adc = max8997_muic_get_cable_type(info, MAX8997_CABLE_GROUP_ADC, 614 adc = max8997_muic_get_cable_type(info, MAX8997_CABLE_GROUP_ADC,
@@ -646,7 +646,7 @@ static void max8997_muic_detect_cable_wq(struct work_struct *work)
646 646
647 ret = max8997_muic_detect_dev(info); 647 ret = max8997_muic_detect_dev(info);
648 if (ret < 0) 648 if (ret < 0)
649 pr_err("failed to detect cable type\n"); 649 dev_err(info->dev, "failed to detect cable type\n");
650} 650}
651 651
652static int max8997_muic_probe(struct platform_device *pdev) 652static int max8997_muic_probe(struct platform_device *pdev)