Commit eaa4d02f authored by Kim, Milo's avatar Kim, Milo Committed by Linus Torvalds
Browse files

drivers/video/backlight/lp855x_bl.c: remove unnecessary mutex code

The mutex for accessing lp855x registers is used in case of the user-space
interaction.  When the brightness is changed via sysfs, the mutex is
required.  But the backlight class device already provides it.  Thus, the
lp855x mutex is unnecessary.
Signed-off-by: default avatarMilo(Woogyom) Kim <>
Cc: Thierry Reding <>
Cc: Richard Purdie <>
Cc: Bryan Wu <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 8cc9764c
......@@ -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;
......@@ -44,14 +43,11 @@ static int lp855x_read_byte(struct lp855x *lp, u8 reg, u8 *data)
int ret;
ret = i2c_smbus_read_byte_data(lp->client, reg);
if (ret < 0) {
dev_err(lp->dev, "failed to read 0x%.2x\n", reg);
return ret;
*data = (u8)ret;
return 0;
......@@ -59,13 +55,7 @@ static int lp855x_read_byte(struct lp855x *lp, u8 reg, u8 *data)
static int lp855x_write_byte(struct lp855x *lp, u8 reg, u8 data)
int ret;
ret = i2c_smbus_write_byte_data(lp->client, reg, data);
return ret;
return i2c_smbus_write_byte_data(lp->client, reg, data);
static bool lp855x_is_valid_rom_area(struct lp855x *lp, u8 addr)
......@@ -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);
ret = lp855x_init_registers(lp);
if (ret) {
dev_err(lp->dev, "i2c communication err: %d", ret);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment