Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+11 -11
+5 -5
drivers/extcon/extcon-max77693.c
··· 38 38 * extcon-max77693 driver use 'default_init_data' to bring up base operation 39 39 * of MAX77693 MUIC device. 40 40 */ 41 - struct max77693_reg_data default_init_data[] = { 41 + static struct max77693_reg_data default_init_data[] = { 42 42 { 43 43 /* STATUS2 - [3]ChgDetRun */ 44 44 .addr = MAX77693_MUIC_REG_STATUS2, ··· 258 258 CONTROL3_ADCDBSET_MASK); 259 259 if (ret) { 260 260 dev_err(info->dev, "failed to set ADC debounce time\n"); 261 - return -EAGAIN; 261 + return ret; 262 262 } 263 263 break; 264 264 default: ··· 294 294 MAX77693_MUIC_REG_CTRL1, ctrl1, COMP_SW_MASK); 295 295 if (ret < 0) { 296 296 dev_err(info->dev, "failed to update MUIC register\n"); 297 - return -EAGAIN; 297 + return ret; 298 298 } 299 299 300 300 if (attached) ··· 307 307 CONTROL2_LOWPWR_MASK | CONTROL2_CPEN_MASK); 308 308 if (ret < 0) { 309 309 dev_err(info->dev, "failed to update MUIC register\n"); 310 - return -EAGAIN; 310 + return ret; 311 311 } 312 312 313 313 dev_info(info->dev, ··· 1035 1035 if (ret) { 1036 1036 dev_err(info->dev, "failed to read MUIC register\n"); 1037 1037 mutex_unlock(&info->mutex); 1038 - return -EINVAL; 1038 + return ret; 1039 1039 } 1040 1040 1041 1041 adc = max77693_muic_get_cable_type(info, MAX77693_CABLE_GROUP_ADC,
+6 -6
drivers/extcon/extcon-max8997.c
··· 196 196 CONTROL3_ADCDBSET_MASK); 197 197 if (ret) { 198 198 dev_err(info->dev, "failed to set ADC debounce time\n"); 199 - return -EAGAIN; 199 + return ret; 200 200 } 201 201 break; 202 202 default: ··· 232 232 MAX8997_MUIC_REG_CONTROL1, ctrl1, COMP_SW_MASK); 233 233 if (ret < 0) { 234 234 dev_err(info->dev, "failed to update MUIC register\n"); 235 - return -EAGAIN; 235 + return ret; 236 236 } 237 237 238 238 if (attached) ··· 245 245 CONTROL2_LOWPWR_MASK | CONTROL2_CPEN_MASK); 246 246 if (ret < 0) { 247 247 dev_err(info->dev, "failed to update MUIC register\n"); 248 - return -EAGAIN; 248 + return ret; 249 249 } 250 250 251 251 dev_info(info->dev, ··· 397 397 ret = max8997_muic_set_path(info, info->path_uart, attached); 398 398 if (ret) { 399 399 dev_err(info->dev, "failed to update muic register\n"); 400 - return -EINVAL; 400 + return ret; 401 401 } 402 402 403 403 extcon_set_cable_state(info->edev, "JIG", attached); ··· 608 608 if (ret) { 609 609 dev_err(info->dev, "failed to read MUIC register\n"); 610 610 mutex_unlock(&info->mutex); 611 - return -EINVAL; 611 + return ret; 612 612 } 613 613 614 614 adc = max8997_muic_get_cable_type(info, MAX8997_CABLE_GROUP_ADC, ··· 646 646 647 647 ret = max8997_muic_detect_dev(info); 648 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 652 652 static int max8997_muic_probe(struct platform_device *pdev)