Commit 6c3384d8 authored by Tian Tao's avatar Tian Tao Committed by Pavel Machek

leds: lm3533: Switch to using the new API kobj_to_dev()

fixed the following coccicheck:
drivers/leds/leds-lm3533.c:611:60-61: WARNING opportunity for kobj_to_dev().
Signed-off-by: default avatarTian Tao <tiantao6@hisilicon.com>
Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
parent 66898f3f
...@@ -608,7 +608,7 @@ static struct attribute *lm3533_led_attributes[] = { ...@@ -608,7 +608,7 @@ static struct attribute *lm3533_led_attributes[] = {
static umode_t lm3533_led_attr_is_visible(struct kobject *kobj, static umode_t lm3533_led_attr_is_visible(struct kobject *kobj,
struct attribute *attr, int n) struct attribute *attr, int n)
{ {
struct device *dev = container_of(kobj, struct device, kobj); struct device *dev = kobj_to_dev(kobj);
struct led_classdev *led_cdev = dev_get_drvdata(dev); struct led_classdev *led_cdev = dev_get_drvdata(dev);
struct lm3533_led *led = to_lm3533_led(led_cdev); struct lm3533_led *led = to_lm3533_led(led_cdev);
umode_t mode = attr->mode; 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