Skip to content
Commit cc58f4db authored by Wei Yongjun's avatar Wei Yongjun Committed by Mauro Carvalho Chehab
Browse files

[media] media: i2c: lm3560: use correct clientdata in lm3560_remove()



We had set the i2c clientdata to &flash->subdev_led[LM3560_LED1]
after call lm3560_subdev_init(flash, LM3560_LED1, "lm3560-led1"),
but the container_of() in lm3560_remove() return the wrong pointer
to flash.(should be container_of(subdev, struct lm3560_flash,
subdev_led[LM3560_LED_MAX-1])
This patch fix to set i2c clientdata to flash so we can get flash
from clientdata directly.

Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent eed8c3ee
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment