Skip to content

Commit

Permalink
staging: bcm2835_codec: Clean up logging on unloading the driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
6by9 committed Mar 11, 2019
1 parent 6dc4395 commit 9962572
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -2511,7 +2517,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)
Expand Down Expand Up @@ -2604,7 +2609,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);
Expand Down

0 comments on commit 9962572

Please sign in to comment.