Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357582
b: refs/heads/master
c: 050cde1
h: refs/heads/master
v: v3
  • Loading branch information
Peter Ujfalusi authored and Samuel Ortiz committed Feb 13, 2013
1 parent 0eeb575 commit e082cd8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5d4e9bd79a5ab5bd4695d3becaa71da447a76a94
refs/heads/master: 050cde1363a3fc59f2a2f1cac6ef050393a00c99
13 changes: 2 additions & 11 deletions trunk/drivers/mfd/twl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
#define SUB_CHIP_ID1 1
#define SUB_CHIP_ID2 2
#define SUB_CHIP_ID3 3
#define SUB_CHIP_ID_INVAL 0xff

/* Base Address defns for twl4030_map[] */

Expand Down Expand Up @@ -326,12 +325,8 @@ int twl_i2c_write(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes)
pr_err("%s: not initialized\n", DRIVER_NAME);
return -EPERM;
}

sid = twl_map[mod_no].sid;
if (unlikely(sid == SUB_CHIP_ID_INVAL)) {
pr_err("%s: module %d is not part of the pmic\n",
DRIVER_NAME, mod_no);
return -EINVAL;
}
twl = &twl_modules[sid];

ret = regmap_bulk_write(twl->regmap, twl_map[mod_no].base + reg,
Expand Down Expand Up @@ -368,12 +363,8 @@ int twl_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes)
pr_err("%s: not initialized\n", DRIVER_NAME);
return -EPERM;
}

sid = twl_map[mod_no].sid;
if (unlikely(sid == SUB_CHIP_ID_INVAL)) {
pr_err("%s: module %d is not part of the pmic\n",
DRIVER_NAME, mod_no);
return -EINVAL;
}
twl = &twl_modules[sid];

ret = regmap_bulk_read(twl->regmap, twl_map[mod_no].base + reg,
Expand Down

0 comments on commit e082cd8

Please sign in to comment.