Commit a9b9b2af authored by Wang Qing's avatar Wang Qing Committed by Lee Jones

backlight: lm3533_bl: Use kobj_to_dev() instead

Use kobj_to_dev() instead of container_of()
Signed-off-by: default avatarWang Qing <wangqing@vivo.com>
Reviewed-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent b3a9e3b9
......@@ -235,7 +235,7 @@ static struct attribute *lm3533_bl_attributes[] = {
static umode_t lm3533_bl_attr_is_visible(struct kobject *kobj,
struct attribute *attr, int n)
{
struct device *dev = container_of(kobj, struct device, kobj);
struct device *dev = kobj_to_dev(kobj);
struct lm3533_bl *bl = dev_get_drvdata(dev);
umode_t mode = attr->mode;
......
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