[media] cx231xx: use dev_info() for extension load/unload
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Sun, 2 Nov 2014 11:13:54 +0000 (08:13 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 3 Nov 2014 17:59:03 +0000 (15:59 -0200)
Now that we're using dev_foo, the logs become like:

usb 1-2: DVB: registering adapter 0 frontend 0 (Fujitsu mb86A20s)...
usb 1-2: Successfully loaded cx231xx-dvb
cx231xx: Cx231xx dvb Extension initialized

It is not clear, by the logs, that usb 1-2 name is an alias for
cx231xx. So, we also need to use dvb_info() at extension load/unload.

After the patch, it will print:
usb 1-2: Cx231xx dvb Extension initialized

With is coherent with the other logs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/usb/cx231xx/cx231xx-core.c

index 36c3ecf204c11acb4c1cca11ab493844c3edb88d..64e907f02a021c746a70576a10d8fb4f8e26ed8a 100644 (file)
@@ -98,10 +98,10 @@ int cx231xx_register_extension(struct cx231xx_ops *ops)
 
        mutex_lock(&cx231xx_devlist_mutex);
        list_add_tail(&ops->next, &cx231xx_extension_devlist);
-       list_for_each_entry(dev, &cx231xx_devlist, devlist)
+       list_for_each_entry(dev, &cx231xx_devlist, devlist) {
                ops->init(dev);
-
-       printk(KERN_INFO DRIVER_NAME ": %s initialized\n", ops->name);
+               dev_info(&dev->udev->dev, "%s initialized\n", ops->name);
+       }
        mutex_unlock(&cx231xx_devlist_mutex);
        return 0;
 }
@@ -112,11 +112,11 @@ void cx231xx_unregister_extension(struct cx231xx_ops *ops)
        struct cx231xx *dev = NULL;
 
        mutex_lock(&cx231xx_devlist_mutex);
-       list_for_each_entry(dev, &cx231xx_devlist, devlist)
+       list_for_each_entry(dev, &cx231xx_devlist, devlist) {
                ops->fini(dev);
+               dev_info(&dev->udev->dev, "%s removed\n", ops->name);
+       }
 
-
-       printk(KERN_INFO DRIVER_NAME ": %s removed\n", ops->name);
        list_del(&ops->next);
        mutex_unlock(&cx231xx_devlist_mutex);
 }
This page took 0.044643 seconds and 5 git commands to generate.