[PATCH] media-radio: Maestro avoid accessing private structures directly
authorJiri Slaby <xslaby@fi.muni.cz>
Tue, 10 Jan 2006 04:52:50 +0000 (20:52 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 10 Jan 2006 16:01:41 +0000 (08:01 -0800)
video_device.priv is not allowed to touch and it will be actually removed in
near future.  Use video_get_drvdata() instead.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/media/radio/radio-maestro.c

index f662912ef8a1792f05d76e7a69af315bd12d8199..a77da35eebce58fec5379f53a3276745ed4b4604 100644 (file)
@@ -180,7 +180,7 @@ static inline int radio_function(struct inode *inode, struct file *file,
        unsigned int cmd, void *arg)
 {
        struct video_device *dev = video_devdata(file);
-       struct radio_device *card = dev->priv;
+       struct radio_device *card = video_get_drvdata(dev);
 
        switch (cmd) {
        case VIDIOCGCAP: {
@@ -256,7 +256,7 @@ static int radio_ioctl(struct inode *inode, struct file *file,
        unsigned int cmd, unsigned long arg)
 {
        struct video_device *dev = video_devdata(file);
-       struct radio_device *card = dev->priv;
+       struct radio_device *card = video_get_drvdata(dev);
        int ret;
 
        down(&card->lock);