From: Geliang Tang Date: Wed, 6 Jan 2016 15:28:39 +0000 (+0800) Subject: zorro: Use kobj_to_dev() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a9c9d9aca4e7cf75d09faa098785ed991db41c65;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git zorro: Use kobj_to_dev() Use kobj_to_dev() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: Geert Uytterhoeven --- diff --git a/drivers/zorro/zorro-sysfs.c b/drivers/zorro/zorro-sysfs.c index 36b210f9b6b2..9282dbf5abdb 100644 --- a/drivers/zorro/zorro-sysfs.c +++ b/drivers/zorro/zorro-sysfs.c @@ -65,8 +65,7 @@ static ssize_t zorro_read_config(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) { - struct zorro_dev *z = to_zorro_dev(container_of(kobj, struct device, - kobj)); + struct zorro_dev *z = to_zorro_dev(kobj_to_dev(kobj)); struct ConfigDev cd; /* Construct a ConfigDev */