[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1597889792-53139-1-git-send-email-tiantao6@hisilicon.com>
Date: Thu, 20 Aug 2020 10:16:32 +0800
From: Tian Tao <tiantao6@...ilicon.com>
To: <zhangfei.gao@...aro.org>, <wangzhou1@...ilicon.com>,
<arnd@...db.de>, <gregkh@...uxfoundation.org>,
<linux-accelerators@...ts.ozlabs.org>,
<linux-kernel@...r.kernel.org>
CC: <linuxarm@...wei.com>
Subject: [PATCH] uacce: Use kobj_to_dev() instead of container_of()
Use kobj_to_dev() instead of container_of()
Signed-off-by: Tian Tao <tiantao6@...ilicon.com>
Reviewed-by: Zhou Wang <wangzhou1@...ilicon.com>
---
drivers/misc/uacce/uacce.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c
index a5b8dab..a9da7b1 100644
--- a/drivers/misc/uacce/uacce.c
+++ b/drivers/misc/uacce/uacce.c
@@ -370,7 +370,7 @@ static struct attribute *uacce_dev_attrs[] = {
static umode_t uacce_dev_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 uacce_device *uacce = to_uacce_device(dev);
if (((attr == &dev_attr_region_mmio_size.attr) &&
--
2.7.4
Powered by blists - more mailing lists