summaryrefslogtreecommitdiff
path: root/drivers/misc/uacce
diff options
context:
space:
mode:
authorTian Tao <tiantao6@hisilicon.com>2020-08-20 05:16:32 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-09-07 15:30:35 +0300
commita4c3d756530606a3041928f702635df281ff3e75 (patch)
treea51891969b412f04a37c32fd2948fb1e4386fdfe /drivers/misc/uacce
parentab04de8ec235ab03573e7ef33b21c357ba248b5f (diff)
downloadlinux-a4c3d756530606a3041928f702635df281ff3e75.tar.xz
uacce: Use kobj_to_dev() instead of container_of()
Use kobj_to_dev() instead of container_of() Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Reviewed-by: Zhou Wang <wangzhou1@hisilicon.com> Acked-by: Zhangfei Gao <zhangfei.gao@linaro.org> Link: https://lore.kernel.org/r/1597889792-53139-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/uacce')
-rw-r--r--drivers/misc/uacce/uacce.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/uacce/uacce.c b/drivers/misc/uacce/uacce.c
index a5b8dab80c76..a9da7b166503 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) &&