summaryrefslogtreecommitdiff
path: root/drivers/leds
diff options
context:
space:
mode:
authorTian Tao <tiantao6@hisilicon.com>2020-11-30 09:19:28 +0800
committerPavel Machek <pavel@ucw.cz>2021-02-03 15:34:37 +0100
commit6c3384d8f408548df74d27bfa0c95c47988f1480 (patch)
tree6ef6c4f505544c2ed43d6a290fe2c928797b35e4 /drivers/leds
parent66898f3fe906364e36fddd5d6292d52022357cf4 (diff)
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: Tian Tao <tiantao6@hisilicon.com> Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-lm3533.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/leds-lm3533.c b/drivers/leds/leds-lm3533.c
index b3edee703193..97911669a199 100644
--- a/drivers/leds/leds-lm3533.c
+++ b/drivers/leds/leds-lm3533.c
@@ -608,7 +608,7 @@ static struct attribute *lm3533_led_attributes[] = {
static umode_t lm3533_led_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 led_classdev *led_cdev = dev_get_drvdata(dev);
struct lm3533_led *led = to_lm3533_led(led_cdev);
umode_t mode = attr->mode;