diff options
Diffstat (limited to 'drivers/xen/xenbus')
-rw-r--r-- | drivers/xen/xenbus/xenbus_probe.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c index 4750de316ad3..88fc5ec665f5 100644 --- a/drivers/xen/xenbus/xenbus_probe.c +++ b/drivers/xen/xenbus/xenbus_probe.c | |||
@@ -846,6 +846,7 @@ static int is_disconnected_device(struct device *dev, void *data) | |||
846 | { | 846 | { |
847 | struct xenbus_device *xendev = to_xenbus_device(dev); | 847 | struct xenbus_device *xendev = to_xenbus_device(dev); |
848 | struct device_driver *drv = data; | 848 | struct device_driver *drv = data; |
849 | struct xenbus_driver *xendrv; | ||
849 | 850 | ||
850 | /* | 851 | /* |
851 | * A device with no driver will never connect. We care only about | 852 | * A device with no driver will never connect. We care only about |
@@ -858,7 +859,9 @@ static int is_disconnected_device(struct device *dev, void *data) | |||
858 | if (drv && (dev->driver != drv)) | 859 | if (drv && (dev->driver != drv)) |
859 | return 0; | 860 | return 0; |
860 | 861 | ||
861 | return (xendev->state != XenbusStateConnected); | 862 | xendrv = to_xenbus_driver(dev->driver); |
863 | return (xendev->state != XenbusStateConnected || | ||
864 | (xendrv->is_ready && !xendrv->is_ready(xendev))); | ||
862 | } | 865 | } |
863 | 866 | ||
864 | static int exists_disconnected_device(struct device_driver *drv) | 867 | static int exists_disconnected_device(struct device_driver *drv) |