diff options
author | Wang Qing <wangqing@vivo.com> | 2020-08-13 10:49:10 +0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2020-09-15 19:37:29 +0200 |
commit | 5f155515d37351f90dbb1c8a5a5cae13190c8564 (patch) | |
tree | f0f99987b848279425745187bbffd150fe071cf1 /drivers/acpi/nfit | |
parent | 856deb866d16e29bd65952e0289066f6078af773 (diff) | |
download | linux-5f155515d37351f90dbb1c8a5a5cae13190c8564.tar.gz linux-5f155515d37351f90dbb1c8a5a5cae13190c8564.tar.bz2 linux-5f155515d37351f90dbb1c8a5a5cae13190c8564.zip |
ACPI: NFIT: Use kobj_to_dev() instead
Use kobj_to_dev() instead of container_of()
Signed-off-by: Wang Qing <wangqing@vivo.com>
Acked-by: Vishal Verma <vishal.l.verma@intel.com>
[ rjw: Subject edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/nfit')
-rw-r--r-- | drivers/acpi/nfit/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 26dd208a0d63..1904ae88a11c 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -1389,7 +1389,7 @@ static bool ars_supported(struct nvdimm_bus *nvdimm_bus) static umode_t nfit_visible(struct kobject *kobj, struct attribute *a, int n) { - struct device *dev = container_of(kobj, struct device, kobj); + struct device *dev = kobj_to_dev(kobj); struct nvdimm_bus *nvdimm_bus = to_nvdimm_bus(dev); if (a == &dev_attr_scrub.attr) @@ -1679,7 +1679,7 @@ static struct attribute *acpi_nfit_dimm_attributes[] = { static umode_t acpi_nfit_dimm_attr_visible(struct kobject *kobj, struct attribute *a, int n) { - struct device *dev = container_of(kobj, struct device, kobj); + struct device *dev = kobj_to_dev(kobj); struct nvdimm *nvdimm = to_nvdimm(dev); struct nfit_mem *nfit_mem = nvdimm_provider_data(nvdimm); |