Skip to content

Commit

Permalink
uacce: Use kobj_to_dev() instead of container_of()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tian Tao authored and Greg Kroah-Hartman committed Sep 7, 2020
1 parent ab04de8 commit a4c3d75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/misc/uacce/uacce.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) &&
Expand Down

0 comments on commit a4c3d75

Please sign in to comment.