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
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJRY0rlAAoJEJzN3yze689TccwP/1ZyeE0fhn6S9wxgdtz2jBJC
 vh0eWeYwLlJnXKMfC78FpJWV+zjOkKhlXZFOLqy/I7KN6ejGAFDKsTW22abo7Fml
 qggp5ofMEwJS3gSDVjDBx2CDIHW7haHtPSnNH3KX++0p+///mK/JNQaNW62/j874
 nelL3OXpZI6WhF1uYvnh3EQg6ExD/MfKEng8wdVYL9sRXRzbDv+tnQT4Cdq0CSEB
 zTSY5zS6mXYMZRlUxBXhtFvkSfhxL9bJEj0QPcTS47uY+6hKt24gCcP7kq5fIhpB
 bq5Bpp+DGEJ7t/FgAVbWukdNkizgEzVtbQFro7JvoqiK097qhedYXn0ni4Hl7xPe
 mQ+q4N7AkHxDBx068lnb9EF/3ujRSzWJy4Rvy3AC/6KY1F2hDjlI3TJKDjIx8eQz
 kmflwl5UVZ42Ug9P6QGK+mU+1ZuaMFNhMm99FBzAEeyCdIHiBF2wz/JJWbYuPlj7
 DTgycOwYw035hwj504Ae+jIpjuzPdLd22uKxuMEFNmJd/rFUXgFp5ZMQb47jJIDI
 58wiH1+nEqVmYYhnxOcnQh//g0RALVxJoO3P3GDDbWF5jtk/hleGa7VAY3MhLGJ1
 rOwdD0g16LU/gcmOrm5OdbVqofedH/LDjHx1GdY9g1vGGcq0ES+FZEyOBRjSHue2
 bza21ioK4U85wwnq7cly
 =vnWV
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Greg Kroah-Hartman 2013-04-08 16:50:23 -07:00
Родитель 30e53bb8ff 3ad9e86d54
Коммит 606f34ad12
2 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@ -38,7 +38,7 @@
* extcon-max77693 driver use 'default_init_data' to bring up base operation * extcon-max77693 driver use 'default_init_data' to bring up base operation
* of MAX77693 MUIC device. * of MAX77693 MUIC device.
*/ */
struct max77693_reg_data default_init_data[] = { static struct max77693_reg_data default_init_data[] = {
{ {
/* STATUS2 - [3]ChgDetRun */ /* STATUS2 - [3]ChgDetRun */
.addr = MAX77693_MUIC_REG_STATUS2, .addr = MAX77693_MUIC_REG_STATUS2,
@ -258,7 +258,7 @@ static int max77693_muic_set_debounce_time(struct max77693_muic_info *info,
CONTROL3_ADCDBSET_MASK); CONTROL3_ADCDBSET_MASK);
if (ret) { if (ret) {
dev_err(info->dev, "failed to set ADC debounce time\n"); dev_err(info->dev, "failed to set ADC debounce time\n");
return -EAGAIN; return ret;
} }
break; break;
default: default:
@ -294,7 +294,7 @@ static int max77693_muic_set_path(struct max77693_muic_info *info,
MAX77693_MUIC_REG_CTRL1, ctrl1, COMP_SW_MASK); MAX77693_MUIC_REG_CTRL1, ctrl1, COMP_SW_MASK);
if (ret < 0) { if (ret < 0) {
dev_err(info->dev, "failed to update MUIC register\n"); dev_err(info->dev, "failed to update MUIC register\n");
return -EAGAIN; return ret;
} }
if (attached) if (attached)
@ -307,7 +307,7 @@ static int max77693_muic_set_path(struct max77693_muic_info *info,
CONTROL2_LOWPWR_MASK | CONTROL2_CPEN_MASK); CONTROL2_LOWPWR_MASK | CONTROL2_CPEN_MASK);
if (ret < 0) { if (ret < 0) {
dev_err(info->dev, "failed to update MUIC register\n"); dev_err(info->dev, "failed to update MUIC register\n");
return -EAGAIN; return ret;
} }
dev_info(info->dev, dev_info(info->dev,
@ -1035,7 +1035,7 @@ static int max77693_muic_detect_accessory(struct max77693_muic_info *info)
if (ret) { if (ret) {
dev_err(info->dev, "failed to read MUIC register\n"); dev_err(info->dev, "failed to read MUIC register\n");
mutex_unlock(&info->mutex); mutex_unlock(&info->mutex);
return -EINVAL; return ret;
} }
adc = max77693_muic_get_cable_type(info, MAX77693_CABLE_GROUP_ADC, adc = max77693_muic_get_cable_type(info, MAX77693_CABLE_GROUP_ADC,

Просмотреть файл

@ -196,7 +196,7 @@ static int max8997_muic_set_debounce_time(struct max8997_muic_info *info,
CONTROL3_ADCDBSET_MASK); CONTROL3_ADCDBSET_MASK);
if (ret) { if (ret) {
dev_err(info->dev, "failed to set ADC debounce time\n"); dev_err(info->dev, "failed to set ADC debounce time\n");
return -EAGAIN; return ret;
} }
break; break;
default: default:
@ -232,7 +232,7 @@ static int max8997_muic_set_path(struct max8997_muic_info *info,
MAX8997_MUIC_REG_CONTROL1, ctrl1, COMP_SW_MASK); MAX8997_MUIC_REG_CONTROL1, ctrl1, COMP_SW_MASK);
if (ret < 0) { if (ret < 0) {
dev_err(info->dev, "failed to update MUIC register\n"); dev_err(info->dev, "failed to update MUIC register\n");
return -EAGAIN; return ret;
} }
if (attached) if (attached)
@ -245,7 +245,7 @@ static int max8997_muic_set_path(struct max8997_muic_info *info,
CONTROL2_LOWPWR_MASK | CONTROL2_CPEN_MASK); CONTROL2_LOWPWR_MASK | CONTROL2_CPEN_MASK);
if (ret < 0) { if (ret < 0) {
dev_err(info->dev, "failed to update MUIC register\n"); dev_err(info->dev, "failed to update MUIC register\n");
return -EAGAIN; return ret;
} }
dev_info(info->dev, dev_info(info->dev,
@ -397,7 +397,7 @@ static int max8997_muic_handle_jig_uart(struct max8997_muic_info *info,
ret = max8997_muic_set_path(info, info->path_uart, attached); ret = max8997_muic_set_path(info, info->path_uart, attached);
if (ret) { if (ret) {
dev_err(info->dev, "failed to update muic register\n"); dev_err(info->dev, "failed to update muic register\n");
return -EINVAL; return ret;
} }
extcon_set_cable_state(info->edev, "JIG", attached); extcon_set_cable_state(info->edev, "JIG", attached);
@ -608,7 +608,7 @@ static int max8997_muic_detect_dev(struct max8997_muic_info *info)
if (ret) { if (ret) {
dev_err(info->dev, "failed to read MUIC register\n"); dev_err(info->dev, "failed to read MUIC register\n");
mutex_unlock(&info->mutex); mutex_unlock(&info->mutex);
return -EINVAL; return ret;
} }
adc = max8997_muic_get_cable_type(info, MAX8997_CABLE_GROUP_ADC, 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)
ret = max8997_muic_detect_dev(info); ret = max8997_muic_detect_dev(info);
if (ret < 0) if (ret < 0)
pr_err("failed to detect cable type\n"); dev_err(info->dev, "failed to detect cable type\n");
} }
static int max8997_muic_probe(struct platform_device *pdev) static int max8997_muic_probe(struct platform_device *pdev)