Commit 5b93c2a2 authored by Manohar Vanga's avatar Manohar Vanga Committed by Greg Kroah-Hartman

staging: vme: remove vme_add_bus() and vme_remove_bus()

The functions vme_add_bus() and vme_remove_bus() were only being used
in the vme_register_bridge() and vme_unregister_bridge() functions
respectively. This patch gets rid of them and moves their code to
vme_register_bridge() and vme_unregister_bridge().
Signed-off-by: default avatarManohar Vanga <manohar.vanga@cern.ch>
Acked-by: default avatarMartyn Welch <martyn.welch@ge.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c26f6112
...@@ -1307,7 +1307,12 @@ EXPORT_SYMBOL(vme_slot_get); ...@@ -1307,7 +1307,12 @@ EXPORT_SYMBOL(vme_slot_get);
/* - Bridge Registration --------------------------------------------------- */ /* - Bridge Registration --------------------------------------------------- */
static int vme_add_bus(struct vme_bridge *bridge) static void vme_dev_release(struct device *dev)
{
kfree(dev_to_vme_dev(dev));
}
int vme_register_bridge(struct vme_bridge *bridge)
{ {
int i; int i;
int ret = -1; int ret = -1;
...@@ -1327,8 +1332,9 @@ static int vme_add_bus(struct vme_bridge *bridge) ...@@ -1327,8 +1332,9 @@ static int vme_add_bus(struct vme_bridge *bridge)
return ret; return ret;
} }
EXPORT_SYMBOL(vme_register_bridge);
static void vme_remove_bus(struct vme_bridge *bridge) void vme_unregister_bridge(struct vme_bridge *bridge)
{ {
struct vme_dev *vdev; struct vme_dev *vdev;
struct vme_dev *tmp; struct vme_dev *tmp;
...@@ -1343,22 +1349,6 @@ static void vme_remove_bus(struct vme_bridge *bridge) ...@@ -1343,22 +1349,6 @@ static void vme_remove_bus(struct vme_bridge *bridge)
list_del(&bridge->bus_list); list_del(&bridge->bus_list);
mutex_unlock(&vme_buses_lock); mutex_unlock(&vme_buses_lock);
} }
static void vme_dev_release(struct device *dev)
{
kfree(dev_to_vme_dev(dev));
}
int vme_register_bridge(struct vme_bridge *bridge)
{
return vme_add_bus(bridge);
}
EXPORT_SYMBOL(vme_register_bridge);
void vme_unregister_bridge(struct vme_bridge *bridge)
{
vme_remove_bus(bridge);
}
EXPORT_SYMBOL(vme_unregister_bridge); EXPORT_SYMBOL(vme_unregister_bridge);
/* - Driver Registration --------------------------------------------------- */ /* - Driver Registration --------------------------------------------------- */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment