Skip to content

Commit

Permalink
extcon: arizona: Rename hpdet_ip to make its purpose clearer
Browse files Browse the repository at this point in the history
Renamed to hpdet_ip_version to make it clearer what it does
and that the value in it is simply a version number.

Signed-off-by: Richard Fitzgerald <[email protected]>
Signed-off-by: Chanwoo Choi <[email protected]>
  • Loading branch information
Richard Fitzgerald authored and chanwoochoi committed May 19, 2015
1 parent ed2c060 commit d0fd5fb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/extcon/extcon-arizona.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ struct arizona_extcon_info {
bool detecting;
int jack_flips;

int hpdet_ip;
int hpdet_ip_version;

struct extcon_dev *edev;
};
Expand Down Expand Up @@ -380,7 +380,7 @@ static int arizona_hpdet_read(struct arizona_extcon_info *info)
return ret;
}

switch (info->hpdet_ip) {
switch (info->hpdet_ip_version) {
case 0:
if (!(val & ARIZONA_HP_DONE)) {
dev_err(arizona->dev, "HPDET did not complete: %x\n",
Expand Down Expand Up @@ -441,7 +441,7 @@ static int arizona_hpdet_read(struct arizona_extcon_info *info)

default:
dev_warn(arizona->dev, "Unknown HPDET IP revision %d\n",
info->hpdet_ip);
info->hpdet_ip_version);
case 2:
if (!(val & ARIZONA_HP_DONE_B)) {
dev_err(arizona->dev, "HPDET did not complete: %x\n",
Expand Down Expand Up @@ -1161,7 +1161,7 @@ static int arizona_extcon_probe(struct platform_device *pdev)
break;
default:
info->micd_clamp = true;
info->hpdet_ip = 1;
info->hpdet_ip_version = 1;
break;
}
break;
Expand All @@ -1172,7 +1172,7 @@ static int arizona_extcon_probe(struct platform_device *pdev)
break;
default:
info->micd_clamp = true;
info->hpdet_ip = 2;
info->hpdet_ip_version = 2;
break;
}
break;
Expand Down

0 comments on commit d0fd5fb

Please sign in to comment.