diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-04 13:41:25 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-04 13:41:25 +0000 |
commit | 01b6d97d0059d0f1b5e00d0a6f0e3031460d762f (patch) | |
tree | f3180f5b58c1a3de27241e5454ab385a76b4a870 /linux/include | |
parent | 3aa24bc751bcb8c96a5c84186ef4f4aad1ba0853 (diff) | |
download | mediapointer-dvb-s2-01b6d97d0059d0f1b5e00d0a6f0e3031460d762f.tar.gz mediapointer-dvb-s2-01b6d97d0059d0f1b5e00d0a6f0e3031460d762f.tar.bz2 |
soc-camera: extract function pointers from host object into operations
From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Function pointers and the driver owner are not expected to change
throughout soc-camera host's life. Extract them into an operations struct.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/include')
-rw-r--r-- | linux/include/media/soc_camera.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/linux/include/media/soc_camera.h b/linux/include/media/soc_camera.h index 7a2fa3ed8..80e1193c0 100644 --- a/linux/include/media/soc_camera.h +++ b/linux/include/media/soc_camera.h @@ -56,9 +56,13 @@ struct soc_camera_host { unsigned char nr; /* Host number */ size_t msize; struct videobuf_queue_ops *vbq_ops; - struct module *owner; void *priv; char *drv_name; + struct soc_camera_host_ops *ops; +}; + +struct soc_camera_host_ops { + struct module *owner; int (*add)(struct soc_camera_device *); void (*remove)(struct soc_camera_device *); int (*set_fmt_cap)(struct soc_camera_device *, __u32, @@ -88,8 +92,7 @@ static inline struct soc_camera_host *to_soc_camera_host(struct device *dev) return container_of(dev, struct soc_camera_host, dev); } -extern int soc_camera_host_register(struct soc_camera_host *ici, - struct module *owner); +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); |