Commit graph

5 commits

Author SHA1 Message Date
Amitoj Kaur Chawla 62d727c4a9 staging: media: omap1: Replace request_irq with devm_request_irq
Replace request_irq with devm_request_irq to get the interrupt
for device which is automatically freed on exit. Remove
corresponding free_irq from probe and remove functions of a
platform device.

Also, remove an unnecessary label.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Amitoj Kaur Chawla 76e543382b staging: media: omap1: Switch to devm_ioremap_resource
Replace calls to request_mem_region and ioremap with a direct
call to devm_ioremap_resource instead and modify error
handling.
Move the call to platform_get_resource adjacent to the call to
devm_ioremap_resource to make the connection between them more
clear.

Also remove unnecessary labels, variable initialisations and
release_mem_region iounmap from probe and remove functions.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Amitoj Kaur Chawla ba99a0f19a staging: media: omap1: Replace kzalloc with devm_kzalloc
Replace kzalloc with devm_kzalloc and consequently remove kfrees in
probe and remove functions of a platform device.

As a result of this change, remove unnecessary out of memory message
and an unnecessary label.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Amitoj Kaur Chawla f90272f432 staging: media: omap1: Replace clk_get with devm_clk_get
devm_clk_get allocated resources get released when a driver detaches.
Replace clk_get with devm_clk_get and remove corresponding data
releasing function clk_put from probe and remove functions of a
platform device. Also remove an unnecessary label.

This change was made with the help of the following Coccinelle
semantic patch:
@platform@
identifier p, probefn, removefn;
@@
struct platform_driver p = {
  .probe = probefn,
  .remove = removefn,
};

@prb@
identifier platform.probefn, pdev;
expression e;
@@
probefn(struct platform_device *pdev, ...) {
  ...
  e =
- clk_get
+ devm_clk_get
  (...);
   ...
?- clk_put(...);
  ...
}
@remove depends on prb@
identifier platform.removefn;
@@
removefn(...) {
...
?- clk_put(...);
...
}

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Hans Verkuil f52ac3f491 [media] soc_camera/omap1: move to staging in preparation for removal
This driver is deprecated: it needs to be converted to vb2 and
it should become a stand-alone driver instead of using the
soc-camera framework.

Unless someone is willing to take this on (unlikely with such
ancient hardware) it is going to be removed from the kernel
soon.

Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-03-03 07:48:34 -03:00
Renamed from drivers/media/platform/soc_camera/omap1_camera.c (Browse further)