device-dax: introduce 'struct dev_dax' typed-driver operations
[linux-2.6-microblaze.git] / drivers / dax / bus.c
index 0a48ce3..9549f11 100644 (file)
@@ -135,10 +135,28 @@ static bool is_static(struct dax_region *dax_region)
        return (dax_region->res.flags & IORESOURCE_DAX_STATIC) != 0;
 }
 
+static int dax_bus_probe(struct device *dev)
+{
+       struct dax_device_driver *dax_drv = to_dax_drv(dev->driver);
+       struct dev_dax *dev_dax = to_dev_dax(dev);
+
+       return dax_drv->probe(dev_dax);
+}
+
+static int dax_bus_remove(struct device *dev)
+{
+       struct dax_device_driver *dax_drv = to_dax_drv(dev->driver);
+       struct dev_dax *dev_dax = to_dev_dax(dev);
+
+       return dax_drv->remove(dev_dax);
+}
+
 static struct bus_type dax_bus_type = {
        .name = "dax",
        .uevent = dax_bus_uevent,
        .match = dax_bus_match,
+       .probe = dax_bus_probe,
+       .remove = dax_bus_remove,
        .drv_groups = dax_drv_groups,
 };