Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346385
b: refs/heads/master
c: eaa4d02
h: refs/heads/master
i:
  346383: 75a14e0
v: v3
  • Loading branch information
Kim, Milo authored and Linus Torvalds committed Dec 18, 2012
1 parent ef50dbb commit 167c772
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 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: 8cc9764c9c7d01a6e2c3ddac8f0ac7716be01868
refs/heads/master: eaa4d02fbaf49e57f8a18f68e736e34c514030a2
14 changes: 1 addition & 13 deletions trunk/drivers/video/backlight/lp855x_bl.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ struct lp855x {
struct i2c_client *client;
struct backlight_device *bl;
struct device *dev;
struct mutex xfer_lock;
struct lp855x_platform_data *pdata;
struct pwm_device *pwm;
};
Expand All @@ -44,28 +43,19 @@ static int lp855x_read_byte(struct lp855x *lp, u8 reg, u8 *data)
{
int ret;

mutex_lock(&lp->xfer_lock);
ret = i2c_smbus_read_byte_data(lp->client, reg);
if (ret < 0) {
mutex_unlock(&lp->xfer_lock);
dev_err(lp->dev, "failed to read 0x%.2x\n", reg);
return ret;
}
mutex_unlock(&lp->xfer_lock);

*data = (u8)ret;
return 0;
}

static int lp855x_write_byte(struct lp855x *lp, u8 reg, u8 data)
{
int ret;

mutex_lock(&lp->xfer_lock);
ret = i2c_smbus_write_byte_data(lp->client, reg, data);
mutex_unlock(&lp->xfer_lock);

return ret;
return i2c_smbus_write_byte_data(lp->client, reg, data);
}

static bool lp855x_is_valid_rom_area(struct lp855x *lp, u8 addr)
Expand Down Expand Up @@ -281,8 +271,6 @@ static int lp855x_probe(struct i2c_client *cl, const struct i2c_device_id *id)
lp->chip_id = id->driver_data;
i2c_set_clientdata(cl, lp);

mutex_init(&lp->xfer_lock);

ret = lp855x_init_registers(lp);
if (ret) {
dev_err(lp->dev, "i2c communication err: %d", ret);
Expand Down

0 comments on commit 167c772

Please sign in to comment.