diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-08-25 16:06:22 +0200 |
---|---|---|
committer | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-08-25 16:06:22 +0200 |
commit | 54b9f746c2e8e1fa753c1ce6b3ac30c78d5e2005 (patch) | |
tree | 0c2887a967b78a5bbe3e0ed816441c8d6f5fc805 | |
parent | aea41520a95b61491620e5702c8322a8fcfbf12e (diff) | |
download | mediapointer-dvb-s2-54b9f746c2e8e1fa753c1ce6b3ac30c78d5e2005.tar.gz mediapointer-dvb-s2-54b9f746c2e8e1fa753c1ce6b3ac30c78d5e2005.tar.bz2 |
soc_camera_platform: pass device pointer from soc-camera core on .add_device()
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Add a struct device pointer to struct soc_camera_platform_info and let the user
(ap325rxa) pass it down to soc_camera_platform.c in its .add_device() method.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Paul Mundt <lethal@linux-sh.org>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Priority: low
---
arch/sh/boards/board-ap325rxa.c | 2 ++
include/media/soc_camera_platform.h | 3 +++
2 files changed, 5 insertions(+), 0 deletions(-)
-rw-r--r-- | linux/arch/sh/boards/board-ap325rxa.c | 2 | ||||
-rw-r--r-- | linux/include/media/soc_camera_platform.h | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/linux/arch/sh/boards/board-ap325rxa.c b/linux/arch/sh/boards/board-ap325rxa.c index a40dc9d00..4fe0ed3f5 100644 --- a/linux/arch/sh/boards/board-ap325rxa.c +++ b/linux/arch/sh/boards/board-ap325rxa.c @@ -342,6 +342,8 @@ static int ap325rxa_camera_add(struct soc_camera_link *icl, if (icl != &camera_info.link || camera_probe() <= 0) return -ENODEV; + camera_info.dev = dev; + return platform_device_register(&camera_device); } diff --git a/linux/include/media/soc_camera_platform.h b/linux/include/media/soc_camera_platform.h index af224dead..3e8f020ab 100644 --- a/linux/include/media/soc_camera_platform.h +++ b/linux/include/media/soc_camera_platform.h @@ -14,6 +14,8 @@ #include <linux/videodev2.h> #include <media/soc_camera.h> +struct device; + struct soc_camera_platform_info { int iface; char *format_name; @@ -21,6 +23,7 @@ struct soc_camera_platform_info { struct v4l2_pix_format format; unsigned long bus_param; void (*power)(int); + struct device *dev; int (*set_capture)(struct soc_camera_platform_info *info, int enable); struct soc_camera_link link; }; |