diff options
author | Adrian Bunk <bunk@stusta.de> | 2007-02-05 21:07:27 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-02-08 15:38:54 -0500 |
commit | 97353cb4c05c2edf260e9d1b19a29d3cc0060a09 (patch) | |
tree | 6e1499853f6b45b6d33ec8830a0b06c98c9e96c0 | |
parent | 84ff602efba2664762070add0600aa5c870a2659 (diff) |
[NET] net/wanrouter/wanmain.c: cleanups
This patch contains the following cleanups:
- make the following needlessly global functions static:
- lock_adapter_irq()
- unlock_adapter_irq()
- #if 0 the following unused global functions:
- wanrouter_encapsulate()
- wanrouter_type_trans()
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/linux/wanrouter.h | 8 | ||||
-rw-r--r-- | net/wanrouter/wanmain.c | 17 |
2 files changed, 8 insertions, 17 deletions
diff --git a/include/linux/wanrouter.h b/include/linux/wanrouter.h index 2cd05013edfc..3add87465b1f 100644 --- a/include/linux/wanrouter.h +++ b/include/linux/wanrouter.h | |||
@@ -516,9 +516,6 @@ struct wan_device { | |||
516 | /* Public functions available for device drivers */ | 516 | /* Public functions available for device drivers */ |
517 | extern int register_wan_device(struct wan_device *wandev); | 517 | extern int register_wan_device(struct wan_device *wandev); |
518 | extern int unregister_wan_device(char *name); | 518 | extern int unregister_wan_device(char *name); |
519 | __be16 wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev); | ||
520 | int wanrouter_encapsulate(struct sk_buff *skb, struct net_device *dev, | ||
521 | unsigned short type); | ||
522 | 519 | ||
523 | /* Proc interface functions. These must not be called by the drivers! */ | 520 | /* Proc interface functions. These must not be called by the drivers! */ |
524 | extern int wanrouter_proc_init(void); | 521 | extern int wanrouter_proc_init(void); |
@@ -527,11 +524,6 @@ extern int wanrouter_proc_add(struct wan_device *wandev); | |||
527 | extern int wanrouter_proc_delete(struct wan_device *wandev); | 524 | extern int wanrouter_proc_delete(struct wan_device *wandev); |
528 | extern int wanrouter_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); | 525 | extern int wanrouter_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); |
529 | 526 | ||
530 | extern void lock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags); | ||
531 | extern void unlock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags); | ||
532 | |||
533 | |||
534 | |||
535 | /* Public Data */ | 527 | /* Public Data */ |
536 | /* list of registered devices */ | 528 | /* list of registered devices */ |
537 | extern struct wan_device *wanrouter_router_devlist; | 529 | extern struct wan_device *wanrouter_router_devlist; |
diff --git a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c index 769cdd62c1bb..4d90a179aeda 100644 --- a/net/wanrouter/wanmain.c +++ b/net/wanrouter/wanmain.c | |||
@@ -86,8 +86,8 @@ static int wanrouter_device_del_if(struct wan_device *wandev, | |||
86 | 86 | ||
87 | static struct wan_device *wanrouter_find_device(char *name); | 87 | static struct wan_device *wanrouter_find_device(char *name); |
88 | static int wanrouter_delete_interface(struct wan_device *wandev, char *name); | 88 | static int wanrouter_delete_interface(struct wan_device *wandev, char *name); |
89 | void lock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags); | 89 | static void lock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags); |
90 | void unlock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags); | 90 | static void unlock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags); |
91 | 91 | ||
92 | 92 | ||
93 | 93 | ||
@@ -104,8 +104,8 @@ struct wan_device* wanrouter_router_devlist; /* list of registered devices */ | |||
104 | * Organize Unique Identifiers for encapsulation/decapsulation | 104 | * Organize Unique Identifiers for encapsulation/decapsulation |
105 | */ | 105 | */ |
106 | 106 | ||
107 | static unsigned char wanrouter_oui_ether[] = { 0x00, 0x00, 0x00 }; | ||
108 | #if 0 | 107 | #if 0 |
108 | static unsigned char wanrouter_oui_ether[] = { 0x00, 0x00, 0x00 }; | ||
109 | static unsigned char wanrouter_oui_802_2[] = { 0x00, 0x80, 0xC2 }; | 109 | static unsigned char wanrouter_oui_802_2[] = { 0x00, 0x80, 0xC2 }; |
110 | #endif | 110 | #endif |
111 | 111 | ||
@@ -246,6 +246,8 @@ int unregister_wan_device(char *name) | |||
246 | return 0; | 246 | return 0; |
247 | } | 247 | } |
248 | 248 | ||
249 | #if 0 | ||
250 | |||
249 | /* | 251 | /* |
250 | * Encapsulate packet. | 252 | * Encapsulate packet. |
251 | * | 253 | * |
@@ -341,6 +343,7 @@ __be16 wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev) | |||
341 | return ethertype; | 343 | return ethertype; |
342 | } | 344 | } |
343 | 345 | ||
346 | #endif /* 0 */ | ||
344 | 347 | ||
345 | /* | 348 | /* |
346 | * WAN device IOCTL. | 349 | * WAN device IOCTL. |
@@ -799,23 +802,19 @@ static int wanrouter_delete_interface(struct wan_device *wandev, char *name) | |||
799 | return 0; | 802 | return 0; |
800 | } | 803 | } |
801 | 804 | ||
802 | void lock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags) | 805 | static void lock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags) |
803 | { | 806 | { |
804 | spin_lock_irqsave(lock, *smp_flags); | 807 | spin_lock_irqsave(lock, *smp_flags); |
805 | } | 808 | } |
806 | 809 | ||
807 | 810 | ||
808 | void unlock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags) | 811 | static void unlock_adapter_irq(spinlock_t *lock, unsigned long *smp_flags) |
809 | { | 812 | { |
810 | spin_unlock_irqrestore(lock, *smp_flags); | 813 | spin_unlock_irqrestore(lock, *smp_flags); |
811 | } | 814 | } |
812 | 815 | ||
813 | EXPORT_SYMBOL(register_wan_device); | 816 | EXPORT_SYMBOL(register_wan_device); |
814 | EXPORT_SYMBOL(unregister_wan_device); | 817 | EXPORT_SYMBOL(unregister_wan_device); |
815 | EXPORT_SYMBOL(wanrouter_encapsulate); | ||
816 | EXPORT_SYMBOL(wanrouter_type_trans); | ||
817 | EXPORT_SYMBOL(lock_adapter_irq); | ||
818 | EXPORT_SYMBOL(unlock_adapter_irq); | ||
819 | 818 | ||
820 | MODULE_LICENSE("GPL"); | 819 | MODULE_LICENSE("GPL"); |
821 | 820 | ||