diff options
author | Jiri Pirko <jpirko@redhat.com> | 2009-05-05 02:20:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-05 15:26:25 -0400 |
commit | aee64faf236815e0f337408892c01b373cd340f3 (patch) | |
tree | e31fa875f8ec1a981f23cf64c0eb2c1e3bf1bf48 /drivers/net/bonding/bond_main.c | |
parent | f001fde5eadd915f4858d22ed70d7040f48767cf (diff) |
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>
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index e3af662b0559..815191dd03c3 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -3459,8 +3459,28 @@ static void bond_destroy_proc_dir(void) | |||
3459 | bond_proc_dir = NULL; | 3459 | bond_proc_dir = NULL; |
3460 | } | 3460 | } |
3461 | } | 3461 | } |
3462 | |||
3463 | #else /* !CONFIG_PROC_FS */ | ||
3464 | |||
3465 | static int bond_create_proc_entry(struct bonding *bond) | ||
3466 | { | ||
3467 | } | ||
3468 | |||
3469 | static void bond_remove_proc_entry(struct bonding *bond) | ||
3470 | { | ||
3471 | } | ||
3472 | |||
3473 | static void bond_create_proc_dir(void) | ||
3474 | { | ||
3475 | } | ||
3476 | |||
3477 | static void bond_destroy_proc_dir(void) | ||
3478 | { | ||
3479 | } | ||
3480 | |||
3462 | #endif /* CONFIG_PROC_FS */ | 3481 | #endif /* CONFIG_PROC_FS */ |
3463 | 3482 | ||
3483 | |||
3464 | /*-------------------------- netdev event handling --------------------------*/ | 3484 | /*-------------------------- netdev event handling --------------------------*/ |
3465 | 3485 | ||
3466 | /* | 3486 | /* |
@@ -3468,10 +3488,8 @@ static void bond_destroy_proc_dir(void) | |||
3468 | */ | 3488 | */ |
3469 | static int bond_event_changename(struct bonding *bond) | 3489 | static int bond_event_changename(struct bonding *bond) |
3470 | { | 3490 | { |
3471 | #ifdef CONFIG_PROC_FS | ||
3472 | bond_remove_proc_entry(bond); | 3491 | bond_remove_proc_entry(bond); |
3473 | bond_create_proc_entry(bond); | 3492 | bond_create_proc_entry(bond); |
3474 | #endif | ||
3475 | down_write(&(bonding_rwsem)); | 3493 | down_write(&(bonding_rwsem)); |
3476 | bond_destroy_sysfs_entry(bond); | 3494 | bond_destroy_sysfs_entry(bond); |
3477 | bond_create_sysfs_entry(bond); | 3495 | bond_create_sysfs_entry(bond); |
@@ -4637,9 +4655,7 @@ static int bond_init(struct net_device *bond_dev, struct bond_params *params) | |||
4637 | NETIF_F_HW_VLAN_RX | | 4655 | NETIF_F_HW_VLAN_RX | |
4638 | NETIF_F_HW_VLAN_FILTER); | 4656 | NETIF_F_HW_VLAN_FILTER); |
4639 | 4657 | ||
4640 | #ifdef CONFIG_PROC_FS | ||
4641 | bond_create_proc_entry(bond); | 4658 | bond_create_proc_entry(bond); |
4642 | #endif | ||
4643 | list_add_tail(&bond->bond_list, &bond_dev_list); | 4659 | list_add_tail(&bond->bond_list, &bond_dev_list); |
4644 | 4660 | ||
4645 | return 0; | 4661 | return 0; |
@@ -4677,9 +4693,7 @@ static void bond_deinit(struct net_device *bond_dev) | |||
4677 | 4693 | ||
4678 | bond_work_cancel_all(bond); | 4694 | bond_work_cancel_all(bond); |
4679 | 4695 | ||
4680 | #ifdef CONFIG_PROC_FS | ||
4681 | bond_remove_proc_entry(bond); | 4696 | bond_remove_proc_entry(bond); |
4682 | #endif | ||
4683 | } | 4697 | } |
4684 | 4698 | ||
4685 | /* Unregister and free all bond devices. | 4699 | /* Unregister and free all bond devices. |
@@ -4698,9 +4712,7 @@ static void bond_free_all(void) | |||
4698 | bond_destroy(bond); | 4712 | bond_destroy(bond); |
4699 | } | 4713 | } |
4700 | 4714 | ||
4701 | #ifdef CONFIG_PROC_FS | ||
4702 | bond_destroy_proc_dir(); | 4715 | bond_destroy_proc_dir(); |
4703 | #endif | ||
4704 | } | 4716 | } |
4705 | 4717 | ||
4706 | /*------------------------- Module initialization ---------------------------*/ | 4718 | /*------------------------- Module initialization ---------------------------*/ |
@@ -5196,9 +5208,7 @@ static int __init bonding_init(void) | |||
5196 | goto out; | 5208 | goto out; |
5197 | } | 5209 | } |
5198 | 5210 | ||
5199 | #ifdef CONFIG_PROC_FS | ||
5200 | bond_create_proc_dir(); | 5211 | bond_create_proc_dir(); |
5201 | #endif | ||
5202 | 5212 | ||
5203 | init_rwsem(&bonding_rwsem); | 5213 | init_rwsem(&bonding_rwsem); |
5204 | 5214 | ||