From: Stephen Hemminger Subject: [PATCH] (2/4) get rid of register_frad Date: Mon, 8 Sep 2003 14:09:22 -0700 Sender: netdev-bounce@oss.sgi.com Message-ID: <20030908140922.21f8faec.shemminger@osdl.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@oss.sgi.com Return-path: To: Jeff Garzik Errors-to: netdev-bounce@oss.sgi.com List-Id: netdev.vger.kernel.org The sdla and dlci drivers have a callback interface which only stores a name in a table, but doesn't do anything useful. Looks like an interface which has lost it's usefulness and can be safely removed. Tested on 2.6.0-test5 by exercising the higher layer (dlci) without real hardware. diff -Nru a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c --- a/drivers/net/wan/dlci.c Mon Sep 8 14:01:46 2003 +++ b/drivers/net/wan/dlci.c Mon Sep 8 14:01:46 2003 @@ -59,63 +59,9 @@ static LIST_HEAD(dlci_devs); static spinlock_t dlci_dev_lock = SPIN_LOCK_UNLOCKED; -static char *basename[16]; static void dlci_setup(struct net_device *); -/* allow FRAD's to register their name as a valid FRAD */ -int register_frad(const char *name) -{ - int i; - - if (!name) - return(-EINVAL); - - for (i=0;idevname, basename[i], strlen(basename[i])) == 0) && - (strlen(dlci->devname) > strlen(basename[i]))) - break; - - if (i == sizeof(basename) / sizeof(char *)) { - dev_put(slave); - return(-EINVAL); - } - /* create device name */ master = alloc_netdev( sizeof(struct dlci_local), "dlci%d", dlci_setup); @@ -571,13 +505,9 @@ int __init init_dlci(void) { - int i; dlci_ioctl_set(dlci_ioctl); printk("%s.\n", version); - - for(i=0;ipriv; del_timer_sync(&flp->timer); free_netdev(sdla); - - unregister_frad(devname); } MODULE_LICENSE("GPL"); diff -Nru a/include/linux/if_frad.h b/include/linux/if_frad.h --- a/include/linux/if_frad.h Mon Sep 8 14:01:46 2003 +++ b/include/linux/if_frad.h Mon Sep 8 14:01:46 2003 @@ -191,9 +191,6 @@ int buffer; /* current buffer for S508 firmware */ }; -int register_frad(const char *name); -int unregister_frad(const char *name); - extern void dlci_ioctl_set(int (*hook)(unsigned int, void *)); #endif /* __KERNEL__ */