Use kobj_to_dev() instead of container_of() Signed-off-by: Ding Xiang <dingxiang@xxxxxxxxxxxxxxxxxxxx> --- drivers/staging/fieldbus/dev_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fieldbus/dev_core.c b/drivers/staging/fieldbus/dev_core.c index 1ba0234cc60d..5aab734606ea 100644 --- a/drivers/staging/fieldbus/dev_core.c +++ b/drivers/staging/fieldbus/dev_core.c @@ -134,7 +134,7 @@ static struct attribute *fieldbus_attrs[] = { static umode_t fieldbus_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 fieldbus_dev *fb = dev_get_drvdata(dev); umode_t mode = attr->mode; -- 2.28.0 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel