media: rcar-vin: rename poorly named initialize and cleanup functions

The functions to register and unregister the hardware and video device
where poorly named from the start. Rename them to better describe their
intended function.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Niklas Söderlund 2018-04-14 07:56:57 -04:00 committed by Mauro Carvalho Chehab
parent a8966fb29e
commit d6ad012ebf
4 changed files with 14 additions and 14 deletions

View file

@ -93,7 +93,7 @@ static int rvin_digital_notify_complete(struct v4l2_async_notifier *notifier)
return ret;
}
return rvin_v4l2_probe(vin);
return rvin_v4l2_register(vin);
}
static void rvin_digital_notify_unbind(struct v4l2_async_notifier *notifier,
@ -103,7 +103,7 @@ static void rvin_digital_notify_unbind(struct v4l2_async_notifier *notifier,
struct rvin_dev *vin = notifier_to_vin(notifier);
vin_dbg(vin, "unbind digital subdev %s\n", subdev->name);
rvin_v4l2_remove(vin);
rvin_v4l2_unregister(vin);
vin->digital->subdev = NULL;
}
@ -245,7 +245,7 @@ static int rcar_vin_probe(struct platform_device *pdev)
if (irq < 0)
return irq;
ret = rvin_dma_probe(vin, irq);
ret = rvin_dma_register(vin, irq);
if (ret)
return ret;
@ -260,7 +260,7 @@ static int rcar_vin_probe(struct platform_device *pdev)
return 0;
error:
rvin_dma_remove(vin);
rvin_dma_unregister(vin);
v4l2_async_notifier_cleanup(&vin->notifier);
return ret;
@ -275,7 +275,7 @@ static int rcar_vin_remove(struct platform_device *pdev)
v4l2_async_notifier_unregister(&vin->notifier);
v4l2_async_notifier_cleanup(&vin->notifier);
rvin_dma_remove(vin);
rvin_dma_unregister(vin);
return 0;
}

View file

@ -1087,14 +1087,14 @@ static const struct vb2_ops rvin_qops = {
.wait_finish = vb2_ops_wait_finish,
};
void rvin_dma_remove(struct rvin_dev *vin)
void rvin_dma_unregister(struct rvin_dev *vin)
{
mutex_destroy(&vin->lock);
v4l2_device_unregister(&vin->v4l2_dev);
}
int rvin_dma_probe(struct rvin_dev *vin, int irq)
int rvin_dma_register(struct rvin_dev *vin, int irq)
{
struct vb2_queue *q = &vin->queue;
int i, ret;
@ -1142,7 +1142,7 @@ int rvin_dma_probe(struct rvin_dev *vin, int irq)
return 0;
error:
rvin_dma_remove(vin);
rvin_dma_unregister(vin);
return ret;
}

View file

@ -839,7 +839,7 @@ static const struct v4l2_file_operations rvin_fops = {
.read = vb2_fop_read,
};
void rvin_v4l2_remove(struct rvin_dev *vin)
void rvin_v4l2_unregister(struct rvin_dev *vin)
{
v4l2_info(&vin->v4l2_dev, "Removing %s\n",
video_device_node_name(&vin->vdev));
@ -866,7 +866,7 @@ static void rvin_notify(struct v4l2_subdev *sd,
}
}
int rvin_v4l2_probe(struct rvin_dev *vin)
int rvin_v4l2_register(struct rvin_dev *vin)
{
struct video_device *vdev = &vin->vdev;
struct v4l2_subdev *sd = vin_to_source(vin);

View file

@ -153,11 +153,11 @@ struct rvin_dev {
#define vin_warn(d, fmt, arg...) dev_warn(d->dev, fmt, ##arg)
#define vin_err(d, fmt, arg...) dev_err(d->dev, fmt, ##arg)
int rvin_dma_probe(struct rvin_dev *vin, int irq);
void rvin_dma_remove(struct rvin_dev *vin);
int rvin_dma_register(struct rvin_dev *vin, int irq);
void rvin_dma_unregister(struct rvin_dev *vin);
int rvin_v4l2_probe(struct rvin_dev *vin);
void rvin_v4l2_remove(struct rvin_dev *vin);
int rvin_v4l2_register(struct rvin_dev *vin);
void rvin_v4l2_unregister(struct rvin_dev *vin);
const struct rvin_video_format *rvin_format_from_pixel(u32 pixelformat);