aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/vme/vme.c
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2014-04-14 11:23:14 +1000
committerJames Morris <james.l.morris@oracle.com>2014-04-14 11:23:14 +1000
commitecd740c6f2f092b90b95fa35f757973589eaaca2 (patch)
treece02b1e18c4fc5729699251460cd8be7604d8401 /drivers/vme/vme.c
parentselinux: correctly label /proc inodes in use before the policy is loaded (diff)
parentLinux 3.14 (diff)
downloadlinux-dev-ecd740c6f2f092b90b95fa35f757973589eaaca2.tar.xz
linux-dev-ecd740c6f2f092b90b95fa35f757973589eaaca2.zip
Merge commit 'v3.14' into next
Diffstat (limited to 'drivers/vme/vme.c')
-rw-r--r--drivers/vme/vme.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/drivers/vme/vme.c b/drivers/vme/vme.c
index f6856b427496..7516030037a1 100644
--- a/drivers/vme/vme.c
+++ b/drivers/vme/vme.c
@@ -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 --------------------------------------------------- */
@@ -1512,9 +1525,5 @@ static void __exit vme_exit(void)
bus_unregister(&vme_bus_type);
}
-MODULE_DESCRIPTION("VME bridge driver framework");
-MODULE_AUTHOR("Martyn Welch <martyn.welch@ge.com");
-MODULE_LICENSE("GPL");
-
-module_init(vme_init);
+subsys_initcall(vme_init);
module_exit(vme_exit);