|
@@ -488,6 +488,8 @@ static void nd_async_device_register(void *d, async_cookie_t cookie)
|
|
put_device(dev);
|
|
put_device(dev);
|
|
}
|
|
}
|
|
put_device(dev);
|
|
put_device(dev);
|
|
|
|
+ if (dev->parent)
|
|
|
|
+ put_device(dev->parent);
|
|
}
|
|
}
|
|
|
|
|
|
static void nd_async_device_unregister(void *d, async_cookie_t cookie)
|
|
static void nd_async_device_unregister(void *d, async_cookie_t cookie)
|
|
@@ -507,6 +509,8 @@ void __nd_device_register(struct device *dev)
|
|
if (!dev)
|
|
if (!dev)
|
|
return;
|
|
return;
|
|
dev->bus = &nvdimm_bus_type;
|
|
dev->bus = &nvdimm_bus_type;
|
|
|
|
+ if (dev->parent)
|
|
|
|
+ get_device(dev->parent);
|
|
get_device(dev);
|
|
get_device(dev);
|
|
async_schedule_domain(nd_async_device_register, dev,
|
|
async_schedule_domain(nd_async_device_register, dev,
|
|
&nd_async_domain);
|
|
&nd_async_domain);
|