* [PATCH] drivers/video/backlight: Use kobj_to_dev() instead
@ 2020-06-15 8:54 Wang Qing
2020-06-15 11:59 ` Daniel Thompson
2020-06-16 8:05 ` Lee Jones
0 siblings, 2 replies; 3+ messages in thread
From: Wang Qing @ 2020-06-15 8:54 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han,
Bartlomiej Zolnierkiewicz, dri-devel, linux-fbdev, linux-kernel
Cc: Wang Qing
Use kobj_to_dev() instead of container_of()
Signed-off-by: Wang Qing <wangqing@vivo.com>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drivers/video/backlight: Use kobj_to_dev() instead
2020-06-15 8:54 [PATCH] drivers/video/backlight: Use kobj_to_dev() instead Wang Qing
@ 2020-06-15 11:59 ` Daniel Thompson
2020-06-16 8:05 ` Lee Jones
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Thompson @ 2020-06-15 11:59 UTC (permalink / raw)
To: Wang Qing
Cc: Lee Jones, Jingoo Han, Bartlomiej Zolnierkiewicz, dri-devel,
linux-fbdev, linux-kernel
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 <wangqing@vivo.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
> ---
> 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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drivers/video/backlight: Use kobj_to_dev() instead
2020-06-15 8:54 [PATCH] drivers/video/backlight: Use kobj_to_dev() instead Wang Qing
2020-06-15 11:59 ` Daniel Thompson
@ 2020-06-16 8:05 ` Lee Jones
1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2020-06-16 8:05 UTC (permalink / raw)
To: Wang Qing
Cc: Daniel Thompson, Jingoo Han, Bartlomiej Zolnierkiewicz,
dri-devel, linux-fbdev, linux-kernel
On Mon, 15 Jun 2020, Wang Qing wrote:
> Use kobj_to_dev() instead of container_of()
>
> Signed-off-by: Wang Qing <wangqing@vivo.com>
> ---
> 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 -- <SUBSUSTEM>`
to view the expected formatting for any given <SUBSYSTEM>.
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-16 8:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-15 8:54 [PATCH] drivers/video/backlight: Use kobj_to_dev() instead Wang Qing
2020-06-15 11:59 ` Daniel Thompson
2020-06-16 8:05 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).