]> Pileus Git - ~andy/linux/blobdiff - drivers/vme/vme.c
vme: remove DEFINE_PCI_DEVICE_TABLE macro
[~andy/linux] / drivers / vme / vme.c
index f6856b42749655f3730e99c3bdb45891efb1d0b9..96562c9a8b1b8ee220a3e39d7d5bd5758b548eb6 100644 (file)
@@ -1274,7 +1274,7 @@ void vme_lm_free(struct vme_resource *resource)
 }
 EXPORT_SYMBOL(vme_lm_free);
 
-int vme_slot_get(struct vme_dev *vdev)
+int vme_slot_num(struct vme_dev *vdev)
 {
        struct vme_bridge *bridge;
 
@@ -1285,14 +1285,27 @@ int vme_slot_get(struct vme_dev *vdev)
        }
 
        if (bridge->slot_get == NULL) {
-               printk(KERN_WARNING "vme_slot_get not supported\n");
+               printk(KERN_WARNING "vme_slot_num not supported\n");
                return -EINVAL;
        }
 
        return bridge->slot_get(bridge);
 }
-EXPORT_SYMBOL(vme_slot_get);
+EXPORT_SYMBOL(vme_slot_num);
 
+int vme_bus_num(struct vme_dev *vdev)
+{
+       struct vme_bridge *bridge;
+
+       bridge = vdev->bridge;
+       if (bridge == NULL) {
+               pr_err("Can't find VME bus\n");
+               return -EINVAL;
+       }
+
+       return bridge->num;
+}
+EXPORT_SYMBOL(vme_bus_num);
 
 /* - Bridge Registration --------------------------------------------------- */