]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] em28xx: improve extension information messages
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 26 Dec 2013 15:41:03 +0000 (12:41 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 7 Jan 2014 07:11:48 +0000 (05:11 -0200)
Add a message with consistent prints before and after each
extension initialization, and provide a better text for module
load.

While here, add a missing sanity check for extension finish
code at em28xx-v4l extension.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/em28xx/em28xx-audio.c
drivers/media/usb/em28xx/em28xx-core.c
drivers/media/usb/em28xx/em28xx-dvb.c
drivers/media/usb/em28xx/em28xx-input.c
drivers/media/usb/em28xx/em28xx-video.c

index 2fdb66ee44ab7532b7e0d6a9bf3e043eddec8a87..263886adcf26688c91992c35b69910aa8476127c 100644 (file)
@@ -649,7 +649,8 @@ static int em28xx_audio_init(struct em28xx *dev)
                return 0;
        }
 
-       printk(KERN_INFO "em28xx-audio.c: probing for em28xx Audio Vendor Class\n");
+       em28xx_info("Binding audio extension\n");
+
        printk(KERN_INFO "em28xx-audio.c: Copyright (C) 2006 Markus "
                         "Rechberger\n");
        printk(KERN_INFO "em28xx-audio.c: Copyright (C) 2007-2011 Mauro Carvalho Chehab\n");
@@ -702,6 +703,7 @@ static int em28xx_audio_init(struct em28xx *dev)
        adev->sndcard = card;
        adev->udev = dev->udev;
 
+       em28xx_info("Audio extension successfully initialized\n");
        return 0;
 }
 
index c416dd33af3f0f94ad724ddbe68b5ed2287b2cb6..b810641e48fe3c303dd3862edfee5573d8ce4567 100644 (file)
@@ -1069,7 +1069,7 @@ int em28xx_register_extension(struct em28xx_ops *ops)
                ops->init(dev);
        }
        mutex_unlock(&em28xx_devlist_mutex);
-       printk(KERN_INFO "Em28xx: Initialized (%s) extension\n", ops->name);
+       printk(KERN_INFO "em28xx: Registered (%s) extension\n", ops->name);
        return 0;
 }
 EXPORT_SYMBOL(em28xx_register_extension);
index ddc0e609065de9fdac4aa30cb6c725368e024589..f72663a9b5c58c07ee62e92697091d64f4c54508 100644 (file)
@@ -274,7 +274,7 @@ static int em28xx_stop_feed(struct dvb_demux_feed *feed)
 static int em28xx_dvb_bus_ctrl(struct dvb_frontend *fe, int acquire)
 {
        struct em28xx_i2c_bus *i2c_bus = fe->dvb->priv;
-        struct em28xx *dev = i2c_bus->dev;
+       struct em28xx *dev = i2c_bus->dev;
 
        if (acquire)
                return em28xx_set_mode(dev, EM28XX_DIGITAL_MODE);
@@ -992,10 +992,11 @@ static int em28xx_dvb_init(struct em28xx *dev)
 
        if (!dev->board.has_dvb) {
                /* This device does not support the extension */
-               printk(KERN_INFO "em28xx_dvb: This device does not support the extension\n");
                return 0;
        }
 
+       em28xx_info("Binding DVB extension\n");
+
        dvb = kzalloc(sizeof(struct em28xx_dvb), GFP_KERNEL);
 
        if (dvb == NULL) {
@@ -1407,7 +1408,7 @@ static int em28xx_dvb_init(struct em28xx *dev)
        /* MFE lock */
        dvb->adapter.mfe_shared = mfe_shared;
 
-       em28xx_info("Successfully loaded em28xx-dvb\n");
+       em28xx_info("DVB extension successfully initialized\n");
 ret:
        em28xx_set_mode(dev, EM28XX_SUSPEND);
        mutex_unlock(&dev->lock);
index 93a7d02b9cb498aa3eca31b17f2908bbb977c285..eed7dd79f73437c81324d9d6d85a91ffef9988ef 100644 (file)
@@ -692,6 +692,8 @@ static int em28xx_ir_init(struct em28xx *dev)
                return 0;
        }
 
+       em28xx_info("Registering input extension\n");
+
        ir = kzalloc(sizeof(*ir), GFP_KERNEL);
        rc = rc_allocate_device();
        if (!ir || !rc)
@@ -785,6 +787,8 @@ static int em28xx_ir_init(struct em28xx *dev)
        if (err)
                goto error;
 
+       em28xx_info("Input extension successfully initalized\n");
+
        return 0;
 
 error:
index 7d11a16e72b5e5ab4a420687d9d514420a1237ad..ada133cf8e4332767cd29b7a3a48c0c1f1eb023a 100644 (file)
@@ -2216,8 +2216,7 @@ static int em28xx_v4l2_init(struct em28xx *dev)
                return 0;
        }
 
-       printk(KERN_INFO "%s: v4l2 driver version %s\n",
-               dev->name, EM28XX_VERSION);
+       em28xx_info("Registering V4L2 extension\n");
 
        mutex_lock(&dev->lock);
 
@@ -2499,6 +2498,8 @@ static int em28xx_v4l2_init(struct em28xx *dev)
        /* initialize videobuf2 stuff */
        em28xx_vb2_setup(dev);
 
+       em28xx_info("V4L2 extension successfully initialized\n");
+
        mutex_unlock(&dev->lock);
        return 0;