summaryrefslogtreecommitdiff
path: root/linux/include
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2009-08-25 16:28:22 +0200
committerGuennadi Liakhovetski <g.liakhovetski@gmx.de>2009-08-25 16:28:22 +0200
commit0326f126a4d2f1e2cda2c11725a7f7d7d8273f7f (patch)
tree93ee6755700f373bce9522ec8611a9dcf0161b09 /linux/include
parent54b9f746c2e8e1fa753c1ce6b3ac30c78d5e2005 (diff)
downloadmediapointer-dvb-s2-0326f126a4d2f1e2cda2c11725a7f7d7d8273f7f.tar.gz
mediapointer-dvb-s2-0326f126a4d2f1e2cda2c11725a7f7d7d8273f7f.tar.bz2
soc-camera: convert to platform device
From: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Convert soc-camera core and all drivers to platform device API. We already converted platforms to register a platform device for each soc-camera client, now we remove the compatibility code and switch completely to the new scheme. This is a preparatory step for the v4l2-subdev conversion. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Priority: low
Diffstat (limited to 'linux/include')
-rw-r--r--linux/include/media/soc_camera.h27
-rw-r--r--linux/include/media/soc_camera_platform.h3
2 files changed, 17 insertions, 13 deletions
diff --git a/linux/include/media/soc_camera.h b/linux/include/media/soc_camera.h
index 813e12061..d8b425612 100644
--- a/linux/include/media/soc_camera.h
+++ b/linux/include/media/soc_camera.h
@@ -20,7 +20,6 @@
struct soc_camera_device {
struct list_head list;
struct device dev;
- struct device *control;
unsigned short width; /* Current window */
unsigned short height; /* sizes */
unsigned short x_min; /* Camera capabilities */
@@ -131,17 +130,25 @@ static inline struct soc_camera_host *to_soc_camera_host(struct device *dev)
return dev_get_drvdata(dev);
}
-extern int soc_camera_host_register(struct soc_camera_host *ici);
-extern void soc_camera_host_unregister(struct soc_camera_host *ici);
-extern int soc_camera_device_register(struct soc_camera_device *icd);
-extern void soc_camera_device_unregister(struct soc_camera_device *icd);
+static inline struct soc_camera_link *to_soc_camera_link(struct soc_camera_device *icd)
+{
+ return icd->dev.platform_data;
+}
-extern int soc_camera_video_start(struct soc_camera_device *icd);
-extern void soc_camera_video_stop(struct soc_camera_device *icd);
+static inline struct device *to_soc_camera_control(struct soc_camera_device *icd)
+{
+ return dev_get_drvdata(&icd->dev);
+}
-extern const struct soc_camera_data_format *soc_camera_format_by_fourcc(
+int soc_camera_host_register(struct soc_camera_host *ici);
+void soc_camera_host_unregister(struct soc_camera_host *ici);
+
+int soc_camera_video_start(struct soc_camera_device *icd, struct device *dev);
+void soc_camera_video_stop(struct soc_camera_device *icd);
+
+const struct soc_camera_data_format *soc_camera_format_by_fourcc(
struct soc_camera_device *icd, unsigned int fourcc);
-extern const struct soc_camera_format_xlate *soc_camera_xlate_by_fourcc(
+const struct soc_camera_format_xlate *soc_camera_xlate_by_fourcc(
struct soc_camera_device *icd, unsigned int fourcc);
struct soc_camera_data_format {
@@ -170,8 +177,6 @@ struct soc_camera_format_xlate {
struct soc_camera_ops {
struct module *owner;
- int (*probe)(struct soc_camera_device *);
- void (*remove)(struct soc_camera_device *);
int (*suspend)(struct soc_camera_device *, pm_message_t state);
int (*resume)(struct soc_camera_device *);
int (*init)(struct soc_camera_device *);
diff --git a/linux/include/media/soc_camera_platform.h b/linux/include/media/soc_camera_platform.h
index 3e8f020ab..b144f947f 100644
--- a/linux/include/media/soc_camera_platform.h
+++ b/linux/include/media/soc_camera_platform.h
@@ -18,11 +18,10 @@ struct device;
struct soc_camera_platform_info {
int iface;
- char *format_name;
+ const char *format_name;
unsigned long format_depth;
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;