mirror of
https://github.com/torvalds/linux.git
synced 2024-12-15 23:51:46 +00:00
bonding: get rid of CONFIG_PROC_FS ifdefs
Remove CONFIG_PROC_FS ifdefs from the code by adding void functions. Signed-off-by: Jiri Pirko <jpirko@redhat.com> drivers/net/bonding/bond_main.c | 30 ++++++++++++++++++++---------- 1 files changed, 20 insertions(+), 10 deletions(-) Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f001fde5ea
commit
aee64faf23
@ -3459,8 +3459,28 @@ static void bond_destroy_proc_dir(void)
|
|||||||
bond_proc_dir = NULL;
|
bond_proc_dir = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else /* !CONFIG_PROC_FS */
|
||||||
|
|
||||||
|
static int bond_create_proc_entry(struct bonding *bond)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static void bond_remove_proc_entry(struct bonding *bond)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static void bond_create_proc_dir(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static void bond_destroy_proc_dir(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_PROC_FS */
|
#endif /* CONFIG_PROC_FS */
|
||||||
|
|
||||||
|
|
||||||
/*-------------------------- netdev event handling --------------------------*/
|
/*-------------------------- netdev event handling --------------------------*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -3468,10 +3488,8 @@ static void bond_destroy_proc_dir(void)
|
|||||||
*/
|
*/
|
||||||
static int bond_event_changename(struct bonding *bond)
|
static int bond_event_changename(struct bonding *bond)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_PROC_FS
|
|
||||||
bond_remove_proc_entry(bond);
|
bond_remove_proc_entry(bond);
|
||||||
bond_create_proc_entry(bond);
|
bond_create_proc_entry(bond);
|
||||||
#endif
|
|
||||||
down_write(&(bonding_rwsem));
|
down_write(&(bonding_rwsem));
|
||||||
bond_destroy_sysfs_entry(bond);
|
bond_destroy_sysfs_entry(bond);
|
||||||
bond_create_sysfs_entry(bond);
|
bond_create_sysfs_entry(bond);
|
||||||
@ -4637,9 +4655,7 @@ static int bond_init(struct net_device *bond_dev, struct bond_params *params)
|
|||||||
NETIF_F_HW_VLAN_RX |
|
NETIF_F_HW_VLAN_RX |
|
||||||
NETIF_F_HW_VLAN_FILTER);
|
NETIF_F_HW_VLAN_FILTER);
|
||||||
|
|
||||||
#ifdef CONFIG_PROC_FS
|
|
||||||
bond_create_proc_entry(bond);
|
bond_create_proc_entry(bond);
|
||||||
#endif
|
|
||||||
list_add_tail(&bond->bond_list, &bond_dev_list);
|
list_add_tail(&bond->bond_list, &bond_dev_list);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -4677,9 +4693,7 @@ static void bond_deinit(struct net_device *bond_dev)
|
|||||||
|
|
||||||
bond_work_cancel_all(bond);
|
bond_work_cancel_all(bond);
|
||||||
|
|
||||||
#ifdef CONFIG_PROC_FS
|
|
||||||
bond_remove_proc_entry(bond);
|
bond_remove_proc_entry(bond);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Unregister and free all bond devices.
|
/* Unregister and free all bond devices.
|
||||||
@ -4698,9 +4712,7 @@ static void bond_free_all(void)
|
|||||||
bond_destroy(bond);
|
bond_destroy(bond);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PROC_FS
|
|
||||||
bond_destroy_proc_dir();
|
bond_destroy_proc_dir();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*------------------------- Module initialization ---------------------------*/
|
/*------------------------- Module initialization ---------------------------*/
|
||||||
@ -5196,9 +5208,7 @@ static int __init bonding_init(void)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PROC_FS
|
|
||||||
bond_create_proc_dir();
|
bond_create_proc_dir();
|
||||||
#endif
|
|
||||||
|
|
||||||
init_rwsem(&bonding_rwsem);
|
init_rwsem(&bonding_rwsem);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user