staging: bcm2835_codec: Clean up logging on unloading the driver
authorDave Stevenson <dave.stevenson@raspberrypi.org>
Fri, 8 Mar 2019 11:26:00 +0000 (11:26 +0000)
committerpopcornmix <popcornmix@gmail.com>
Mon, 13 May 2019 23:08:23 +0000 (00:08 +0100)
The log line was missing a closing \n, so wasn't added to the
log immediately.
Adds the function of the V4L2 device that is being unregistered
too.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c

index ad555ce..837fbec 100644 (file)
@@ -77,6 +77,12 @@ enum bcm2835_codec_role {
        ISP,
 };
 
+const static char *roles[] = {
+       "decode",
+       "encode",
+       "isp"
+};
+
 static const char * const components[] = {
        "ril.video_decode",
        "ril.video_encode",
@@ -2522,7 +2528,6 @@ static int bcm2835_codec_create(struct platform_device *pdev,
        struct video_device *vfd;
        int video_nr;
        int ret;
-       const static char *roles[] = {"decode", "encode", "isp"};
 
        dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
        if (!dev)
@@ -2615,7 +2620,8 @@ static int bcm2835_codec_destroy(struct bcm2835_codec_dev *dev)
        if (!dev)
                return -ENODEV;
 
-       v4l2_info(&dev->v4l2_dev, "Removing " MEM2MEM_NAME);
+       v4l2_info(&dev->v4l2_dev, "Removing " MEM2MEM_NAME ", %s\n",
+                 roles[dev->role]);
        v4l2_m2m_release(dev->m2m_dev);
        video_unregister_device(&dev->vfd);
        v4l2_device_unregister(&dev->v4l2_dev);