Skip to content

Commit

Permalink
pxa_camera: remove init() callback
Browse files Browse the repository at this point in the history
pxa_camera init() callback is sometimes abused to setup MFP for PXA CIF, or
even to request GPIOs to be used by the camera *sensor*. These initializations
can be performed statically in machine init functions.

The current semantics for this init() callback is ambiguous anyways, it is
invoked in pxa_camera_activate(), hence at device node open, but its users use
it like a generic initialization to be done at module init time (configure
MFP, request GPIOs for *sensor* control).

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Antonio Ospite authored and Mauro Carvalho Chehab committed Feb 26, 2010
1 parent 81355e4 commit 6b727c6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
2 changes: 0 additions & 2 deletions arch/arm/mach-pxa/include/mach/camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
#define PXA_CAMERA_VSP 0x400

struct pxacamera_platform_data {
int (*init)(struct device *);

unsigned long flags;
unsigned long mclk_10khz;
};
Expand Down
10 changes: 0 additions & 10 deletions drivers/media/video/pxa_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -898,18 +898,8 @@ static void recalculate_fifo_timeout(struct pxa_camera_dev *pcdev,

static void pxa_camera_activate(struct pxa_camera_dev *pcdev)
{
struct pxacamera_platform_data *pdata = pcdev->pdata;
struct device *dev = pcdev->soc_host.v4l2_dev.dev;
u32 cicr4 = 0;

dev_dbg(dev, "Registered platform device at %p data %p\n",
pcdev, pdata);

if (pdata && pdata->init) {
dev_dbg(dev, "%s: Init gpios\n", __func__);
pdata->init(dev);
}

/* disable all interrupts */
__raw_writel(0x3ff, pcdev->base + CICR0);

Expand Down

0 comments on commit 6b727c6

Please sign in to comment.