Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1609043ybt; Mon, 15 Jun 2020 05:02:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGt6aYlEoGDepEYRXKZAsdbYQOkMDd/7oZBgooES5bZIXjH+RPVQpus2bqVIcPg5EAV1/9 X-Received: by 2002:a17:906:6a1b:: with SMTP id o27mr13121623ejr.271.1592222559783; Mon, 15 Jun 2020 05:02:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592222559; cv=none; d=google.com; s=arc-20160816; b=oqlfAkm1ilcBnTkXGIVDA4VtmXPgUpDL54Y7/xL7xpaz9UaDkLqjI5r/M79eb9B/ED 3rSYok1Nf63LsSSPe+I4lIxDQokFajrdkBL4Hj/KxTsmaQ6NYma3w4ja60opcQCexTav 91rP1KR+rD1xsrQUDEuwtIwbTR097TwT9UqMOwi/elxs/hs3lA4/+3z4vibJndV2BQx9 lgqZ5pnYLz0AZiXwHk9KoHuRGVW/5bu1Qa9emOg48xMTvZgyBifERpG0QkL6obTKuP6S WO9Wh3k+zqFGyKv2X3qIo8XOtWzWoXg96NPyVb3ITQ0kVWvrkU3zGUxb8rDzMGSsx+KR wuiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=719ofHTBd/I2peVm9y0TOXJ46xOp3IsPklsZWOMX6Ng=; b=Uy5XjuPDhgShC3sfAtgWB5L8mzNAOlca7unLu1suy4qGAdie92T9+5T7QFaZ/UENPx CCcg0UcGJaUkDLxVf6DuQZ4ZYlFaSX97ZM9ckVkpKdj3ekUd1bk31CtV46pCnpVsz7VB ikMc4iNviAsnYhE7yzEFZlt73hxR0EyDJLM/QrQo66zEh9gEbBFeaC+TEAeKRfx87SzM U8hns+EE/9fpj75AH/a9W9soOQ2vpyxeA7vDBBCUhViBoMYGIYjrcLxhBmjB+7zQzoI2 PHWLz+acBt8dyWRNoEvwYP7m2fAe5/xhqfw+8nIsXIKsWN+RDjDuGOE83nWB6UYwE3jy rQ8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iQBqKtao; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v24si8883355ejx.374.2020.06.15.05.02.16; Mon, 15 Jun 2020 05:02:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iQBqKtao; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729691AbgFOL7l (ORCPT + 99 others); Mon, 15 Jun 2020 07:59:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728510AbgFOL7l (ORCPT ); Mon, 15 Jun 2020 07:59:41 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1D3CC061A0E for ; Mon, 15 Jun 2020 04:59:40 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id u26so13953048wmn.1 for ; Mon, 15 Jun 2020 04:59:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=719ofHTBd/I2peVm9y0TOXJ46xOp3IsPklsZWOMX6Ng=; b=iQBqKtaoUb41/1QY2TLxDwAHEYBfZFCmUjMJQZNtmyGtBWUuVy3F9B3Cb53/As2kCn w8LdlOL2O7nmWriJ5O52ZkFQWhXTih9egKBCn/xHrpYHpcMwRXAmY1rb0h0q8qkkLVy8 l1hJI4uEkDi5fbiDRHv7GwLQoSuyV2VfrEKB5ECTpgKJ1vJkmNlS/3VhLzU8MxubHF4F BQTOkJUde9IQlvtRqmh20dLAoV7EggqCEgH6ZkKCUXk0eg7wCnG7EY3a45NjaenaikM4 iZIp57nDyyGIKuzpt7FgqqJFZD+WUhJQVW3RyKUErLV5ev8TLcZuj1knLd+sP5bVIDIV 8TVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=719ofHTBd/I2peVm9y0TOXJ46xOp3IsPklsZWOMX6Ng=; b=QO0WKDfJW81PBQpQTgrher4HKT60bugPH4aNbKXuNhjIJp/rInSfhLKhPdlzYS3iHM aBxUh79P9In8yTdc5KUSs2agfLvQsX5P60yD/yxiWC29iHke0lbH+9Z4Az0RyXkCMuU/ /KBkjfle9nbBLr5MYOiLN1CTHiX4lu1N4TVbCVqBvTea1+gjHBRl1vTSqW2NBkuedY+H s1HsgJl643B+tzKP2Jryuci7YBuz5E3sPyGPP4tUvWv3v3ZguWYjMiXt3p+zOMrPZbIy fI7Ome4dLMyLG5s5gV8FFIKil3vC+B1YZKLn6dOF9YtHz3mFfRRU8rEOz247rpsZG/aL 8gQQ== X-Gm-Message-State: AOAM533uUs2ai9jBu/VsD6aOozJx1KWPRjcBhg1mtqNBXJn75LEmHr6p h/nJ3c/Ncz0aV6fyeFw7zEeyVA== X-Received: by 2002:a7b:c212:: with SMTP id x18mr12617874wmi.119.1592222379015; Mon, 15 Jun 2020 04:59:39 -0700 (PDT) Received: from holly.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id q5sm24022703wrm.62.2020.06.15.04.59.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 04:59:38 -0700 (PDT) Date: Mon, 15 Jun 2020 12:59:36 +0100 From: Daniel Thompson To: Wang Qing Cc: Lee Jones , Jingoo Han , Bartlomiej Zolnierkiewicz , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drivers/video/backlight: Use kobj_to_dev() instead Message-ID: <20200615115936.37pwp7cgmhznnyo4@holly.lan> References: <1592211242-31683-1-git-send-email-wangqing@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1592211242-31683-1-git-send-email-wangqing@vivo.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 15, 2020 at 04:54:02PM +0800, Wang Qing wrote: > Use kobj_to_dev() instead of container_of() > > Signed-off-by: Wang Qing Reviewed-by: Daniel Thompson > --- > drivers/video/backlight/lm3533_bl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > mode change 100644 => 100755 drivers/video/backlight/lm3533_bl.c > > 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; > > -- > 2.7.4 >