]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/isdn/mISDN/core.c
mISDN: Add ISDN sample clock API to mISDN core
[linux-2.6-omap-h63xx.git] / drivers / isdn / mISDN / core.c
index 33068177b7c9486da1866344d2e25654ec2ad7d1..9116f54def2c19cde23c57348ac797fdae1217b0 100644 (file)
@@ -26,12 +26,12 @@ MODULE_LICENSE("GPL");
 module_param(debug, uint, S_IRUGO | S_IWUSR);
 
 static LIST_HEAD(devices);
-DEFINE_RWLOCK(device_lock);
+static DEFINE_RWLOCK(device_lock);
 static u64             device_ids;
 #define MAX_DEVICE_ID  63
 
 static LIST_HEAD(Bprotocols);
-DEFINE_RWLOCK(bp_lock);
+static DEFINE_RWLOCK(bp_lock);
 
 struct mISDNdevice
 *get_mdevice(u_int id)
@@ -82,12 +82,12 @@ mISDN_register_device(struct mISDNdevice *dev, char *name)
        if (dev->id < 0)
                return -EBUSY;
        if (name && name[0])
-               strcpy(dev->name, name);
+               dev_set_name(&dev->dev, "%s", name);
        else
-               sprintf(dev->name, "mISDN%d", dev->id);
+               dev_set_name(&dev->dev, "mISDN%d", dev->id);
        if (debug & DEBUG_CORE)
                printk(KERN_DEBUG "mISDN_register %s %d\n",
-                       dev->name, dev->id);
+                       dev_name(&dev->dev), dev->id);
        err = create_stack(dev);
        if (err)
                return err;
@@ -104,7 +104,7 @@ mISDN_unregister_device(struct mISDNdevice *dev) {
 
        if (debug & DEBUG_CORE)
                printk(KERN_DEBUG "mISDN_unregister %s %d\n",
-                       dev->name, dev->id);
+                       dev_name(&dev->dev), dev->id);
        write_lock_irqsave(&device_lock, flags);
        list_del(&dev->D.list);
        write_unlock_irqrestore(&device_lock, flags);
@@ -192,13 +192,14 @@ mISDN_unregister_Bprotocol(struct Bprotocol *bp)
 }
 EXPORT_SYMBOL(mISDN_unregister_Bprotocol);
 
-int
+static int
 mISDNInit(void)
 {
        int     err;
 
        printk(KERN_INFO "Modular ISDN core version %d.%d.%d\n",
                MISDN_MAJOR_VERSION, MISDN_MINOR_VERSION, MISDN_RELEASE);
+       mISDN_init_clock(&debug);
        mISDN_initstack(&debug);
        err = mISDN_inittimer(&debug);
        if (err)
@@ -224,7 +225,7 @@ error:
        return err;
 }
 
-void mISDN_cleanup(void)
+static void mISDN_cleanup(void)
 {
        misdn_sock_cleanup();
        mISDN_timer_cleanup();