From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lee Jones Date: Tue, 16 Jun 2020 08:05:29 +0000 Subject: Re: [PATCH] drivers/video/backlight: Use kobj_to_dev() instead Message-Id: <20200616080529.GK2608702@dell> List-Id: References: <1592211242-31683-1-git-send-email-wangqing@vivo.com> In-Reply-To: <1592211242-31683-1-git-send-email-wangqing@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: Wang Qing Cc: Daniel Thompson , Bartlomiej Zolnierkiewicz , Jingoo Han , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org On Mon, 15 Jun 2020, Wang Qing wrote: > Use kobj_to_dev() instead of container_of() > > Signed-off-by: Wang Qing > --- > drivers/video/backlight/lm3533_bl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > mode change 100644 => 100755 drivers/video/backlight/lm3533_bl.c I've fixed the broken subject line. For future submissions, please use `git log --oneline -- ` to view the expected formatting for any given . Applied, thanks. > diff --git a/drivers/video/backlight/lm3533_bl.c b/drivers/video/backlight/lm3533_bl.c > index ee09d1b..0c7830f > --- a/drivers/video/backlight/lm3533_bl.c > +++ b/drivers/video/backlight/lm3533_bl.c > @@ -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; > -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog