VME: Rename vme_slot_get to avoid confusion with reference counting
authorMartyn Welch <martyn.welch@ge.com>
Fri, 8 Nov 2013 11:58:35 +0000 (11:58 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Dec 2013 19:15:58 +0000 (11:15 -0800)
Traditionally the "get" functions increment the reference count of the
object that is returned, which does not happen with vme_slot_get. The
function vme_slot_get returns the physical VME slot associated with a
particular struct vme_dev. Rename vme_slot_num to avoid any confusion.

Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/vme_api.txt
drivers/staging/vme/devices/vme_user.c
drivers/vme/vme.c
include/linux/vme.h

index 126a1f1d5151529a14b8e153fb65b2fe3480d3b1..ffe6e22a2ccd992169b654b8de7b4c3041140112 100644 (file)
@@ -393,7 +393,7 @@ Slot Detection
 
 This function returns the slot ID of the provided bridge.
 
-       int vme_slot_get(struct vme_dev *dev);
+       int vme_slot_num(struct vme_dev *dev);
 
 
 Bus Detection
index caee906f9b387cce70fff74ed1942c47ec0c27c9..bc4f8623c8ccf26b92169e8ef3a96972fe983a8f 100644 (file)
@@ -666,7 +666,7 @@ static int vme_user_match(struct vme_dev *vdev)
        int i;
 
        int cur_bus = vme_bus_num(vdev);
-       int cur_slot = vme_slot_get(vdev);
+       int cur_slot = vme_slot_num(vdev);
 
        for (i = 0; i < bus_num; i++)
                if ((cur_bus == bus[i]) && (cur_slot == vdev->num))
index 8df5e4efc1cadcbba8ee6f8412920c0406be6114..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,13 +1285,13 @@ 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)
 {
index 4eb42c8f097d0d5eadc468d2ff8dac5bd5032f48..8cd6f19ca518c254a1911b2aa0e1c36dc05951df 100644 (file)
@@ -164,7 +164,7 @@ int vme_lm_attach(struct vme_resource *, int, void (*callback)(int));
 int vme_lm_detach(struct vme_resource *, int);
 void vme_lm_free(struct vme_resource *);
 
-int vme_slot_get(struct vme_dev *);
+int vme_slot_num(struct vme_dev *);
 int vme_bus_num(struct vme_dev *);
 
 int vme_register_driver(struct vme_driver *, unsigned int);