Skip to content

Commit

Permalink
device-dax: use kobj_to_dev()
Browse files Browse the repository at this point in the history
Use kobj_to_dev() instead of open-coding it.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
  • Loading branch information
Minghao Chi authored and intel-lab-lkp committed Apr 25, 2022
1 parent af2d861 commit 83eff18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dax/bus.c
Expand Up @@ -512,7 +512,7 @@ static DEVICE_ATTR_WO(delete);
static umode_t dax_region_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 dax_region *dax_region = dev_get_drvdata(dev);

if (is_static(dax_region))
Expand Down

0 comments on commit 83eff18

Please sign in to comment.