Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

VME: Rename vme_slot_get to avoid confusion with reference counting

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>

authored by

Martyn Welch and committed by
Greg Kroah-Hartman
d7729f0f 978f47d6

+6 -6
+1 -1
Documentation/vme_api.txt
··· 393 393 394 394 This function returns the slot ID of the provided bridge. 395 395 396 - int vme_slot_get(struct vme_dev *dev); 396 + int vme_slot_num(struct vme_dev *dev); 397 397 398 398 399 399 Bus Detection
+1 -1
drivers/staging/vme/devices/vme_user.c
··· 666 666 int i; 667 667 668 668 int cur_bus = vme_bus_num(vdev); 669 - int cur_slot = vme_slot_get(vdev); 669 + int cur_slot = vme_slot_num(vdev); 670 670 671 671 for (i = 0; i < bus_num; i++) 672 672 if ((cur_bus == bus[i]) && (cur_slot == vdev->num))
+3 -3
drivers/vme/vme.c
··· 1274 1274 } 1275 1275 EXPORT_SYMBOL(vme_lm_free); 1276 1276 1277 - int vme_slot_get(struct vme_dev *vdev) 1277 + int vme_slot_num(struct vme_dev *vdev) 1278 1278 { 1279 1279 struct vme_bridge *bridge; 1280 1280 ··· 1285 1285 } 1286 1286 1287 1287 if (bridge->slot_get == NULL) { 1288 - printk(KERN_WARNING "vme_slot_get not supported\n"); 1288 + printk(KERN_WARNING "vme_slot_num not supported\n"); 1289 1289 return -EINVAL; 1290 1290 } 1291 1291 1292 1292 return bridge->slot_get(bridge); 1293 1293 } 1294 - EXPORT_SYMBOL(vme_slot_get); 1294 + EXPORT_SYMBOL(vme_slot_num); 1295 1295 1296 1296 int vme_bus_num(struct vme_dev *vdev) 1297 1297 {
+1 -1
include/linux/vme.h
··· 164 164 int vme_lm_detach(struct vme_resource *, int); 165 165 void vme_lm_free(struct vme_resource *); 166 166 167 - int vme_slot_get(struct vme_dev *); 167 + int vme_slot_num(struct vme_dev *); 168 168 int vme_bus_num(struct vme_dev *); 169 169 170 170 int vme_register_driver(struct vme_driver *, unsigned int);