From: Geliang Tang Date: Wed, 13 Jan 2016 15:30:12 +0000 (+0800) Subject: GenWQE: use kobj_to_dev() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=6908b45eafc480e9da8196f987b1d0f6c887a5d7;p=openwrt%2Fstaging%2Fblogic.git GenWQE: use kobj_to_dev() Use kobj_to_dev() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/misc/genwqe/card_sysfs.c b/drivers/misc/genwqe/card_sysfs.c index 6ab31eff0536..c24c9b7c1dd3 100644 --- a/drivers/misc/genwqe/card_sysfs.c +++ b/drivers/misc/genwqe/card_sysfs.c @@ -278,7 +278,7 @@ static umode_t genwqe_is_visible(struct kobject *kobj, struct attribute *attr, int n) { unsigned int j; - struct device *dev = container_of(kobj, struct device, kobj); + struct device *dev = kobj_to_dev(kobj); struct genwqe_dev *cd = dev_get_drvdata(dev); umode_t mode = attr->mode;