summaryrefslogtreecommitdiff
path: root/drivers/vme/vme.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2014-04-03 20:26:49 +0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-04-03 20:26:49 +0400
commit692d96552c9a86a919fe6b5b82288a6c77c015a5 (patch)
treea9e49c040d361ea2293a8966832378def5a06714 /drivers/vme/vme.c
parente4dbedc7eac7da9db363a36f2bd4366962eeefcc (diff)
parente2c3ecf0ea8e87c5209371af7da107ebc47a5639 (diff)
downloadlinux-692d96552c9a86a919fe6b5b82288a6c77c015a5.tar.xz
Merge branch 'next' into for-linus
First round of input updates for 3.15.
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);