X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=include%2Fmedia%2Fsaa7146.h;h=7a9f76ecbbbd8298339c5f88a92238af144e0a68;hb=bbf6ad1399e9516b0a95de3ad58ffbaed670e4cc;hp=c5a6e22a4b37d626d90370b3becb212105534478;hpb=7fbb8759eff9a348efa5f352ffaa51c364837c4b;p=karo-tx-linux.git diff --git a/include/media/saa7146.h b/include/media/saa7146.h index c5a6e22a4b37..7a9f76ecbbbd 100644 --- a/include/media/saa7146.h +++ b/include/media/saa7146.h @@ -13,11 +13,12 @@ #include #include #include +#include #include /* for vmalloc() */ #include /* for vmalloc_to_page() */ -#define SAA7146_VERSION_CODE 0x000500 /* 0.5.0 */ +#define SAA7146_VERSION_CODE 0x000600 /* 0.6.0 */ #define saa7146_write(sxy,adr,dat) writel((dat),(sxy->mem+(adr))) #define saa7146_read(sxy,adr) readl(sxy->mem+(adr)) @@ -110,6 +111,8 @@ struct saa7146_dev struct list_head item; + struct v4l2_device v4l2_dev; + /* different device locks */ spinlock_t slock; struct mutex lock; @@ -145,6 +148,11 @@ struct saa7146_dev struct saa7146_dma d_rps1; }; +static inline struct saa7146_dev *to_saa7146_dev(struct v4l2_device *v4l2_dev) +{ + return container_of(v4l2_dev, struct saa7146_dev, v4l2_dev); +} + /* from saa7146_i2c.c */ int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c_adapter, u32 bitrate);